]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
move prototypes for gunzip() and zunzip() to common.h
authorWolfgang Wegner <w.wegner@astro-kom.de>
Wed, 9 Dec 2009 14:16:47 +0000 (15:16 +0100)
committerWolfgang Denk <wd@denx.de>
Mon, 21 Dec 2009 20:39:59 +0000 (21:39 +0100)
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
24 files changed:
board/bf527-ezkit/video.c
board/bf533-stamp/video.c
board/bf548-ezkit/video.c
board/cm-bf548/video.c
board/dave/PPChameleonEVB/PPChameleonEVB.c
board/esd/apc405/apc405.c
board/esd/ash405/ash405.c
board/esd/cpci405/cpci405.c
board/esd/hh405/hh405.c
board/esd/pci405/pci405.c
board/esd/plu405/plu405.c
board/esd/tasreg/tasreg.c
board/esd/voh405/voh405.c
board/esd/wuh405/wuh405.c
board/mpl/common/common_util.c
board/prodrive/pdnb3/pdnb3.c
common/cmd_bmp.c
common/cmd_bootm.c
common/cmd_license.c
common/cmd_mem.c
drivers/video/cfb_console.c
fs/ubifs/ubifs.h
include/common.h
lib_generic/gunzip.c

index 0b6b7b2e76d184c2589bc8fe7c0ae4d10a77a527..57652be293eb5e907ca9d60eb9e4cb9ffe8dc4ee 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/ppi.h>
index 28ffa618fc6c5cb083140ffef2547aa7bcfb83dd..939bd35a038fdc09bf6d6d74e82b05884319151c 100644 (file)
@@ -20,8 +20,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/ppi.h>
index f4f1becae2162715f2dc8a4fd1f6797318f2a856..10b08e2bf06f724558d09859e0d9991a19fef009 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #define DMA_SIZE16     2
 
 #include <asm/mach-common/bits/eppi.h>
index 078734269d744be5b514e2dbef179efab08a9c3f..4097f09e11a7073dca54fd711a6ea517abbca102 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/types.h>
 #include <stdio_dev.h>
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #ifdef CONFIG_VIDEO
 
 #define DMA_SIZE16     2
index 06de6e0b1d7075870a46dd824c5d061523d4b7d9..6bc70ef9a41f77be2982eded37873c63c7b820d9 100644 (file)
@@ -33,9 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 /* ------------------------------------------------------------------------- */
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 int board_early_init_f (void)
 {
        out32(GPIO0_OR, CONFIG_SYS_NAND0_CE);                 /* set initial outputs     */
index 409a0540bf7749ccf039f479a66ef10ea5cfd99d..72c0907e015643177163e3f7891405719236d6df 100644 (file)
@@ -54,9 +54,6 @@ const unsigned char fpgadata[] =
  */
 #include "../common/fpga.c"
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 #ifdef CONFIG_LCD_USED
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp[] =
index 5f0e67cbb4cac4ff0d1f8c4af37eaeb111af5349..0615959316c26d635a1aa50515e39fef5abaab46 100644 (file)
@@ -48,10 +48,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 int board_early_init_f (void)
 {
        /*
index c29c876d6170b07a0e544616ff3ef16f8901b597..24db8830c79d0ef8f6e8f7b271675f0f2289d695 100644 (file)
@@ -89,7 +89,6 @@ int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0]));
 
 /* Prototypes */
 int cpci405_version(void);
-int gunzip(void *, int, unsigned char *, unsigned long *);
 void lxt971_no_sleep(void);
 
 int board_early_init_f(void)
index 132531b39c53cdfdca3a00dccd2d95b6fcfa977d..4251d51b2eeab2c018598e1bfe682db86f2fa957 100644 (file)
@@ -251,10 +251,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp_320[] =
 {
index 34a163240115f275c2fa2fa6664c8f1692e439f1..536485727d4f53f8293f937492c76f0f8ceec13c 100644 (file)
@@ -34,7 +34,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 unsigned long fpga_done_state(void);
 unsigned long fpga_init_state(void);
index fcffdf67c01f113241ea8430fd1db2bb65bb4be3..e385a78a2e8c65d23ae096488fe47bff09e3ab89 100644 (file)
@@ -46,9 +46,6 @@ const unsigned char fpgadata[] =
  */
 #include "../common/fpga.c"
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 int board_early_init_f(void)
 {
        /*
index 18444427fedfe6358e5177c458882f371b14b1d6..bd9fb2fc2b754d8bfd8f48a8bac0e27851ef3497 100644 (file)
@@ -29,7 +29,6 @@
 
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len);
 int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len);
index 3f81665eb205b24a9e242cf56fbf290f14b69b72..a5600de6fcb6c55b8406258e5bb3a42bbd30da05 100644 (file)
@@ -48,10 +48,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 /* logo bitmap data - gzip compressed and generated by bin2c */
 unsigned char logo_bmp_320[] =
 {
index f2591d57f4f3245f6eaa6deca741060e20b2175d..01966eec263287e8b23b5e3a79ccfd9706775f15 100644 (file)
@@ -46,10 +46,6 @@ const unsigned char fpgadata[] =
 #include "../common/fpga.c"
 
 
-/* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
-
 int board_early_init_f (void)
 {
        /*
index 61af4aea1ac01ae8826dd63732518603b3b99514..32bf244935b8992fe983e053cead92492af198fb 100644 (file)
@@ -48,7 +48,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FIRM_START 0xFFF00000
 #endif
 
-extern int gunzip(void *, int, uchar *, unsigned long *);
 extern int mem_test(ulong start, ulong ramsize, int quiet);
 
 #define I2C_BACKUP_ADDR 0x7C00         /* 0x200 bytes for backup */
index c323456d607ec1fe13e8fc8a59b1c78604c23b7c..69f8f9bbcad8dea2312cb2c904cc6552fa0f2715 100644 (file)
@@ -29,7 +29,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Prototypes */
-int gunzip(void *, int, unsigned char *, unsigned long *);
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 
 /* predefine these here for FPGA programming (before including fpga.c) */
index faa10a4145b9658b047f64c4157888ded67e1b36..74ab24ca9467b280d7ce6a1b20a52a1cba221f30 100644 (file)
@@ -35,8 +35,6 @@
 static int bmp_info (ulong addr);
 static int bmp_display (ulong addr, int x, int y);
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 /*
  * Allocate and decompress a BMP image using gunzip().
  *
index efd6aec0cf19f60b36e32f15c5345db6be03865e..94ddac37cf33142db1d718b1b35d8ea22cb26147 100644 (file)
@@ -63,7 +63,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
 #ifndef CONFIG_SYS_BOOTM_LEN
 #define CONFIG_SYS_BOOTM_LEN   0x800000        /* use 8MByte as default max gunzip size */
 #endif
index c6f272ad34aa0429fd4a7d917d3aec0ed0638def..85a4871de0f57a2a7b858379946980ab3408e27c 100644 (file)
@@ -29,7 +29,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <license.h>
-int gunzip(void *, int, unsigned char *, unsigned long *);
 
 int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
index a34b342f09e8d27a5c0a53e4b23ed55995828c4a..1839330760c766dee1a6b9ef3c927b21b3a70791 100644 (file)
@@ -1225,8 +1225,6 @@ int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
 #ifdef CONFIG_CMD_UNZIP
-int  gunzip (void *, int, unsigned char *, unsigned long *);
-
 int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        unsigned long src, dst;
index 16d6689f228a307cfb93c40874b0eb254481b48c..c07a26e3c0631e9108117bda1077676fd8e6ad6c 100644 (file)
@@ -403,8 +403,6 @@ static const int video_font_draw_table32[16][4] = {
            { 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff } };
 
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
-
 /******************************************************************************/
 
 static void video_drawchars (int xx, int yy, unsigned char *s, int count)
index 06772af36f71a117fffab0558cb1c0fe14ae9721..0af471afb911485508f990d1d1112dbdf12fac88 100644 (file)
@@ -2140,7 +2140,4 @@ int ubifs_decompress(const void *buf, int len, void *out, int *out_len,
 /* todo: Move these to a common U-Boot header */
 int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
                          unsigned char *out, size_t *out_len);
-
-int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
-                                               int stoponerr, int offset);
 #endif /* !__UBIFS_H__ */
index 00b543408e38f93181d854e7ec52f5246f50bd4f..07897f682eb637f494aeeb0b26d5eda56ada8fb8 100644 (file)
@@ -612,6 +612,11 @@ ulong      usec2ticks    (unsigned long usec);
 ulong  ticks2usec    (unsigned long ticks);
 int    init_timebase (void);
 
+/* lib_generic/gunzip.c */
+int gunzip(void *, int, unsigned char *, unsigned long *);
+int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
+                                               int stoponerr, int offset);
+
 /* lib_generic/time.c */
 void   udelay        (unsigned long);
 
index d59a4482b73c4ce3fdc968ed335dec3ab745212a..d2b7ad477916b4a03fbe6b6b439cc76456d6a9cb 100644 (file)
 #define RESERVED               0xe0
 #define DEFLATED               8
 
-int gunzip(void *, int, unsigned char *, unsigned long *);
 void *zalloc(void *, unsigned, unsigned);
 void zfree(void *, void *, unsigned);
-int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
-                                               int stoponerr, int offset);
 
 void *zalloc(void *x, unsigned items, unsigned size)
 {