diff --git a/sortix.c b/sortix.c index bfe12de..dc9712a 100644 --- a/sortix.c +++ b/sortix.c @@ -1,12 +1,42 @@ +/* sortix.c + * Sortix display(1) support + * (c) 2021 Juhani 'nortti' Krekelä + * This file is a part of the Links program, released under GPL. + */ + #include "cfg.h" #ifdef GRDRV_SORTIX +#include +#include //debg +#include + #include "links.h" +struct display_connection* sortix_display; + +unsigned char *sortix_init_driver(unsigned char *param, unsigned char *display) +{ + if (param && *param) + errx(1, "param %s", param); + if (display && *display) + errx(1, "display %s", display); + + sortix_display = display_connect_default(); + if (!sortix_display && errno == ECONNREFUSED) + return "TODO: display_spawn"; + + if ( !sortix_display ) + return "TODO: Proper error reporting"; + + return NULL; +} + struct graphics_driver sortix_driver = { - "sortix" + (unsigned char *)"sortix", + sortix_init_driver, }; #endif /* GRDRV_SORTIX */