Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
231 B

  1. #include "scan.h"
  2. size_t scan_pb_tag(const char* in,size_t len, size_t* fieldno,unsigned char* type) {
  3. unsigned long long l;
  4. size_t n=scan_varint(in,len,&l);
  5. if (n==0) return 0;
  6. *type=l&7;
  7. *fieldno=(l>>3);
  8. return n;
  9. }