From: Max Kellermann Date: Mon, 20 Mar 2017 16:35:59 +0000 (+0100) Subject: screen_interface: make cols/rows unsigned X-Git-Tag: v0.27~34 X-Git-Url: https://git.tokkee.org/?p=ncmpc.git;a=commitdiff_plain;h=e73ca303e9c688dde39ec70b20b7e1f811fe99e8 screen_interface: make cols/rows unsigned --- diff --git a/src/screen_artist.c b/src/screen_artist.c index f8d50d0..2190cbb 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -289,7 +289,7 @@ reload_lists(struct mpdclient *c) } static void -screen_artist_init(WINDOW *w, int cols, int rows) +screen_artist_init(WINDOW *w, unsigned cols, unsigned rows) { browser.lw = list_window_init(w, cols, rows); browser.song_format = options.list_format; @@ -313,7 +313,7 @@ screen_artist_open(struct mpdclient *c) } static void -screen_artist_resize(int cols, int rows) +screen_artist_resize(unsigned cols, unsigned rows) { list_window_resize(browser.lw, cols, rows); } diff --git a/src/screen_chat.c b/src/screen_chat.c index ddbbaf6..f79e73f 100644 --- a/src/screen_chat.c +++ b/src/screen_chat.c @@ -74,7 +74,7 @@ check_chat_support(struct mpdclient *c) } static void -screen_chat_init(WINDOW *w, int cols, int rows) +screen_chat_init(WINDOW *w, unsigned cols, unsigned rows) { screen_text_init(&text, w, cols, rows); } @@ -92,7 +92,7 @@ screen_chat_open(struct mpdclient *c) } static void -screen_chat_resize(int cols, int rows) +screen_chat_resize(unsigned cols, unsigned rows) { screen_text_resize(&text, cols, rows); } diff --git a/src/screen_file.c b/src/screen_file.c index 5399c85..06cb5ea 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -235,7 +235,7 @@ handle_delete(struct mpdclient *c) } static void -screen_file_init(WINDOW *w, int cols, int rows) +screen_file_init(WINDOW *w, unsigned cols, unsigned rows) { current_path = g_strdup(""); @@ -244,7 +244,7 @@ screen_file_init(WINDOW *w, int cols, int rows) } static void -screen_file_resize(int cols, int rows) +screen_file_resize(unsigned cols, unsigned rows) { list_window_resize(browser.lw, cols, rows); } diff --git a/src/screen_help.c b/src/screen_help.c index c1a592f..6ce641b 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -215,7 +215,7 @@ list_callback(unsigned i, gcc_unused void *data) } static void -help_init(WINDOW *w, int cols, int rows) +help_init(WINDOW *w, unsigned cols, unsigned rows) { lw = list_window_init(w, cols, rows); lw->hide_cursor = true; @@ -223,7 +223,7 @@ help_init(WINDOW *w, int cols, int rows) } static void -help_resize(int cols, int rows) +help_resize(unsigned cols, unsigned rows) { list_window_resize(lw, cols, rows); } diff --git a/src/screen_interface.h b/src/screen_interface.h index 40796bc..8296242 100644 --- a/src/screen_interface.h +++ b/src/screen_interface.h @@ -30,11 +30,11 @@ struct mpdclient; struct screen_functions { - void (*init)(WINDOW *w, int cols, int rows); + void (*init)(WINDOW *w, unsigned cols, unsigned rows); void (*exit)(void); void (*open)(struct mpdclient *c); void (*close)(void); - void (*resize)(int cols, int rows); + void (*resize)(unsigned cols, unsigned rows); void (*paint)(void); void (*update)(struct mpdclient *c); diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 44b191c..9a76c1b 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -359,13 +359,13 @@ list_callback(unsigned idx, gcc_unused void *data) } static void -keydef_init(WINDOW *w, int cols, int rows) +keydef_init(WINDOW *w, unsigned cols, unsigned rows) { lw = list_window_init(w, cols, rows); } static void -keydef_resize(int cols, int rows) +keydef_resize(unsigned cols, unsigned rows) { list_window_resize(lw, cols, rows); } diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index b937e79..0bce7c4 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -269,13 +269,13 @@ screen_lyrics_reload(void) } static void -lyrics_screen_init(WINDOW *w, int cols, int rows) +lyrics_screen_init(WINDOW *w, unsigned cols, unsigned rows) { screen_text_init(&text, w, cols, rows); } static void -lyrics_resize(int cols, int rows) +lyrics_resize(unsigned cols, unsigned rows) { screen_text_resize(&text, cols, rows); } diff --git a/src/screen_outputs.c b/src/screen_outputs.c index b2c9590..67cc4b8 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -122,7 +122,7 @@ fill_outputs_list(struct mpdclient *c) } static void -outputs_init(WINDOW *w, int cols, int rows) +outputs_init(WINDOW *w, unsigned cols, unsigned rows) { lw = list_window_init(w, cols, rows); @@ -130,7 +130,7 @@ outputs_init(WINDOW *w, int cols, int rows) } static void -outputs_resize(int cols, int rows) +outputs_resize(unsigned cols, unsigned rows) { list_window_resize(lw, cols, rows); } diff --git a/src/screen_queue.c b/src/screen_queue.c index 5b3b5f7..de6b2a0 100644 --- a/src/screen_queue.c +++ b/src/screen_queue.c @@ -415,7 +415,7 @@ handle_add_to_playlist(struct mpdclient *c) } static void -screen_queue_init(WINDOW *w, int cols, int rows) +screen_queue_init(WINDOW *w, unsigned cols, unsigned rows) { lw = list_window_init(w, cols, rows); @@ -479,7 +479,7 @@ screen_queue_close(void) } static void -screen_queue_resize(int cols, int rows) +screen_queue_resize(unsigned cols, unsigned rows) { list_window_resize(lw, cols, rows); } diff --git a/src/screen_search.c b/src/screen_search.c index 1465602..30be533 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -339,7 +339,7 @@ search_new(struct mpdclient *c) } static void -screen_search_init(WINDOW *w, int cols, int rows) +screen_search_init(WINDOW *w, unsigned cols, unsigned rows) { browser.lw = list_window_init(w, cols, rows); if (options.search_format != NULL) { @@ -377,7 +377,7 @@ screen_search_open(gcc_unused struct mpdclient *c) } static void -screen_search_resize(int cols, int rows) +screen_search_resize(unsigned cols, unsigned rows) { list_window_resize(browser.lw, cols, rows); } diff --git a/src/screen_song.c b/src/screen_song.c index 555490e..086768c 100644 --- a/src/screen_song.c +++ b/src/screen_song.c @@ -122,7 +122,7 @@ screen_song_list_callback(unsigned idx, gcc_unused void *data) static void -screen_song_init(WINDOW *w, int cols, int rows) +screen_song_init(WINDOW *w, unsigned cols, unsigned rows) { for (unsigned i = 0; i < G_N_ELEMENTS(tag_labels); ++i) { if (tag_labels[i] != NULL) { @@ -160,7 +160,7 @@ screen_song_exit(void) } static void -screen_song_resize(int cols, int rows) +screen_song_resize(unsigned cols, unsigned rows) { list_window_resize(lw, cols, rows); } diff --git a/src/screen_text.h b/src/screen_text.h index 92b3ad0..099101f 100644 --- a/src/screen_text.h +++ b/src/screen_text.h @@ -33,7 +33,7 @@ struct screen_text { }; static inline void -screen_text_init(struct screen_text *text, WINDOW *w, int cols, int rows) +screen_text_init(struct screen_text *text, WINDOW *w, unsigned cols, unsigned rows) { text->lines = g_ptr_array_new(); @@ -54,7 +54,7 @@ screen_text_deinit(struct screen_text *text) } static inline void -screen_text_resize(struct screen_text *text, int cols, int rows) +screen_text_resize(struct screen_text *text, unsigned cols, unsigned rows) { list_window_resize(text->lw, cols, rows); }