?? common.h
字號:
/* SCCSID @(#)common.h 1.4 12/3/97 */ /************************************************************ * common.h contains general definitions and global variables * declaration, always include as 1st header in all files ************************************************************/#ifndef _COMMON_H_ #define _COMMON_H_/* * **************** General Definitions **************** */#ifdef MAIN#define GBLDEF(name,value) name = value#define GBLDEF_0(name,value) name#else#define GBLDEF(name,value) extern name#define GBLDEF_0(name,value) extern name#endif#ifndef FAKEregister int reg0 asm("r0");#endif#define cat2(i,j) i##j#define cat3(i,j,k) i##j##k#define max2(a,b) ((a)>(b)?(a):(b))#define max3(a,b,c) max2(max2(a,b),c)#ifndef FAKE#define PROTECT(a) do {mvd[riface_irqsuppress] = 0;\ asm("nop"); asm("nop"); a;} while (0)register volatile int *mvd asm("r27");#else#define PROTECT(a) (a)#define dram(a) (a)#define dram_cached(a) (a)#endif/************************************************************ * addressing conversion goodies. * a2x, a2y pair convert linear address to components used in dmax and dmay. * xy2a convert a 2d coordinate(x,y) with width to a linear address. * placed here because both riscbus.h and vp.h shares it. ************************************************************/#define a2x(a) ((a) & 0x1ff)#define a2y(a) ((a) >> 9)#define xy2a(x,y,width) ((y)*(width)+(x))/************************************************************ * for portability reason ************************************************************/#define uchar unsigned char#define ushort unsigned short#define uint unsigned/************************************************************ * classifier for public functions ************************************************************/#define EXPORT extern#define IMPORT extern#define PUBLIC#define PRIVATE static#define GLBTIMER 1#define CODEIR 2#define TIMERHIT 3#define VBV_START 4extern int mvd_version;extern unsigned int get_global_variable();typedef void (*PFV)(); /* Pointer to func. returning */#endif /* _COMMON_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -