So then if I used the following should I expect it to work?

UInt32 getUintVar(char *instr, int i)
{
    UInt32 v = 0;
    unsigned char c;
    int count;

    for (count = 0; count < 5; count++) {
       c = instr[i+count];
       if (c < 0) return -1;
       v = (v << 7)|(c & 0x7f);
       if (!(c & 0x80)) {
         return(v);
       }
    }
}


What about storing 5 octets since the OMA's (WAP Forum's) spec for UIntVar is that it 
can be a maximum of 5 octets long?

Thanks,
Donald
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to