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

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


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

void hs_skipBits (BinHandle bh,int width)
{ 
   while (width > 0) {
     int avail = (CACHESIZE*8) - bh->cptr;
     if (width >= avail) {
       width    -= avail;
       nextcache(bh);
     } else {
       bh->cptr += width;
       width     = 0;
     }
   }
  return;
}

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.