cli: align UTF-8 strings properly

Not all utf-8 characters occupy 1 screen column. Some may be 2-column
wide, some are unprintable - zero columns.
This commit is contained in:
Jiří Klimeš
2010-04-26 17:32:18 +02:00
parent f53a2aeac9
commit d1f63c62f0
2 changed files with 24 additions and 5 deletions

View File

@@ -28,6 +28,7 @@
int matches (const char *cmd, const char *pattern);
int next_arg (int *argc, char ***argv);
char *ssid_to_printable (const char *str, gsize len);
int nmc_string_screen_width (const char *start, const char *end);
GArray *parse_output_fields (const char *fields_str, const NmcOutputField fields_array[], GError **error);
gboolean nmc_terse_option_check (NMCPrintOutput print_output, const char *fields, GError **error);
void print_fields (const NmcPrintFields fields, const NmcOutputField field_values[]);