⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defs.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
字号:
/*	@(#)defs.h	4.1	(ULTRIX)	7/17/90	*//************************************************************************ *									* *			Copyright (c) 1988 by				* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   This software is  derived  from  software  received  from  the	* *   University    of   California,   Berkeley,   and   from   Bell	* *   Laboratories.  Use, duplication, or disclosure is  subject  to	* *   restrictions  under  license  agreements  with  University  of	* *   California and with AT&T.						* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************//* * Public definitions, common to all. */#include <stdio.h>#define new(type)           ((type) malloc(sizeof(struct type)))#define newarr(type, n)     ((type *) malloc((unsigned) (n) * sizeof(type)))#define dispose(ptr)        { free((char *) ptr); ptr = 0; }#define public#define private static#define ord(enumcon) ((unsigned int) enumcon)#define nil 0#define and &&#define or ||#define not !#define div /#define mod %#define max(a, b)    ((a) > (b) ? (a) : (b))#define min(a, b)    ((a) < (b) ? (a) : (b))#define assert(b) { \    if (not(b)) { \	panic("assertion failed at line %d in file %s", __LINE__, __FILE__); \    } \}#define badcaseval(v) { \    panic("unexpected value %d at line %d in file %s", v, __LINE__, __FILE__); \}#define checkref(p) { \    if (p == nil) { \	panic("reference through nil pointer at line %d in file %s", \	    __LINE__, __FILE__); \    } \}typedef int Integer;typedef int integer;typedef char Char;typedef double Real;typedef double real;typedef enum { false, true } Boolean;typedef Boolean boolean;typedef char *String;#define strdup(s)       strcpy(malloc((unsigned) strlen(s) + 1), s)#define streq(s1, s2)   (strcmp(s1, s2) == 0)typedef FILE *File;typedef int Fileid;typedef String Filename;#define get(f, var) fread((char *) &(var), sizeof(var), 1, f)#define put(f, var) fwrite((char *) &(var), sizeof(var), 1, f)#undef FILEextern long atol();extern double atof();extern char *malloc();extern String strcpy(), index(), rindex();/* extern int strlen(); */extern String cmdname;extern String errfilename;extern short errlineno;extern int debug_flag[];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -