This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / sh / boot / compressed / misc.c
index 211e911..1ed7425 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/sh/boot/compressed/misc.c
- *
- * This is a collection of several routines from gzip-1.0.3
+ * 
+ * This is a collection of several routines from gzip-1.0.3 
  * adapted for Linux.
  *
  * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -52,7 +52,7 @@ static unsigned outcnt = 0;  /* bytes in output buffer */
 #define RESERVED     0xC0 /* bit 6,7:   reserved */
 
 #define get_byte()  (inptr < insize ? inbuf[inptr++] : fill_inbuf())
-
+               
 /* Diagnostic functions */
 #ifdef DEBUG
 #  define Assert(cond,msg) {if(!(cond)) error(msg);}
@@ -75,7 +75,7 @@ static void flush_window(void);
 static void error(char *m);
 static void gzip_mark(void **);
 static void gzip_release(void **);
-
+  
 extern char input_data[];
 extern int input_len;
 
@@ -83,19 +83,20 @@ static long bytes_out = 0;
 static uch *output_data;
 static unsigned long output_ptr = 0;
 
 static void *malloc(int size);
 static void free(void *where);
 static void error(char *m);
 static void gzip_mark(void **);
 static void gzip_release(void **);
-
-int puts(const char *);
-
+static void puts(const char *);
+  
 extern int _text;              /* Defined in vmlinux.lds.S */
 extern int _end;
 static unsigned long free_mem_ptr;
 static unsigned long free_mem_end_ptr;
-
 #define HEAP_SIZE             0x10000
 
 #include "../../../../lib/inflate.c"
@@ -133,7 +134,7 @@ static void gzip_release(void **ptr)
 }
 
 #ifdef CONFIG_SH_STANDARD_BIOS
-size_t strlen(const char *s)
+static int strlen(const char *s)
 {
        int i = 0;
 
@@ -142,17 +143,14 @@ size_t strlen(const char *s)
        return i;
 }
 
-int puts(const char *s)
+void puts(const char *s)
 {
-       int len = strlen(s);
-       sh_bios_console_write(s, len);
-       return len;
+       sh_bios_console_write(s, strlen(s));
 }
 #else
-int puts(const char *s)
+void puts(const char *s)
 {
-       /* This should be updated to use the sh-sci routines */
-       return 0;
+  /* This should be updated to use the sh-sci routines */
 }
 #endif
 
@@ -200,9 +198,9 @@ static void flush_window(void)
     ulg c = crc;         /* temporary variable */
     unsigned n;
     uch *in, *out, ch;
-
+    
     in = window;
-    out = &output_data[output_ptr];
+    out = &output_data[output_ptr]; 
     for (n = 0; n < outcnt; n++) {
            ch = *out++ = *in++;
            c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);