2021-08-28 18:00:36 +00:00
|
|
|
/* sortix.c
|
|
|
|
* Sortix display(1) support
|
|
|
|
* (c) 2021 Juhani 'nortti' Krekelä
|
|
|
|
* This file is a part of the Links program, released under GPL.
|
|
|
|
*/
|
|
|
|
|
2021-11-27 22:24:36 +00:00
|
|
|
#include "cfg.h"
|
|
|
|
|
|
|
|
#ifdef GRDRV_SORTIX
|
|
|
|
|
2021-08-28 18:00:36 +00:00
|
|
|
#include <display.h>
|
|
|
|
#include <err.h> //debg
|
|
|
|
#include <errno.h>
|
|
|
|
|
2021-11-27 22:24:36 +00:00
|
|
|
#include "links.h"
|
|
|
|
|
2021-08-28 18:00:36 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2021-08-28 17:36:11 +00:00
|
|
|
struct graphics_driver sortix_driver =
|
|
|
|
{
|
2021-08-28 18:00:36 +00:00
|
|
|
(unsigned char *)"sortix",
|
|
|
|
sortix_init_driver,
|
2021-08-28 17:36:11 +00:00
|
|
|
};
|
2021-11-27 22:24:36 +00:00
|
|
|
|
|
|
|
#endif /* GRDRV_SORTIX */
|