?? su.h
字號:
/* Copyright (c) Colorado School of Mines, 1997.*//* All rights reserved. *//* su.h - include file for SU programs * * $Author: jkc $ * $Source: /usr/local/cwp/src/su/include/RCS/su.h,v $ * $Revision: 1.31 $ ; $Date: 1996/02/21 23:40:57 $ */#ifndef SU_H#define SU_H#include "par.h"/* TYPEDEFS */typedef union { /* storage for arbitrary type */ char s[8]; short h; unsigned short u; long l; unsigned long v; int i; unsigned int p; float f; double d; unsigned int U:16; unsigned int P:32;} Value;/* DEFINES */#define CHECK_NT(label,nt) \ if(nt > SU_NFLTS) err("%s=%d must not exceed %d",label,nt,SU_NFLTS)#define NALLOC (524288)#define NFALLOC (NALLOC/FSIZE)#define NIALLOC (NALLOC/ISIZE)#define NDALLOC (NALLOC/DSIZE)#define LOWBYTE(w) ((w) & 0xFF)#define HIGHBYTE(w) LOWBYTE((w) >>8)#define LOWWORD(w) ((w) & 0xFFFF)#define HIGHWORD(w) LOWWORD((w) >>16)#define ISNEGCHAR(c) ((c) & 0x80)#define SIGNEXTEND(c) (~0xFF | (int) (c))/* READ_OK - read permission for access(2) * WRITE_OK - write permission for access(2) * EXEC_OK - exec permission for access(2) * FILE_OK - file existence for access(2) * Note: these are changed from the usual defines in file.h * because this include exists on some machines and * not others, often overlaps fcntl.h, etc. Lint is * happier with a fresh start. * Note: Post-ANSI sometimes R_OK in unistd.h (this isn't * an ANSI file). */#define READ_OK 4#define WRITE_OK 2#define EXEC_OK 1#define FILE_OK 0/* For plotting by keyword */#define IS_DEPTH(str) ( STREQ(str,"gelev") || \ STREQ(str,"selev") || \ STREQ(str,"sdepth") || \ STREQ(str,"gdel") || \ STREQ(str,"sdel") || \ STREQ(str,"swdep") || \ STREQ(str,"gwdep") )#define IS_COORD(str) ( STREQ(str,"sx") || \ STREQ(str,"sy") || \ STREQ(str,"gx") || \ STREQ(str,"gy") )/* FUNCTION PROTOTYPES */#ifdef __cplusplus /* if C++, specify external linkage to C functions */extern "C" {#endif/* valpkge */int vtoi(register cwp_String type, Value val);long vtol(register cwp_String type, Value val);float vtof(register cwp_String type, Value val);double vtod(register cwp_String type, Value val);int valcmp(register cwp_String type, Value val1, Value val2);void printfval(register cwp_String type, Value val);void fprintfval(FILE *stream, register cwp_String type, Value val);void scanfval(register cwp_String type, Value *valp);void atoval(cwp_String type, cwp_String keyval, Value *valp);void getparval(cwp_String name, cwp_String type, int n, Value *valp);Value valtoabs(cwp_String type, Value val);#ifdef __cplusplus /* if C++, end external linkage specification */}#endif#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -