Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/prelude/Binary/StdMem_.z.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <haskell2c.h>
#include "cLowBinary.h"
#include <stdlib.h>

void * hs_stdmem ()
{ BinHandle bh;
  
   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);
  return nhc_mkCInt((int)allocForeignObj((void*)bh,(gcCval)finaliseBH,gcNow));
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.