+int
+strwidth(const char *s)
+{
+ assert(s);
+#ifdef HANDLE_MULTIBYTE
+ return (int)mbswidth(s, 0);
+#else
+ return strlen(s);
+#endif
+}
+
+int
+bytes2width(const char *s, int width)
+{
+ assert(s);
+#ifdef HANDLE_MULTIBYTE
+ return mbsnbytes(s, strlen(s), width, 0);
+#else
+ return width;
+#endif
+}
+