Lines Matching +full:parent +full:- +full:child
48 p->flags &= ~TERMP_NOSPACE; in term_eqn()
54 const struct eqn_box *child; in eqn_box() local
60 if ((bp->type == EQN_LIST && bp->expectargs > 1) || in eqn_box()
61 (bp->type == EQN_PILE && (bp->prev || bp->next)) || in eqn_box()
62 (bp->parent != NULL && (bp->parent->pos == EQNPOS_SQRT || in eqn_box()
64 ((bp->top != NULL || bp->bottom != NULL) && in eqn_box()
65 bp->parent->type == EQN_SUBEXPR && in eqn_box()
66 bp->parent->pos != EQNPOS_OVER && bp->next != NULL) || in eqn_box()
68 (bp->type == EQN_SUBEXPR && bp->pos != EQNPOS_SQRT && in eqn_box()
69 ((bp->parent->type == EQN_LIST && bp->expectargs == 1) || in eqn_box()
70 (bp->parent->type == EQN_SUBEXPR && in eqn_box()
71 bp->pos != EQNPOS_SQRT)))))) { in eqn_box()
72 if ((bp->parent->type == EQN_SUBEXPR && bp->prev != NULL) || in eqn_box()
73 (bp->type == EQN_LIST && in eqn_box()
74 bp->first != NULL && in eqn_box()
75 bp->first->type != EQN_PILE && in eqn_box()
76 bp->first->type != EQN_MATRIX && in eqn_box()
77 bp->prev != NULL && in eqn_box()
78 (bp->prev->type == EQN_LIST || in eqn_box()
79 (bp->prev->type == EQN_TEXT && in eqn_box()
80 (*bp->prev->text == '\\' || in eqn_box()
81 isalpha((unsigned char)*bp->prev->text)))))) in eqn_box()
82 p->flags |= TERMP_NOSPACE; in eqn_box()
83 term_word(p, bp->left != NULL ? bp->left : "("); in eqn_box()
84 p->flags |= TERMP_NOSPACE; in eqn_box()
91 if (bp->font != EQNFONT_NONE) in eqn_box()
92 term_fontpush(p, fontmap[(int)bp->font]); in eqn_box()
94 if (bp->text != NULL) { in eqn_box()
95 if (strchr("!\"'),.:;?]}", *bp->text) != NULL) in eqn_box()
96 p->flags |= TERMP_NOSPACE; in eqn_box()
97 term_word(p, bp->text); in eqn_box()
98 if ((cp = strchr(bp->text, '\0')) > bp->text && in eqn_box()
99 (strchr("\"'([{", cp[-1]) != NULL || in eqn_box()
100 (bp->prev == NULL && (cp[-1] == '-' || in eqn_box()
101 (cp >= bp->text + 5 && in eqn_box()
102 strcmp(cp - 5, "\\[mi]") == 0))))) in eqn_box()
103 p->flags |= TERMP_NOSPACE; in eqn_box()
108 if (bp->pos == EQNPOS_SQRT) { in eqn_box()
110 if (bp->first != NULL) { in eqn_box()
111 p->flags |= TERMP_NOSPACE; in eqn_box()
112 eqn_box(p, bp->first); in eqn_box()
114 } else if (bp->type == EQN_SUBEXPR) { in eqn_box()
115 child = bp->first; in eqn_box()
116 eqn_box(p, child); in eqn_box()
117 p->flags |= TERMP_NOSPACE; in eqn_box()
118 term_word(p, bp->pos == EQNPOS_OVER ? "/" : in eqn_box()
119 (bp->pos == EQNPOS_SUP || in eqn_box()
120 bp->pos == EQNPOS_TO) ? "^" : "_"); in eqn_box()
121 child = child->next; in eqn_box()
122 if (child != NULL) { in eqn_box()
123 p->flags |= TERMP_NOSPACE; in eqn_box()
124 eqn_box(p, child); in eqn_box()
125 if (bp->pos == EQNPOS_FROMTO || in eqn_box()
126 bp->pos == EQNPOS_SUBSUP) { in eqn_box()
127 p->flags |= TERMP_NOSPACE; in eqn_box()
129 p->flags |= TERMP_NOSPACE; in eqn_box()
130 child = child->next; in eqn_box()
131 if (child != NULL) in eqn_box()
132 eqn_box(p, child); in eqn_box()
136 child = bp->first; in eqn_box()
137 if (bp->type == EQN_MATRIX && in eqn_box()
138 child != NULL && in eqn_box()
139 child->type == EQN_LIST && in eqn_box()
140 child->expectargs > 1) in eqn_box()
141 child = child->first; in eqn_box()
142 while (child != NULL) { in eqn_box()
144 bp->type == EQN_PILE && in eqn_box()
145 child->type == EQN_LIST && in eqn_box()
146 child->expectargs > 1 && in eqn_box()
147 child->args == 1 ? in eqn_box()
148 child->first : child); in eqn_box()
149 child = child->next; in eqn_box()
155 if (bp->font != EQNFONT_NONE) in eqn_box()
157 if (bp->top != NULL) { in eqn_box()
158 p->flags |= TERMP_NOSPACE; in eqn_box()
159 term_word(p, bp->top); in eqn_box()
161 if (bp->bottom != NULL) { in eqn_box()
162 p->flags |= TERMP_NOSPACE; in eqn_box()
169 p->flags |= TERMP_NOSPACE; in eqn_box()
170 term_word(p, bp->right != NULL ? bp->right : ")"); in eqn_box()
171 if (bp->parent->type == EQN_SUBEXPR && bp->next != NULL) in eqn_box()
172 p->flags |= TERMP_NOSPACE; in eqn_box()