diff --git a/src/screen_list.c b/src/screen_list.c
index 46e6244180756fbc72614626afc4761e2489eb30..76ae8b155c53978580ac3237364fcbfe18771e19 100644 (file)
--- a/src/screen_list.c
+++ b/src/screen_list.c
}
}
-int
-screen_get_id_by_index(unsigned i)
-{
- assert(i < NUM_SCREENS);
-
- return screens[i].id;
-}
-
const char *
screen_get_name(unsigned i)
{
return screens[i].name;
}
-int
-screen_get_id(const char *name)
+const struct screen_functions *
+screen_lookup_name(const char *name)
{
unsigned i;
for (i = 0; i < NUM_SCREENS; ++i)
if (strcmp(name, screens[i].name) == 0)
- return screens[i].id;
+ return screens[i].functions;
- return -1;
+ return NULL;
}
const struct screen_functions *
}
int
-lookup_mode(int id)
+lookup_mode(const struct screen_functions *sf)
{
unsigned i;
for (i = 0; i < NUM_SCREENS; ++i)
- if (screens[i].id == id)
+ if (screens[i].functions == sf)
return i;
return -1;