"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "eqn_term.c" between
mdocml-1.14.1rc1.tar.gz and mdocml-1.14.1rc2.tar.gz

About: mdocml is a suite of tools compiling "-mdoc", the roff macro package of choice for BSD manual pages, and "-man", the predominant historical package for UNIX manuals. Hint: The installed binary name is "mandoc". Release candidate.

eqn_term.c  (mdocml-1.14.1rc1):eqn_term.c  (mdocml-1.14.1rc2)
/* $Id: eqn_term.c,v 1.8 2015/01/01 15:36:08 schwarze Exp $ */ /* $Id: eqn_term.c,v 1.9 2017/02/12 14:19:01 schwarze Exp $ */
/* /*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies. * copyright notice and this permission notice appear in all copies.
* *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
skipping to change at line 70 skipping to change at line 70
p->flags |= TERMP_NOSPACE; p->flags |= TERMP_NOSPACE;
} }
if (bp->font != EQNFONT_NONE) if (bp->font != EQNFONT_NONE)
term_fontpush(p, fontmap[(int)bp->font]); term_fontpush(p, fontmap[(int)bp->font]);
if (bp->text != NULL) if (bp->text != NULL)
term_word(p, bp->text); term_word(p, bp->text);
if (bp->pos == EQNPOS_SQRT) { if (bp->pos == EQNPOS_SQRT) {
term_word(p, "sqrt"); term_word(p, "sqrt");
p->flags |= TERMP_NOSPACE; if (bp->first != NULL) {
eqn_box(p, bp->first); p->flags |= TERMP_NOSPACE;
eqn_box(p, bp->first);
}
} else if (bp->type == EQN_SUBEXPR) { } else if (bp->type == EQN_SUBEXPR) {
child = bp->first; child = bp->first;
eqn_box(p, child); eqn_box(p, child);
p->flags |= TERMP_NOSPACE; p->flags |= TERMP_NOSPACE;
term_word(p, bp->pos == EQNPOS_OVER ? "/" : term_word(p, bp->pos == EQNPOS_OVER ? "/" :
(bp->pos == EQNPOS_SUP || (bp->pos == EQNPOS_SUP ||
bp->pos == EQNPOS_TO) ? "^" : "_"); bp->pos == EQNPOS_TO) ? "^" : "_");
p->flags |= TERMP_NOSPACE; p->flags |= TERMP_NOSPACE;
child = child->next; child = child->next;
if (child != NULL) { if (child != NULL) {
skipping to change at line 95 skipping to change at line 97
p->flags |= TERMP_NOSPACE; p->flags |= TERMP_NOSPACE;
term_word(p, "^"); term_word(p, "^");
p->flags |= TERMP_NOSPACE; p->flags |= TERMP_NOSPACE;
child = child->next; child = child->next;
if (child != NULL) if (child != NULL)
eqn_box(p, child); eqn_box(p, child);
} }
} }
} else { } else {
child = bp->first; child = bp->first;
if (bp->type == EQN_MATRIX && child->type == EQN_LIST) if (bp->type == EQN_MATRIX &&
child != NULL && child->type == EQN_LIST)
child = child->first; child = child->first;
while (child != NULL) { while (child != NULL) {
eqn_box(p, eqn_box(p,
bp->type == EQN_PILE && bp->type == EQN_PILE &&
child->type == EQN_LIST && child->type == EQN_LIST &&
child->args == 1 ? child->args == 1 ?
child->first : child); child->first : child);
child = child->next; child = child->next;
} }
} }
 End of changes. 4 change blocks. 
5 lines changed or deleted 8 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS