/*Shift.c: This routine bitshifts length variables pointed to by 'data' by one bit to the right. This divides them by two converting unsigned short integer data to signed data. Written by Sandor L. Barna, December 1993. */ #include <stdio.h> void shift(unsigned short *data,int length) { int i; for (i=0;i<length;i++) { data[i]>>=1; } return; }