misc.c (94bd217e2d683719ab21a4ac117d8a1b91cbedc9) | misc.c (df4879fa2603fbf0804a80f9f146ef9023dd621f) |
---|---|
1/* 2 * misc.c 3 * 4 * This is a collection of several routines from gzip-1.0.3 5 * adapted for Linux. 6 * 7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 8 * --- 4 unchanged lines hidden (view full) --- 13 * be marked with 'const' and all other variables initialized at run-time 14 * only. This way all non constant variables will end up in the bss segment, 15 * which should point to addresses in RAM and cleared to 0 on start. 16 * This allows for a much quicker boot time. 17 */ 18 19unsigned int __machine_arch_type; 20 | 1/* 2 * misc.c 3 * 4 * This is a collection of several routines from gzip-1.0.3 5 * adapted for Linux. 6 * 7 * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 8 * --- 4 unchanged lines hidden (view full) --- 13 * be marked with 'const' and all other variables initialized at run-time 14 * only. This way all non constant variables will end up in the bss segment, 15 * which should point to addresses in RAM and cleared to 0 on start. 16 * This allows for a much quicker boot time. 17 */ 18 19unsigned int __machine_arch_type; 20 |
21#define _LINUX_STRING_H_ 22 | |
23#include <linux/compiler.h> /* for inline */ | 21#include <linux/compiler.h> /* for inline */ |
24#include <linux/types.h> /* for size_t */ 25#include <linux/stddef.h> /* for NULL */ | 22#include <linux/types.h> |
26#include <linux/linkage.h> | 23#include <linux/linkage.h> |
27#include <asm/string.h> | |
28 | 24 |
29 | |
30static void putstr(const char *ptr); 31extern void error(char *x); 32 33#include <mach/uncompress.h> 34 35#ifdef CONFIG_DEBUG_ICEDCC 36 37#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) --- 58 unchanged lines hidden (view full) --- 96 if (c == '\n') 97 putc('\r'); 98 putc(c); 99 } 100 101 flush(); 102} 103 | 25static void putstr(const char *ptr); 26extern void error(char *x); 27 28#include <mach/uncompress.h> 29 30#ifdef CONFIG_DEBUG_ICEDCC 31 32#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) --- 58 unchanged lines hidden (view full) --- 91 if (c == '\n') 92 putc('\r'); 93 putc(c); 94 } 95 96 flush(); 97} 98 |
104 105void *memcpy(void *__dest, __const void *__src, size_t __n) 106{ 107 int i = 0; 108 unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src; 109 110 for (i = __n >> 3; i > 0; i--) { 111 *d++ = *s++; 112 *d++ = *s++; 113 *d++ = *s++; 114 *d++ = *s++; 115 *d++ = *s++; 116 *d++ = *s++; 117 *d++ = *s++; 118 *d++ = *s++; 119 } 120 121 if (__n & 1 << 2) { 122 *d++ = *s++; 123 *d++ = *s++; 124 *d++ = *s++; 125 *d++ = *s++; 126 } 127 128 if (__n & 1 << 1) { 129 *d++ = *s++; 130 *d++ = *s++; 131 } 132 133 if (__n & 1) 134 *d++ = *s++; 135 136 return __dest; 137} 138 | |
139/* 140 * gzip declarations 141 */ 142extern char input_data[]; 143extern char input_data_end[]; 144 145unsigned char *output_data; 146 --- 48 unchanged lines hidden --- | 99/* 100 * gzip declarations 101 */ 102extern char input_data[]; 103extern char input_data_end[]; 104 105unsigned char *output_data; 106 --- 48 unchanged lines hidden --- |