@@ -67,7 +67,7 @@ struct interval {
69/* auxiliary function for binary search in interval table */
69/* 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) {
71 int min = 0;
71 int min = 0;
@@ -119,7 +119,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max) {
119 * in ISO 10646.
119 * in ISO 10646.
122−int mk_wcwidth(wchar_t ucs)
122+int vty_mk_wcwidth(wchar_t ucs)
124 /* sorted list of non-overlapping intervals of non-spacing characters */
124 /* sorted list of non-overlapping intervals of non-spacing characters */
125 /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
125 /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
@@ -181,7 +181,7 @@ int mk_wcwidth(wchar_t ucs)
181 return -1;
181 return -1;
183 /* binary search in table of non-spacing characters */
183 /* binary search in table of non-spacing characters */
184− if (bisearch(ucs, combining,
184+ if (vty_bisearch(ucs, combining,
185 sizeof(combining) / sizeof(struct interval) - 1))
185 sizeof(combining) / sizeof(struct interval) - 1))
186 return 0;
186 return 0;
@@ -204,12 +204,12 @@ int mk_wcwidth(wchar_t ucs)
207−int mk_wcswidth(const wchar_t *pwcs, size_t n)
207+int vty_mk_wcswidth(const wchar_t *pwcs, size_t n)
209 int w, width = 0;
209 int w, width = 0;
211 for (;n-- > 0; pwcs++)
211 for (;n-- > 0; pwcs++)
212− if ((w = mk_wcwidth(*pwcs)) < 0)
212+ if ((w = vty_mk_wcwidth(*pwcs)) < 0)
213 return -1;
213 return -1;
215 width += w;
215 width += w;
@@ -227,7 +227,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
227 * the traditional terminal character-width behaviour. It is not
227 * the traditional terminal character-width behaviour. It is not
228 * otherwise recommended for general use.
228 * otherwise recommended for general use.
230−int mk_wcwidth_cjk(wchar_t ucs)
230+int vty_mk_wcwidth_cjk(wchar_t ucs)
232 /* sorted list of non-overlapping intervals of East Asian Ambiguous
232 /* sorted list of non-overlapping intervals of East Asian Ambiguous
233 * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
233 * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
@@ -287,20 +287,20 @@ int mk_wcwidth_cjk(wchar_t ucs)
289 /* binary search in table of non-spacing characters */
289 /* binary search in table of non-spacing characters */
290− if (bisearch(ucs, ambiguous,
290+ if (vty_bisearch(ucs, ambiguous,
291 sizeof(ambiguous) / sizeof(struct interval) - 1))
291 sizeof(ambiguous) / sizeof(struct interval) - 1))
292 return 2;
292 return 2;
294− return mk_wcwidth(ucs);
294+ return vty_mk_wcwidth(ucs);
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)
300 int w, width = 0;
300 int w, width = 0;
302 for (;n-- > 0; pwcs++)
302 for (;n-- > 0; pwcs++)
303− if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
303+ if ((w = vty_mk_wcwidth_cjk(*pwcs)) < 0)
304 return -1;
304 return -1;
306 width += w;
306 width += w;