00001 /* --------------------------------------------------------------- */ 00002 /* Copyright 2006-2010, NEC Europe Ltd., London, UK. */ 00003 /* All rights reserved. Use is subject to OASIS4 license terms. */ 00004 /* --------------------------------------------------------------- */ 00005 00006 /*================================================================ 00007 00008 $Id: psmile_get_varsize.c 2325 2010-04-21 15:00:07Z valcke $ 00009 00010 Author : Hubert Ritzdorf 00011 NEC Europe Ltd. 00012 C&C Research Laboratories 00013 Rathausallee 10 00014 D-53757 Sankt Augustin 00015 Germany 00016 00017 E-mail: ritzdorf@ccrl-nece.de 00018 00019 ================================================================ */ 00020 00021 #include <stdio.h> 00022 #include <stddef.h> 00023 #include "PSMILe_f2c.h" 00024 00025 /* 00026 00027 //BOP 00028 00029 ! !ROUTINE: psmile_get_varsize 00030 00031 !INTERFACE: 00032 00033 */ 00034 00035 #ifdef ANSI_C 00036 00037 void psmile_get_varsize (void *p1, void *p2, INTEGER *diff) 00038 00039 #else 00040 00041 void psmile_get_varsize ( p1, p2, diff ) 00042 void *p1, *p2; 00043 INTEGER *diff; 00044 00045 #endif 00046 00047 /* 00048 00049 !INPUT PARAMETERS: 00050 00051 void, Intent (In) :: p1 (*) 00052 void, Intent (In) :: p1 (*) 00053 00054 !OUTPUT PARAMETERS: 00055 00056 Integer, Intent (Out) :: diff 00057 00058 !DESCRIPTION: 00059 00060 Get Size of Variables 00061 00062 Routine "psmile_get_varsize" returns the difference between 00063 two pointers and is used to determine the size of variables. 00064 00065 \underline{The calling sequence:} 00066 00067 p1 = Pointer\\ 00068 p2 = Pointer 00069 00070 returns diff = p2 - p1 00071 00072 00073 !FILES USED: 00074 00075 <stdio.h> 00076 <stddef.h> 00077 "PSMILe_f2c.h" 00078 00079 !REVISION HISTORY: 00080 00081 Date Programmer Description 00082 ---------- ---------- ----------- 00083 06.07.03 H. Ritzdorf created 00084 00085 //EOP 00086 00087 ---------------------------------------------------------------------- 00088 $Id 00089 $Author 00090 ---------------------------------------------------------------------- */ 00091 00092 { 00093 *diff = (INTEGER) ((char *) p2 - (char *) p1); 00094 return; 00095 } 00096