?? osizeof.c
字號:
/*
* *************************************************************************
* * *
* * This confidential and proprietary software may be used only *
* * as authorized by a licensing agreement from the Alta Group of *
* * Cadence Design Systems, Inc. In the event of publication, the *
* * following notice is applicable: *
* * *
* * (c) COPYRIGHT 1995 ALTA GROUP OF CADENCE DESIGN SYSTEMS, INC. *
* * ALL RIGHTS RESERVED *
* * *
* * The entire notice above must be reproduced on all authorized *
* * copies. *
* * *
* *************************************************************************
*
*/
/*
* FILE: Osizeof
* DATE: July 20, 1989
* RELATED FILES: Oalloc, OvAlloc
* AUTHOR: John Lundell
* DESCRIPTION: get size of object
* NOTES/WARNINGS:
* REVISION HISTORY:
* Release Who Date Comments
*/
#include "cgs.h"
/*---------------------------------------------------------------
* FUNCTION: Osizeof
* DESCRIPTION: Get size of passed object
* RETURN VALUE: object size
* NOTES/WARNINGS:
* REVISION HISTORY:
* Release Who Date Comments
*/
int Osizeof(sp_props)
Objprops sp_props;
{
/*
* Switch on type
*/
switch(sp_props->type) {
case TYPE_SRD:
case TYPE_VRD:
return sizeof(double);
case TYPE_SRI:
case TYPE_VRI:
return sizeof(long);
case TYPE_SRF:
case TYPE_VRF:
return sizeof(float);
case TYPE_SRL:
case TYPE_VRL:
return sizeof(Logical);
case TYPE_SCD:
case TYPE_VCD:
return sizeof(Complex);
case TYPE_SCI:
case TYPE_VCI:
return sizeof(IntCmplx);
case TYPE_SCF:
case TYPE_VCF:
return sizeof(FltCmplx);
case TYPE_SRX:
case TYPE_VRX:
return FIXBYTESIZE(sp_props->fix_format.numbits);
case TYPE_SCX:
case TYPE_VCX:
return 2*FIXBYTESIZE(sp_props->fix_format.numbits);
case TYPE_SRS:
return sizeof(char);
}
printf("Unknown data type in Osizeof: %d\n", sp_props->type);
exit(1);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -