summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ef5bed)
raw | patch | inline | side by side (parent: 8ef5bed)
author | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 22:58:40 +0000 (00:58 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 22:58:40 +0000 (00:58 +0200) |
Declaring empty methods is of no use. If a method is empty, we should
set it to NULL in the screen_functions struct.
set it to NULL in the screen_functions struct.
src/screen_artist.c | patch | blob | history | |
src/screen_clock.c | patch | blob | history | |
src/screen_file.c | patch | blob | history | |
src/screen_search.c | patch | blob | history |
diff --git a/src/screen_artist.c b/src/screen_artist.c
index fb10afc3ca4fe7b0fdbe7edbcc58f335be1ca683..0798210b5b3e6331bc909c543a95a53a03da0e9b 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
lw->rows = rows;
}
-static void
-close(void)
-{
-}
-
static void
paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
{
.init = init,
.exit = quit,
.open = open,
- .close = close,
.resize = resize,
.paint = paint,
.update = update,
diff --git a/src/screen_clock.c b/src/screen_clock.c
index 11d2da1b2dbd15f168ea2a936a3604c50c633105..cba8acdb5fee767aaa622ddc3d13c846fbf46fe0 100644 (file)
--- a/src/screen_clock.c
+++ b/src/screen_clock.c
clock_resize(cols, rows);
}
-static void
-clock_exit(void)
-{
-}
-
-static void
-clock_open(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
-{
- int j;
-
- for (j = 0; j < 5; j++)
- older[j] = newer[j] = next[j] = 0;
-
-}
-
-static void
-clock_close(void)
-{
-}
-
static const char *
clock_title(mpd_unused char *str, mpd_unused size_t size)
{
clock_update(screen, c);
}
-static int
-clock_cmd(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c,
- mpd_unused command_t cmd)
-{
- return 0;
-}
-
const struct screen_functions screen_clock = {
.init = clock_init,
- .exit = clock_exit,
- .open = clock_open,
- .close = clock_close,
.resize = clock_resize,
.paint = clock_paint,
.update = clock_update,
- .cmd = clock_cmd,
.get_title = clock_title,
};
diff --git a/src/screen_file.c b/src/screen_file.c
index 7fd86f64519712d3b0da24c5074aaf3af674994d..7465ff1255703d3f47b0a7884579f09c99e0d713 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
}
}
-static void
-browse_close(void)
-{
-}
-
static const char *
browse_title(char *str, size_t size)
{
.init = browse_init,
.exit = browse_exit,
.open = browse_open,
- .close = browse_close,
.resize = browse_resize,
.paint = browse_paint,
.update = browse_update,
diff --git a/src/screen_search.c b/src/screen_search.c
index ce23b9098880613994f8fdfb76591c2578bb2606..d1b2b92d54eb6e9c36606d41629f90002359145b 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
lw->rows = rows;
}
-static void
-close(void)
-{
-}
-
static void
paint(mpd_unused screen_t *screen, mpdclient_t *c)
{
.init = init,
.exit = quit,
.open = open,
- .close = close,
.resize = resize,
.paint = paint,
.update = update,