View | Details | Raw Unified | Return to bug 205707 | Differences between
and this patch

Collapse All | Expand All

(-)vtfontcvt.c (-5 / +9 lines)
Lines 109-115 Link Here
109
static int
109
static int
110
add_mapping(struct glyph *gl, unsigned int c, unsigned int map_idx)
110
add_mapping(struct glyph *gl, unsigned int c, unsigned int map_idx)
111
{
111
{
112
	struct mapping *mp;
112
	struct mapping *mp, *mp_temp = NULL;
113
	struct mapping_list *ml;
113
	struct mapping_list *ml;
114
114
115
	mapping_total++;
115
	mapping_total++;
Lines 120-129 Link Here
120
	mp->m_length = 0;
120
	mp->m_length = 0;
121
121
122
	ml = &maps[map_idx];
122
	ml = &maps[map_idx];
123
	if (TAILQ_LAST(ml, mapping_list) != NULL &&
123
	TAILQ_FOREACH(mp_temp, ml, m_list) {
124
	    TAILQ_LAST(ml, mapping_list)->m_char >= c)
124
		if (mp_temp->m_char >= c)
125
		errx(1, "Bad ordering at character %u\n", c);
125
			break;
126
	TAILQ_INSERT_TAIL(ml, mp, m_list);
126
	}
127
	if (mp_temp == NULL)
128
		TAILQ_INSERT_TAIL(ml, mp, m_list);
129
	else
130
		TAILQ_INSERT_BEFORE(mp_temp, mp, m_list);
127
131
128
	map_count[map_idx]++;
132
	map_count[map_idx]++;
129
	mapping_unique++;
133
	mapping_unique++;

Return to bug 205707