=================================================================== RCS file: /cvs/docbook2mdoc/statistics.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -p -r1.24 -r1.25 --- docbook2mdoc/statistics.c 2019/04/14 14:00:17 1.24 +++ docbook2mdoc/statistics.c 2019/04/14 14:59:37 1.25 @@ -1,4 +1,4 @@ -/* $Id: statistics.c,v 1.24 2019/04/14 14:00:17 schwarze Exp $ */ +/* $Id: statistics.c,v 1.25 2019/04/14 14:59:37 schwarze Exp $ */ /* * Copyright (c) 2019 Ingo Schwarze * @@ -46,6 +46,8 @@ * * Example usage: * statistics tgroup colspec < filenames.txt | grep colspec + * + * Synchronized with parse.c up to rev. 1.42. */ struct entry { @@ -304,6 +306,8 @@ parse_file(int fd, char *fname) stack[stacki - 1] : "ROOT", b + poff); stack_push(b + poff); + if (strcmp(b + poff, "sbr") == 0) + elem_end = 1; } if (elem_end) stack_pop(b + poff); @@ -314,8 +318,8 @@ parse_file(int fd, char *fname) } } assert(poff > 0); - memmove(b, b + poff, rlen - poff); rlen -= poff; + memmove(b, b + poff, rlen); } if (rsz < 0) perror(fname);