+
+ } else {
+
+ /* Handle priority 0 entries. */
+
+ if (prio == 0) {
+ if (entry->prio == 0)
+ entry->prio = -1;
+ return;
+ }
+
+ /* A better entry is already present, ignore the new one. */
+
+ if (entry->prio > 0 && entry->prio < prio)
+ return;
+
+ /* The existing entry is worse, clear it. */
+
+ if (entry->prio < 1 || entry->prio > prio)
+ entry->nlines = 0;
+ }
+
+ /* Remember the new line. */
+
+ if (entry->maxlines == entry->nlines) {
+ entry->maxlines += 4;
+ entry->lines = mandoc_reallocarray(entry->lines,
+ entry->maxlines, sizeof(*entry->lines));
+ }
+ entry->lines[entry->nlines++] = line;