@@ -67,7 +67,7 @@ struct interval {
6767};
6868
6969/* auxiliary function for binary search in interval table */
70−static int bisearch(wchar_t ucs, const struct interval *table, int max) {
70+static int vty_bisearch(wchar_t ucs, const struct interval *table, int max) {
7171 int min = 0;
7272 int mid;
7373
@@ -119,7 +119,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max) {
119119 * in ISO 10646.
120120 */
121121
122−int mk_wcwidth(wchar_t ucs)
122+int vty_mk_wcwidth(wchar_t ucs)
123123{
124124 /* sorted list of non-overlapping intervals of non-spacing characters */
125125 /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
@@ -181,7 +181,7 @@ int mk_wcwidth(wchar_t ucs)
181181 return -1;
182182
183183 /* binary search in table of non-spacing characters */
184− if (bisearch(ucs, combining,
184+ if (vty_bisearch(ucs, combining,
185185 sizeof(combining) / sizeof(struct interval) - 1))
186186 return 0;
187187
@@ -204,12 +204,12 @@ int mk_wcwidth(wchar_t ucs)
204204}
205205
206206
207−int mk_wcswidth(const wchar_t *pwcs, size_t n)
207+int vty_mk_wcswidth(const wchar_t *pwcs, size_t n)
208208{
209209 int w, width = 0;
210210
211211 for (;n-- > 0; pwcs++)
212− if ((w = mk_wcwidth(*pwcs)) < 0)
212+ if ((w = vty_mk_wcwidth(*pwcs)) < 0)
213213 return -1;
214214 else
215215 width += w;
@@ -227,7 +227,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
227227 * the traditional terminal character-width behaviour. It is not
228228 * otherwise recommended for general use.
229229 */
230−int mk_wcwidth_cjk(wchar_t ucs)
230+int vty_mk_wcwidth_cjk(wchar_t ucs)
231231{
232232 /* sorted list of non-overlapping intervals of East Asian Ambiguous
233233 * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
@@ -287,20 +287,20 @@ int mk_wcwidth_cjk(wchar_t ucs)
287287 };
288288
289289 /* binary search in table of non-spacing characters */
290− if (bisearch(ucs, ambiguous,
290+ if (vty_bisearch(ucs, ambiguous,
291291 sizeof(ambiguous) / sizeof(struct interval) - 1))
292292 return 2;
293293
294− return mk_wcwidth(ucs);
294+ return vty_mk_wcwidth(ucs);
295295}
296296
297297
298−int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
298+int vty_mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
299299{
300300 int w, width = 0;
301301
302302 for (;n-- > 0; pwcs++)
303− if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
303+ if ((w = vty_mk_wcwidth_cjk(*pwcs)) < 0)
304304 return -1;
305305 else
306306 width += w;