links/sortix.c

43 lines
839 B
C

/* 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 <display.h>
#include <err.h> //debg
#include <errno.h>
#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 =
{
(unsigned char *)"sortix",
sortix_init_driver,
};
#endif /* GRDRV_SORTIX */