See below, N being the number of bits to shift, assuming N<=3, if you shift by more than 3 (N>3), you'll need to handle more than one digit of carry (e.g. 9*(2^4) = 144):
void LShift(unsigned char *arg)
{
int i, carry=0, temp;
for(i=2;i>=0;i--)
{
temp=(arg[i]<<N)+carry;
arg[i]=temp%10;
temp -= arg[i];
carry = temp/10;
}
}
Or if you want something closer to the original:
void LShift(unsigned char *arg)
{
int i, carry=0, temp;
for(i=2;i>=0;i--)
{
temp=(arg[i]<<N)+carry;
temp+=6 * (temp/10);
carry=temp>>4;
arg[i]=temp&0xF;
}
}
Also note that (in all versions, including the original) you may be left with carry which is a new digit.