📄 mygzip.h
字号:
/***************************************** Copyright (c) 2001-2002 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//* This is file is part of the Jasper DVD boot loader */typedef unsigned char uch;typedef unsigned short ush;typedef unsigned long ulg;#define OF(args) args#define Assert(cond,msg)#define Trace(x)#define Tracev(x)#define Tracevv(x)#define Tracec(c,x)#define Tracecv(c,x)#include "uart.h"#define memzero bzero#define DPRINTF(x) while(0) // PrintUart(x"\r",40) // while(0)#define NULL (void *)0extern unsigned inptr; /* index of next byte to be processed in inbuf */extern unsigned outcnt; /* bytes in output buffer */extern uch *window; extern uch *inbuf;#define get_byte() __my_get_byte()static __inline__ uch __my_get_byte(){ uch b = inbuf[inptr++];// led(inptr>>4);// DPRINTF("getbyte : %x (inbuf = %p, inptr = %d)\n",b,inbuf,inptr); return b;}#define WSIZE 0x800000 #define malloc(x) __fake_malloc(x)#define free(x) __fake_free(x)#define flush_window() while(0)// printf("ceci est une erreur flush_window ne doit pas etre appele\n")extern char *heap_base, *heap_top;//, *max_heap_top;#if 0#define RECORD_MAX_MALLOC \do { \ if(heap_top > max_heap_top) max_heap_top=heap_top; \} while(0);#else#define RECORD_MAX_MALLOC#endifstatic __inline__ void * __fake_malloc(int size){ void *ret; ret = (void *)heap_top; heap_top += size;// DPRINTF("fake_malloc : %08x (size = %d)\n",ret,size); RECORD_MAX_MALLOC return ret;}static __inline__ void __fake_free(void *p){ heap_top = heap_base;// DPRINTF("fake_free (%p) : %08x\n",p,heap_top); }static __inline__ void memcpy(char *dest, const char *src, unsigned n){ unsigned i; for(i=0; i<n; i++) dest[i]=src[i];}static __inline__ void bzero(char *s, unsigned n){ unsigned i; for(i=0; i<n; i++) s[i]=0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -