| 1 #include "gntutils.h" |
1 #include "gntutils.h" |
| 2 |
2 |
| 3 #include <stdlib.h> |
3 #include <stdlib.h> |
| 4 #include <string.h> |
4 #include <string.h> |
| 5 #include <wchar.h> |
|
| 6 |
5 |
| 7 #include "config.h" |
6 #include "config.h" |
| 8 |
7 |
| 9 #ifndef HAVE_WCWIDTH |
8 #ifndef HAVE_WCWIDTH |
| 10 #define wcwidth(X) 1 |
9 #define wcwidth(X) 1 |
| |
10 #else |
| |
11 #define __USE_XOPEN |
| 11 #endif |
12 #endif |
| |
13 |
| |
14 #include <wchar.h> |
| 12 |
15 |
| 13 void gnt_util_get_text_bound(const char *text, int *width, int *height) |
16 void gnt_util_get_text_bound(const char *text, int *width, int *height) |
| 14 { |
17 { |
| 15 const char *s = text, *last; |
18 const char *s = text, *last; |
| 16 int count = 1, max = 0; |
19 int count = 1, max = 0; |