/* shift.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ void lshift(int n,unsigned short *pm,int m) { unsigned short *pa,*pc; pc=pm+m-1; pa=pm+n/16; m=n%16; n=16-m; for(; pa>n;} *pm++ = *pa<pm ;){ *pc=(*pa--)>>m; *pc-- |= *pa<>m; } while(pc>=pm) *pc-- =0; }