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.

9 lines
211 B

  1. #include "scan.h"
  2. size_t scan_pb_type0_sint(const char* in,size_t len,signed long long* l) {
  3. unsigned long long m;
  4. size_t n=scan_varint(in,len,&m);
  5. if (!n) return 0;
  6. *l=(-(m&1)) ^ (m>>1);
  7. return n;
  8. }