version 1.29, 2013/06/13 07:45:28 |
version 1.31, 2013/06/13 18:42:11 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.28 2010/12/25 23:10:15 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.30 2013/06/13 08:11:55 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
STRING *rp; |
STRING *rp; |
{ |
{ |
char *e,*f; |
char *e,*f; |
int len; |
size_t len; |
|
|
e = (char *)getenv(BDY((STRING)ARG0(arg))); |
e = (char *)getenv(BDY((STRING)ARG0(arg))); |
if ( e ) { |
if ( e ) { |
|
|
h = get_heapsize(); |
h = get_heapsize(); |
if(sizeof(size_t)>sizeof(int)) { |
if(sizeof(size_t)>sizeof(int)) { |
u = h>>(sizeof(int)*CHAR_BIT); l = h&(~0); |
u = h>>(sizeof(int)*CHAR_BIT); l = h&(~0); |
if ( !u ) STOQ(l,*rp); |
if ( !u ) UTOQ(l,*rp); |
else { |
else { |
n = NALLOC(2); PL(n)=2; BD(n)[0] = l; BD(n)[1] = u; |
n = NALLOC(2); PL(n)=2; BD(n)[0] = l; BD(n)[1] = u; |
NTOQ(n,1,*rp); |
NTOQ(n,1,*rp); |
} |
} |
}else { |
}else { |
STOQ(h,*rp); |
UTOQ(h,*rp); |
} |
} |
} |
} |
|
|