From: Max Kellermann Date: Fri, 9 Oct 2009 18:28:25 +0000 (+0200) Subject: list_window: removed the list_window_t typedef X-Git-Tag: release-0.16~159 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b398de1a003fafd0b140dbe82f543f515102fed4;p=ncmpc.git list_window: removed the list_window_t typedef Use the plain struct name "list_window". --- diff --git a/src/list_window.c b/src/list_window.c index 6f6c34c..92eaba5 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -39,7 +39,7 @@ list_window_init(WINDOW *w, unsigned width, unsigned height) { struct list_window *lw; - lw = g_malloc0(sizeof(list_window_t)); + lw = g_malloc0(sizeof(*lw)); lw->w = w; lw->cols = width; lw->rows = height; diff --git a/src/list_window.h b/src/list_window.h index e99c45f..68abd4d 100644 --- a/src/list_window.h +++ b/src/list_window.h @@ -37,7 +37,7 @@ typedef const char *(*list_window_callback_fn_t)(unsigned index, char **second_column, void *data); -typedef struct list_window { +struct list_window { WINDOW *w; unsigned rows, cols; @@ -49,8 +49,7 @@ typedef struct list_window { bool range_selection; /* range selection activated */ bool hide_cursor; -} list_window_t; - +}; /* create a new list window */ struct list_window *list_window_init(WINDOW *w, diff --git a/src/screen_find.c b/src/screen_find.c index f779961..0e93b4f 100644 --- a/src/screen_find.c +++ b/src/screen_find.c @@ -31,7 +31,7 @@ /* query user for a string and find it in a list window */ int -screen_find(list_window_t *lw, +screen_find(struct list_window *lw, int rows, command_t findcmd, list_window_callback_fn_t callback_fn, diff --git a/src/screen_help.c b/src/screen_help.c index 6f4850b..0ce3bd8 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -179,7 +179,7 @@ static help_text_row_t help_text[] = { #define help_text_rows (sizeof(help_text) / sizeof(help_text[0])) -static list_window_t *lw; +static struct list_window *lw; static const char * list_callback(unsigned idx, bool *highlight, G_GNUC_UNUSED char** second_column, G_GNUC_UNUSED void *data) diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 28822e5..bc3115c 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -42,7 +42,7 @@ #define LIST_ITEM_APPLY_LABEL _("===> Apply key bindings ") -static list_window_t *lw = NULL; +static struct list_window *lw; static unsigned command_list_length = 0; static command_definition_t *cmds = NULL; diff --git a/src/screen_outputs.c b/src/screen_outputs.c index c1660b3..4857e48 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -29,7 +29,7 @@ #include #include -static list_window_t *lw = NULL; +static struct list_window *lw; static GPtrArray *mpd_outputs = NULL; diff --git a/src/screen_play.c b/src/screen_play.c index 632944f..cfe1c0f 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -63,7 +63,7 @@ static guint scroll_source_id; static struct mpdclient_playlist *playlist; static int current_song_id = -1; static int selected_song_id = -1; -static list_window_t *lw = NULL; +static struct list_window *lw; static guint timer_hide_cursor_id; static void diff --git a/src/screen_song.c b/src/screen_song.c index 9d42eb4..01e2e34 100644 --- a/src/screen_song.c +++ b/src/screen_song.c @@ -34,7 +34,7 @@ #include #include -static list_window_t *lw; +static struct list_window *lw; static struct mpd_song *next_song;