little style fixes

This commit is contained in:
Michael Stapelberg
2011-11-21 21:48:24 +00:00
parent 344c04af12
commit 561cf3719f
9 changed files with 27 additions and 39 deletions

View File

@ -119,7 +119,7 @@ static int workspaces_string_cb(void *params_, const unsigned char *val, unsigne
params->workspaces_walk->name[len] = '\0';
/* Convert the name to ucs2, save its length in glyphs and calculate its rendered width */
int ucs2_len;
size_t ucs2_len;
xcb_char2b_t *ucs2_name = (xcb_char2b_t*) convert_utf8_to_ucs2(params->workspaces_walk->name, &ucs2_len);
params->workspaces_walk->ucs2_name = ucs2_name;
params->workspaces_walk->name_glyphs = ucs2_len;

View File

@ -104,13 +104,13 @@ int _xcb_request_failed(xcb_void_cookie_t cookie, char *err_msg, int line) {
*
*/
void refresh_statusline() {
int glyph_count;
size_t glyph_count;
if (statusline == NULL) {
return;
}
xcb_char2b_t *text = (xcb_char2b_t*) convert_utf8_to_ucs2(statusline, &glyph_count);
xcb_char2b_t *text = (xcb_char2b_t*)convert_utf8_to_ucs2(statusline, &glyph_count);
uint32_t old_statusline_width = statusline_width;
statusline_width = predict_text_width((char*)text, glyph_count, true);
/* If the statusline is bigger than our screen we need to make sure that