=================================================================== RCS file: /cvs/mandoc/eqn.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -p -r1.72 -r1.73 --- mandoc/eqn.c 2017/06/29 16:31:15 1.72 +++ mandoc/eqn.c 2017/07/05 15:03:27 1.73 @@ -1,4 +1,4 @@ -/* $Id: eqn.c,v 1.72 2017/06/29 16:31:15 schwarze Exp $ */ +/* $Id: eqn.c,v 1.73 2017/07/05 15:03:27 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2017 Ingo Schwarze @@ -729,7 +729,7 @@ next_tok: cur->text = mandoc_strdup(""); } parent = eqn_box_makebinary(ep, EQNPOS_NONE, parent); - parent->type = EQN_LISTONE; + parent->type = EQN_LIST; parent->expectargs = 1; parent->font = EQNFONT_ROMAN; switch (tok) { @@ -782,7 +782,7 @@ next_tok: * exactly one of those. */ parent = eqn_box_alloc(ep, parent); - parent->type = EQN_LISTONE; + parent->type = EQN_LIST; parent->expectargs = 1; switch (tok) { case EQN_TOK_FAT: @@ -820,7 +820,7 @@ next_tok: break; } parent = eqn_box_alloc(ep, parent); - parent->type = EQN_LISTONE; + parent->type = EQN_LIST; parent->expectargs = 1; parent->size = size; break; @@ -908,6 +908,7 @@ next_tok: */ for (cur = parent; cur != NULL; cur = cur->parent) if (cur->type == EQN_LIST && + cur->expectargs > 1 && (tok == EQN_TOK_BRACE_CLOSE || cur->left != NULL)) break; @@ -939,8 +940,9 @@ next_tok: parent->type == EQN_MATRIX)) parent = parent->parent; /* Close out any "singleton" lists. */ - while (parent->type == EQN_LISTONE && - parent->args == parent->expectargs) + while (parent->type == EQN_LIST && + parent->expectargs == 1 && + parent->args == 1) parent = parent->parent; break; case EQN_TOK_BRACE_OPEN: @@ -1100,8 +1102,9 @@ next_tok: /* * Post-process list status. */ - while (parent->type == EQN_LISTONE && - parent->args == parent->expectargs) + while (parent->type == EQN_LIST && + parent->expectargs == 1 && + parent->args == 1) parent = parent->parent; break; default: