=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/eqn.c,v retrieving revision 1.43 retrieving revision 1.44 diff -c -r1.43 -r1.44 *** src/usr.bin/mandoc/eqn.c 2018/12/13 03:40:09 1.43 --- src/usr.bin/mandoc/eqn.c 2018/12/13 05:13:15 1.44 *************** *** 1,7 **** ! /* $OpenBSD: eqn.c,v 1.43 2018/12/13 03:40:09 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons ! * Copyright (c) 2014, 2015, 2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above --- 1,7 ---- ! /* $OpenBSD: eqn.c,v 1.44 2018/12/13 05:13:15 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons ! * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above *************** *** 28,33 **** --- 28,34 ---- #include "mandoc_aux.h" #include "mandoc.h" #include "roff.h" + #include "eqn.h" #include "libmandoc.h" #include "eqn_parse.h" *************** *** 489,494 **** --- 490,505 ---- free(bp); } + struct eqn_box * + eqn_box_new(void) + { + struct eqn_box *bp; + + bp = mandoc_calloc(1, sizeof(*bp)); + bp->expectargs = UINT_MAX; + return bp; + } + /* * Allocate a box as the last child of the parent node. */ *************** *** 497,506 **** { struct eqn_box *bp; ! bp = mandoc_calloc(1, sizeof(struct eqn_box)); bp->parent = parent; bp->parent->args++; - bp->expectargs = UINT_MAX; bp->font = bp->parent->font; bp->size = ep->gsize; --- 508,516 ---- { struct eqn_box *bp; ! bp = eqn_box_new(); bp->parent = parent; bp->parent->args++; bp->font = bp->parent->font; bp->size = ep->gsize;