basic implementation of main_window component and file list fixes
This commit is contained in:
+4
-2
@@ -30,11 +30,13 @@ int64_t u_utf8_conver_to_wide(const char *utf8_str, wchar_t **restrict wide_str,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str) {
|
||||
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str, int max_len) {
|
||||
wchar_t *wname = NULL;
|
||||
size_t nsize = 0;
|
||||
u_utf8_conver_to_wide(utf8_str, &wname, &nsize);
|
||||
mvwaddwstr(win, y, x, wname);
|
||||
/* mvwaddwstr(win, y, x, wname); */
|
||||
wmove(win,(y),(x));
|
||||
waddnwstr(win, wname, max_len);
|
||||
free(wname);
|
||||
return nsize;
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@
|
||||
size_t u_utf8_code_points_count(const char *s);
|
||||
int64_t u_utf8_convert_to_wide(const char *utf8_str, wchar_t **restrict wide_str,
|
||||
size_t *restrict len);
|
||||
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str);
|
||||
int64_t u_utf8_curs_printw(WINDOW *win, int64_t y, int64_t x, char *const utf8_str, int max_len);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user