module NHC.Binary
( stdmem
) where
import NHC.GreenCard
import BinHandle ({-type-}BinHandle(..))
%-#include "cLowBinary.h"
%-#include <stdlib.h>
%fun stdmem :: BinHandle
%code
% NodePtr n;
% bh = (BinHandle)malloc(sizeof(BinState)); /* assume unfailing */
% bh->mode = RW;
% bh->file = 0;
% n = C_ALLOC(1+EXTRA);
% n[0] = CONSTRW(0,EXTRA);
% bh->loc.sp = stableInsert(n);
% bh->attrib.size = 0;
% bh->adjust.here = 0;
% opencache(bh);
%result (binHandle bh)
|