X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=3981588e7b1139c9a3162a63c1baf02948d810cb;hb=1f906263984019d6804c760d7ca6f8c162c5b78d;hp=c5853066cc5c0f29c2c7d5b1c04222fdb3caab29;hpb=da87ae3856e51856fde9bd24ccf32ecdf6ca39d8;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index c585306..3981588 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -610,8 +610,10 @@ static int b_pp_c_handler(char *proto, const char *fname) static void build_pp_cache(FILE *fhdr) { + long pos; int ret; + pos = ftell(fhdr); rewind(fhdr); ret = do_protostrs(fhdr, hdrfn); @@ -619,6 +621,7 @@ static void build_pp_cache(FILE *fhdr) exit(1); qsort(pp_cache, pp_cache_size, sizeof(pp_cache[0]), pp_name_cmp); + fseek(fhdr, pos, SEEK_SET); } static const struct parsed_proto *proto_parse(FILE *fhdr, const char *sym,