setmv.c
来自「支持各种栅格图像和矢量图像读取的库」· C语言 代码 · 共 86 行
C
86 行
/* * setmv.c$Log$Revision 1.3 2006/02/07 10:17:15 kdejongFixed endian compile problemsome rcs issues of Kor, I guessChecked in by cees (cees@pcraster.nl) on account of KorRevision 1.2 2005/10/03 07:23:00 korRemoved rcs id stringRevision 1.1.1.1 2000/01/04 21:05:06 ceesInitial import CeesRevision 2.0 1996/05/23 13:16:26 ceescsf2cleanRevision 1.1 1996/05/23 13:11:49 ceesInitial revisionRevision 1.3 1995/11/01 17:23:03 cees. * Revision 1.2 1994/09/06 13:04:27 cees * changed for appCR field * added c2man docs * * Revision 1.1 1994/08/26 13:33:23 cees * Initial revision * */#include "csf.h"#include "csfimpl.h"/* set a memory location to a missing value * SetMV sets a memory location to a missing value * (using the application cell representation). * SetMV is quite slow but handy as in the example * below. In general one should use assignment for * integers (e.g. v = MV_UINT1) or the macro's * SET_MV_REAL4 and SET_MV_REAL8 * * EXAMPLE * .so examples/border.tr */void SetMV( const MAP *m, /* map handle */ void *c) /* write-only. location set to missing value */{ SetMVcellRepr(m->appCR, c);}/* set a memory location to a missing value * SetMVcellRepr sets a memory location to a missing value * (using the application cell representation). * In general one should use assignment for * integers (e.g. v = MV_UINT1) or the macro's * SET_MV_REAL4 and SET_MV_REAL8 * */void SetMVcellRepr( CSF_CR cellRepr, /* cell representation, one of the CR_* constants */ void *c) /* write-only. location set to missing value */{ switch (cellRepr) { case CR_INT1 : *((INT1 *)c) = MV_INT1; break; case CR_INT2 : *((INT2 *)c) = MV_INT2; break; case CR_INT4 : *((INT4 *)c) = MV_INT4; break; case CR_UINT1 : *((UINT1 *)c) = MV_UINT1; break; case CR_UINT2 : *((UINT2 *)c) = MV_UINT2; break; case CR_REAL8 : ((UINT4 *)c)[1] = MV_UINT4; default : POSTCOND( cellRepr == CR_REAL8 || cellRepr == CR_REAL4 || cellRepr == CR_UINT4 ); *((UINT4 *)c) = MV_UINT4; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?