Code

screen_interface: make cols/rows unsigned
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 16:35:59 +0000 (17:35 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 16:35:59 +0000 (17:35 +0100)
12 files changed:
src/screen_artist.c
src/screen_chat.c
src/screen_file.c
src/screen_help.c
src/screen_interface.h
src/screen_keydef.c
src/screen_lyrics.c
src/screen_outputs.c
src/screen_queue.c
src/screen_search.c
src/screen_song.c
src/screen_text.h

index f8d50d0c096def9358075320d970d75811e12992..2190cbbff54a7f3b4aed0068a47f9cb7d4c52df0 100644 (file)
@@ -289,7 +289,7 @@ reload_lists(struct mpdclient *c)
 }
 
 static void
 }
 
 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;
 {
        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
 }
 
 static void
-screen_artist_resize(int cols, int rows)
+screen_artist_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(browser.lw, cols, rows);
 }
 {
        list_window_resize(browser.lw, cols, rows);
 }
index ddbbaf6fe5f37e20e529ce3b8e74b5fe99fe302d..f79e73fcf7b0195b2a97885a6b0ab0e6ee640e36 100644 (file)
@@ -74,7 +74,7 @@ check_chat_support(struct mpdclient *c)
 }
 
 static void
 }
 
 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);
 }
 {
        screen_text_init(&text, w, cols, rows);
 }
@@ -92,7 +92,7 @@ screen_chat_open(struct mpdclient *c)
 }
 
 static void
 }
 
 static void
-screen_chat_resize(int cols, int rows)
+screen_chat_resize(unsigned cols, unsigned rows)
 {
        screen_text_resize(&text, cols, rows);
 }
 {
        screen_text_resize(&text, cols, rows);
 }
index 5399c85d3bfe5c7fed1aea468321e2b8a23e813e..06cb5ea6124a1d1878ce2fa86ef6346dfe3e5e31 100644 (file)
@@ -235,7 +235,7 @@ handle_delete(struct mpdclient *c)
 }
 
 static void
 }
 
 static void
-screen_file_init(WINDOW *w, int cols, int rows)
+screen_file_init(WINDOW *w, unsigned cols, unsigned rows)
 {
        current_path = g_strdup("");
 
 {
        current_path = g_strdup("");
 
@@ -244,7 +244,7 @@ screen_file_init(WINDOW *w, int cols, int rows)
 }
 
 static void
 }
 
 static void
-screen_file_resize(int cols, int rows)
+screen_file_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(browser.lw, cols, rows);
 }
 {
        list_window_resize(browser.lw, cols, rows);
 }
index c1a592f253a269995b77b77425789551114b98a7..6ce641b130fefc2d767d72f6e25952f744c0fced 100644 (file)
@@ -215,7 +215,7 @@ list_callback(unsigned i, gcc_unused void *data)
 }
 
 static void
 }
 
 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;
 {
        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
 }
 
 static void
-help_resize(int cols, int rows)
+help_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(lw, cols, rows);
 }
 {
        list_window_resize(lw, cols, rows);
 }
index 40796bc33c769ee305ec196f2dbb763723727997..82962420f8c064ce11a90ae3e14e6e7b2910d31d 100644 (file)
 struct mpdclient;
 
 struct screen_functions {
 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 (*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);
 
        void (*paint)(void);
        void (*update)(struct mpdclient *c);
 
index 44b191c26d0a40672473faf6c94b7193b66ca8f7..9a76c1bf1baf4c2a5a6d8e18eef802a4b1d6248e 100644 (file)
@@ -359,13 +359,13 @@ list_callback(unsigned idx, gcc_unused void *data)
 }
 
 static void
 }
 
 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
 {
        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);
 }
 {
        list_window_resize(lw, cols, rows);
 }
index b937e79bc3792ca16030d766178989d746faec9c..0bce7c4c54bdd702afcbc74a435c37f546c34824 100644 (file)
@@ -269,13 +269,13 @@ screen_lyrics_reload(void)
 }
 
 static 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
 {
        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);
 }
 {
        screen_text_resize(&text, cols, rows);
 }
index b2c9590afec535359b57ed9caf0b3215dc2ec0bd..67cc4b86fbc0073e0d986f19e95b8f0d71d373cf 100644 (file)
@@ -122,7 +122,7 @@ fill_outputs_list(struct mpdclient *c)
 }
 
 static void
 }
 
 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);
 
 {
        lw = list_window_init(w, cols, rows);
 
@@ -130,7 +130,7 @@ outputs_init(WINDOW *w, int cols, int rows)
 }
 
 static void
 }
 
 static void
-outputs_resize(int cols, int rows)
+outputs_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(lw, cols, rows);
 }
 {
        list_window_resize(lw, cols, rows);
 }
index 5b3b5f74cf005528e11d90df42715fd71da55267..de6b2a09627f19d7781b5cece0cc225283f396b3 100644 (file)
@@ -415,7 +415,7 @@ handle_add_to_playlist(struct mpdclient *c)
 }
 
 static void
 }
 
 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);
 
 {
        lw = list_window_init(w, cols, rows);
 
@@ -479,7 +479,7 @@ screen_queue_close(void)
 }
 
 static void
 }
 
 static void
-screen_queue_resize(int cols, int rows)
+screen_queue_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(lw, cols, rows);
 }
 {
        list_window_resize(lw, cols, rows);
 }
index 1465602ed2537fe49178acebb64cf99f2504c2ca..30be533baf66d63875173637ce0f0a5858e8035a 100644 (file)
@@ -339,7 +339,7 @@ search_new(struct mpdclient *c)
 }
 
 static void
 }
 
 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) {
 {
        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
 }
 
 static void
-screen_search_resize(int cols, int rows)
+screen_search_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(browser.lw, cols, rows);
 }
 {
        list_window_resize(browser.lw, cols, rows);
 }
index 555490ea7a7d99545a9e0d6f8c60072ae5eedc05..086768cec6b058f353604cf1b3df2bfd35156846 100644 (file)
@@ -122,7 +122,7 @@ screen_song_list_callback(unsigned idx, gcc_unused void *data)
 
 
 static void
 
 
 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) {
 {
        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
 }
 
 static void
-screen_song_resize(int cols, int rows)
+screen_song_resize(unsigned cols, unsigned rows)
 {
        list_window_resize(lw, cols, rows);
 }
 {
        list_window_resize(lw, cols, rows);
 }
index 92b3ad0d04edb464666cb8c671f624c3511087e0..099101f38bb309ac4b70b3be7064465e67afd536 100644 (file)
@@ -33,7 +33,7 @@ struct screen_text {
 };
 
 static inline void
 };
 
 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();
 
 {
        text->lines = g_ptr_array_new();
 
@@ -54,7 +54,7 @@ screen_text_deinit(struct screen_text *text)
 }
 
 static inline void
 }
 
 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);
 }
 {
        list_window_resize(text->lw, cols, rows);
 }