Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 56e50290 authored by deuce's avatar deuce

Update all ciolib functions to use the conio convention of "non-zero for success"

The biggest impact is in the cterm =1n query, which is retaining 0 for
success and now uses 1 for all failures.
parent c38948a4
......@@ -859,10 +859,9 @@ int ansi_getch(void)
return(ch);
}
int ansi_beep(void)
void ansi_beep(void)
{
ansi_sendstr("\7",1);
return(0);
}
#if defined(__BORLANDC__)
......
......@@ -68,7 +68,7 @@ void ansi_gettextinfo(struct text_info *info);
void ansi_setcursortype(int type);
int ansi_getch(void);
int ansi_getche(void);
int ansi_beep(void);
void ansi_beep(void);
void ansi_textmode(int mode);
#ifdef __cplusplus
}
......
......@@ -138,7 +138,7 @@ static int bitmap_loadfont_locked(char *filename)
FILE *fontfile=NULL;
if(!bitmap_initialized)
return(-1);
return(0);
if(current_font[0]==-99 || current_font[0]>(sizeof(conio_fontdata)/sizeof(struct conio_font_data_struct)-2)) {
for(i=0; conio_fontdata[i].desc != NULL; i++) {
if(!strcmp(conio_fontdata[i].desc, "Codepage 437 English")) {
......@@ -152,7 +152,7 @@ static int bitmap_loadfont_locked(char *filename)
if(current_font[0]==-1)
filename=current_filename;
else if(conio_fontdata[current_font[0]].desc==NULL)
return(-1);
return(0);
for (i=1; i<sizeof(current_font)/sizeof(current_font[0]); i++) {
if(current_font[i] == -1)
......@@ -237,14 +237,14 @@ static int bitmap_loadfont_locked(char *filename)
}
}
return(0);
return(1);
error_return:
for (i=0; i<sizeof(font)/sizeof(font[0]); i++)
FREE_AND_NULL(font[i]);
if(fontfile)
fclose(fontfile);
return(-1);
return(0);
}
/***************************************************/
......@@ -327,7 +327,7 @@ static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp
if (bgp)
*bgp = vstat.palette[bg];
return 0;
return 1;
}
/**********************************************************************/
......@@ -898,13 +898,11 @@ int bitmap_setfont(int font, int force, int font_num)
int attr;
struct vmem_cell *pold;
struct vmem_cell *pnew;
int result = CIOLIB_SETFONT_CHARHEIGHT_NOT_SUPPORTED;
if(!bitmap_initialized)
return(CIOLIB_SETFONT_NOT_INITIALIZED);
if(font < 0 || font>(sizeof(conio_fontdata)/sizeof(struct conio_font_data_struct)-2)) {
return(CIOLIB_SETFONT_INVALID_FONT);
}
return(0);
if(font < 0 || font>(sizeof(conio_fontdata)/sizeof(struct conio_font_data_struct)-2))
return(0);
if(conio_fontdata[font].eight_by_sixteen!=NULL)
newmode=C80;
......@@ -941,10 +939,8 @@ int bitmap_setfont(int font, int force, int font_num)
}
break;
}
if(changemode && (newmode==-1 || font_num > 1)) {
result = CIOLIB_SETFONT_ILLEGAL_VIDMODE_CHANGE;
if(changemode && (newmode==-1 || font_num > 1))
goto error_return;
}
switch(font_num) {
case 0:
default_font=font;
......@@ -977,7 +973,7 @@ int bitmap_setfont(int font, int force, int font_num)
new=malloc(ti.screenwidth*ti.screenheight*sizeof(*new));
if(!new) {
free(old);
return CIOLIB_SETFONT_MALLOC_FAILURE;
return 0;
}
pold=old;
pnew=new;
......@@ -1024,12 +1020,12 @@ int bitmap_setfont(int font, int force, int font_num)
bitmap_loadfont_locked(NULL);
pthread_mutex_unlock(&vstatlock);
pthread_mutex_unlock(&blinker_lock);
return(CIOLIB_SETFONT_SUCCESS);
return(1);
error_return:
pthread_mutex_unlock(&vstatlock);
pthread_mutex_unlock(&blinker_lock);
return(result);
return(0);
}
int bitmap_getfont(int font_num)
......@@ -1419,15 +1415,12 @@ struct ciolib_pixels *bitmap_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, ui
return pixels;
}
uint32_t *bitmap_get_modepalette(uint32_t p[16])
int bitmap_get_modepalette(uint32_t p[16])
{
uint32_t *ret;
pthread_mutex_lock(&vstatlock);
memcpy(p, vstat.palette, sizeof(vstat.palette));
ret = p;
pthread_mutex_unlock(&vstatlock);
return ret;
return 1;
}
int bitmap_set_modepalette(uint32_t p[16])
......@@ -1435,7 +1428,7 @@ int bitmap_set_modepalette(uint32_t p[16])
pthread_mutex_lock(&vstatlock);
memcpy(vstat.palette, p, sizeof(vstat.palette));
pthread_mutex_unlock(&vstatlock);
return 0;
return 1;
}
uint32_t bitmap_map_rgb(uint16_t r, uint16_t g, uint16_t b)
......@@ -1486,7 +1479,7 @@ void bitmap_replace_font(uint8_t id, char *name, void *data, size_t size)
int bitmap_setpalette(uint32_t index, uint16_t r, uint16_t g, uint16_t b)
{
if (index > 65535)
return 1;
return 0;
pthread_mutex_lock(&blinker_lock);
pthread_mutex_lock(&screen.screenlock);
......@@ -1496,7 +1489,7 @@ int bitmap_setpalette(uint32_t index, uint16_t r, uint16_t g, uint16_t b)
update_pixels = 1;
pthread_mutex_unlock(&screen.screenlock);
pthread_mutex_unlock(&blinker_lock);
return 0;
return 1;
}
/***********************/
......
......@@ -41,7 +41,7 @@ int bitmap_attr2palette(uint8_t attr, uint32_t *fgp, uint32_t *bgp);
int bitmap_setpixel(uint32_t x, uint32_t y, uint32_t colour);
int bitmap_setpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint32_t x_off, uint32_t y_off, struct ciolib_pixels *, void *mask);
struct ciolib_pixels *bitmap_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey);
uint32_t *bitmap_get_modepalette(uint32_t p[16]);
int bitmap_get_modepalette(uint32_t p[16]);
int bitmap_set_modepalette(uint32_t p[16]);
uint32_t bitmap_map_rgb(uint16_t r, uint16_t g, uint16_t b);
void bitmap_replace_font(uint8_t id, char *name, void *data, size_t size);
......
......@@ -132,7 +132,7 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *);
CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcolour(uint32_t fg, uint32_t bg);
CIOLIBEXPORT uint32_t * CIOLIBCALL ciolib_get_modepalette(uint32_t p[16]);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16]);
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16]);
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
......@@ -142,7 +142,7 @@ int sdl_video_initialized = 0;
#define CIOLIB_INIT() { if(initialized != 1) initciolib(CIOLIB_MODE_AUTO); }
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
int try_sdl_init(int mode)
static int try_sdl_init(int mode)
{
if(!sdl_initciolib(mode)) {
cio_api.mouse=1;
......@@ -197,7 +197,7 @@ int try_sdl_init(int mode)
#ifndef _WIN32
#ifndef NO_X
int try_x_init(int mode)
static int try_x_init(int mode)
{
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
if (sdl_video_initialized) {
......@@ -251,7 +251,7 @@ int try_x_init(int mode)
}
#endif
int try_curses_init(int mode)
static int try_curses_init(int mode)
{
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
if (sdl_video_initialized) {
......@@ -288,7 +288,7 @@ int try_curses_init(int mode)
}
#endif
int try_ansi_init(int mode)
static int try_ansi_init(int mode)
{
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
if (sdl_video_initialized) {
......@@ -319,7 +319,7 @@ int try_ansi_init(int mode)
#if defined(__BORLANDC__)
#pragma argsused
#endif
int try_conio_init(int mode)
static int try_conio_init(int mode)
{
#if defined(WITH_SDL) || defined(WITH_SDL_AUDIO)
if (sdl_video_initialized) {
......@@ -454,6 +454,9 @@ CIOLIBEXPORT int CIOLIBCALL initciolib(int mode)
}
/* **MUST** be implemented */
/*
* Returns non-zero if a key is hit
*/
CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void)
{
CIOLIB_INIT();
......@@ -507,6 +510,9 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void)
}
/* Optional */
/*
* On success, returns ch, on error, returns EOF
*/
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch)
{
CIOLIB_INIT();
......@@ -520,6 +526,9 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch)
}
/* Optional */
/*
* Returns non-zero on success
*/
CIOLIBEXPORT int CIOLIBCALL ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy)
{
int width;
......@@ -566,6 +575,10 @@ fail:
}
/* Optional */
/*
* Returns &str[2]
* Cannot fail
*/
CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str)
{
int maxlen;
......@@ -647,7 +660,8 @@ int vsscanf( const char *buffer, const char *format, va_list arg_ptr )
}
#endif
/* Optional... in fact, since it's varargs, you can't override it */
/* Can't be overridden */
/* Returns the number of fields converted */
CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...)
{
char str[255];
......@@ -664,6 +678,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...)
}
/* Optional */
/* So dumb */
CIOLIBEXPORT char * CIOLIBCALL ciolib_getpass(const char *prompt)
{
static char pass[9];
......@@ -721,6 +736,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info)
}
/* Optional */
/* Not part of Borland conio? */
CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void)
{
int os;
......@@ -749,6 +765,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void)
}
/* Optional */
/* Cannot fail */
CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void)
{
int x;
......@@ -766,6 +783,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void)
}
/* Optional */
/* Cannot fail */
CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void)
{
int y;
......@@ -958,6 +976,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void)
}
/* Not overridable due to varargs */
/* Returns the number of characters or EOF on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
{
va_list argptr;
......@@ -1017,6 +1036,9 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
}
/* Optional */
/* The Borland version does not translate \n into \r\n... this does.
* Returns last character printed (!)
*/
CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str)
{
int pos;
......@@ -1263,6 +1285,9 @@ static char c64_attr_rev(unsigned char orig)
}
/* **MUST** be implemented */
/*
* Non-zero on success
*/
CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e)
{
char *buf=e;
......@@ -1309,6 +1334,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e)
}
/* **MUST** be implemented */
/* 1 on success, 0 on failure */
CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e)
{
char *ch;
......@@ -1322,7 +1348,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e)
if (cio_api.gettext == NULL) {
buf = malloc((c-a+1)*(d-b+1)*sizeof(*buf));
if (buf == NULL)
return 1;
return 0;
ch = e;
ret = cio_api.vmem_gettext(a,b,c,d,buf);
for (i=0; i<(c-a+1)*(d-b+1); i++) {
......@@ -1358,6 +1384,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e)
}
/* Optional */
/* 1 on success, 0 on failure */
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e)
{
int ret;
......@@ -1368,11 +1395,13 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct v
if (cio_api.vmem_gettext == NULL) {
buf = malloc((c-a+1)*(d-b+1)*sizeof(*buf));
if (buf == NULL)
return 1;
return 0;
ret = ciolib_gettext(a, b, c, d, e);
for (i=0; i<(c-a+1)*(d-b+1); i++) {
e[i].ch = buf[i] & 0xff;
e[i].legacy_attr = buf[i] >> 8;
if (ret) {
for (i=0; i<(c-a+1)*(d-b+1); i++) {
e[i].ch = buf[i] & 0xff;
e[i].legacy_attr = buf[i] >> 8;
}
}
free(buf);
return ret;
......@@ -1381,6 +1410,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct v
}
/* Optional */
/* Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e)
{
int i;
......@@ -1428,9 +1458,10 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a)
}
/* Optional */
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int a)
/* Returns ch on success, EOF on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int ch)
{
unsigned char a1=a;
unsigned char a1=ch;
struct vmem_cell buf;
int i;
int old_puttext_can_move=puttext_can_move;
......@@ -1544,21 +1575,23 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a)
}
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void) {
CIOLIB_INIT();
if(cio_api.showmouse!=NULL)
return(cio_api.showmouse());
return(-1);
return(0);
}
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void) {
CIOLIB_INIT();
if(cio_api.hidemouse!=NULL)
return(cio_api.hidemouse());
return(-1);
return(0);
}
/* Optional */
......@@ -1595,6 +1628,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen)
}
/* Optional */
/* Returns NULL on error */
CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void)
{
CIOLIB_INIT();
......@@ -1606,6 +1640,7 @@ CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void)
}
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num)
{
CIOLIB_INIT();
......@@ -1613,10 +1648,11 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num)
if(cio_api.setfont!=NULL)
return(cio_api.setfont(font,force,font_num));
else
return(CIOLIB_SETFONT_NOT_SUPPORTED);
return(0);
}
/* Optional */
/* Return -1 if not implemented */
CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num)
{
CIOLIB_INIT();
......@@ -1628,6 +1664,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num)
}
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename)
{
CIOLIB_INIT();
......@@ -1635,10 +1672,11 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename)
if(cio_api.loadfont!=NULL)
return(cio_api.loadfont(filename));
else
return(-1);
return(0);
}
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos)
{
CIOLIB_INIT();
......@@ -1655,21 +1693,26 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int
if(ypos)
*ypos=-1;
}
return(-1);
return(0);
}
/* Optional */
CIOLIBEXPORT int CIOLIBCALL ciolib_beep(void)
CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void)
{
CIOLIB_INIT();
if(cio_api.beep)
return(cio_api.beep());
BEEP(440,100);
return(0);
cio_api.beep();
else
BEEP(440,100);
return;
}
/* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *start, int *end, int *range, int *blink, int *visible)
{
CIOLIB_INIT();
if(cio_api.getcustomcursor)
cio_api.getcustomcursor(start,end,range,blink,visible);
}
......@@ -1677,6 +1720,8 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *start, int *end, int *r
/* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int start, int end, int range, int blink, int visible)
{
CIOLIB_INIT();
if(cio_api.setcustomcursor)
cio_api.setcustomcursor(start,end,range,blink,visible);
}
......@@ -1684,6 +1729,8 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int start, int end, int rang
/* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags)
{
CIOLIB_INIT();
if(cio_api.setvideoflags)
cio_api.setvideoflags(flags);
}
......@@ -1691,6 +1738,8 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags)
/* Optional */
CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void)
{
CIOLIB_INIT();
if(cio_api.getvideoflags)
return(cio_api.getvideoflags());
return(0);
......@@ -1699,37 +1748,49 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void)
/* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int new_value)
{
CIOLIB_INIT();
if(cio_api.setscaling)
cio_api.setscaling(new_value);
}
/* Optional */
/* Returns zero on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void)
{
CIOLIB_INIT();
if(cio_api.getscaling)
return(cio_api.getscaling());
return(1);
}
/* Optional */
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b)
{
CIOLIB_INIT();
if(cio_api.setpalette)
return(cio_api.setpalette(entry, r, g, b));
return(1);
return(0);
}
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg)
{
CIOLIB_INIT();
if (cio_api.attr2palette)
return cio_api.attr2palette(attr, fg, bg);
/*
* TODO: If we want to be able to cross screens, we need some
* mapping for non-plaette aware things.
*/
return -1;
return 0;
}
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour)
{
CIOLIB_INIT();
......@@ -1739,6 +1800,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t col
return 0;
}
/* Returns NULL on failure */
CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey)
{
CIOLIB_INIT();
......@@ -1748,6 +1810,7 @@ CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uin
return NULL;
}
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, uint32_t x_off, uint32_t y_off, struct ciolib_pixels *pixels, void *mask)
{
CIOLIB_INIT();
......@@ -1766,6 +1829,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels)
FREE_AND_NULL(pixels);
}
/* Returns NULL on failure */
CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void)
{
struct ciolib_screen *ret;
......@@ -1818,6 +1882,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *scrn)
free(scrn);
}
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn)
{
struct text_info ti;
......@@ -1845,15 +1910,17 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcolour(uint32_t fg, uint32_t bg)
ciolib_bg = bg;
}
CIOLIBEXPORT uint32_t * CIOLIBCALL ciolib_get_modepalette(uint32_t p[16])
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16])
{
CIOLIB_INIT();
if (cio_api.get_modepalette)
return cio_api.get_modepalette(p);
return NULL;
return 0;
}
/* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16])
{
CIOLIB_INIT();
......@@ -1863,13 +1930,14 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16])
return 0;
}
/* Returns non-zero on success */
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b)
{
CIOLIB_INIT();
if (cio_api.map_rgb)
return cio_api.map_rgb(r,g,b);
return UINT32_MAX;
return 0;
}
CIOLIBEXPORT void CIOLIBCALL ciolib_replace_font(uint8_t id, char *name, void *data, size_t size)
......
......@@ -69,16 +69,6 @@
#define CIOLIBEXPORTVAR extern
#endif
enum {