Skip to content
Snippets Groups Projects
Commit 2d3b3bce authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

The great DLLCALL purge of 2021 - part 2

parent a23ad5ae
No related branches found
No related tags found
No related merge requests found
Showing with 349 additions and 440 deletions
...@@ -1019,7 +1019,7 @@ void ansi_suspend(void) ...@@ -1019,7 +1019,7 @@ void ansi_suspend(void)
#endif #endif
} }
CIOLIBEXPORT void CIOLIBCALL ansi_ciolib_setdoorway(int enable) CIOLIBEXPORT void ansi_ciolib_setdoorway(int enable)
{ {
if(cio_api.mode!=CIOLIB_MODE_ANSI) if(cio_api.mode!=CIOLIB_MODE_ANSI)
return; return;
......
...@@ -86,62 +86,62 @@ CIOLIBEXPORT int ciolib_initial_window_height = -1; ...@@ -86,62 +86,62 @@ CIOLIBEXPORT int ciolib_initial_window_height = -1;
CIOLIBEXPORT int ciolib_initial_window_width = -1; CIOLIBEXPORT int ciolib_initial_window_width = -1;
static int initialized=0; static int initialized=0;
CIOLIBEXPORT int CIOLIBCALL ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy); CIOLIBEXPORT int ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy);
CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str); CIOLIBEXPORT char * ciolib_cgets(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...); CIOLIBEXPORT int ciolib_cscanf (char *format , ...);
CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void); CIOLIBEXPORT int ciolib_kbhit(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void); CIOLIBEXPORT int ciolib_getch(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void); CIOLIBEXPORT int ciolib_getche(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch); CIOLIBEXPORT int ciolib_ungetch(int ch);
CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info); CIOLIBEXPORT void ciolib_gettextinfo(struct text_info *info);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void); CIOLIBEXPORT int ciolib_wherex(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void); CIOLIBEXPORT int ciolib_wherey(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void); CIOLIBEXPORT void ciolib_wscroll(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y); CIOLIBEXPORT void ciolib_gotoxy(int x, int y);
CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void); CIOLIBEXPORT void ciolib_clreol(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void); CIOLIBEXPORT void ciolib_clrscr(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str); CIOLIBEXPORT int ciolib_cputs(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...); CIOLIBEXPORT int ciolib_cprintf(const char *fmat, ...);
CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour); CIOLIBEXPORT void ciolib_textbackground(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour); CIOLIBEXPORT void ciolib_textcolor(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void); CIOLIBEXPORT void ciolib_highvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void); CIOLIBEXPORT void ciolib_lowvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void); CIOLIBEXPORT void ciolib_normvideo(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e); CIOLIBEXPORT int ciolib_puttext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e); CIOLIBEXPORT int ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e); CIOLIBEXPORT int ciolib_gettext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e); CIOLIBEXPORT int ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT void CIOLIBCALL ciolib_textattr(int a); CIOLIBEXPORT void ciolib_textattr(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a); CIOLIBEXPORT void ciolib_delay(long a);
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int a); CIOLIBEXPORT int ciolib_putch(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a); CIOLIBEXPORT void ciolib_setcursortype(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode); CIOLIBEXPORT void ciolib_textmode(int mode);
CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey); CIOLIBEXPORT void ciolib_window(int sx, int sy, int ex, int ey);
CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void); CIOLIBEXPORT void ciolib_delline(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void); CIOLIBEXPORT void ciolib_insline(void);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getpass(const char *prompt); CIOLIBEXPORT char * ciolib_getpass(const char *prompt);
CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen); CIOLIBEXPORT void ciolib_copytext(const char *text, size_t buflen);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void); CIOLIBEXPORT char * ciolib_getcliptext(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos); CIOLIBEXPORT int ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos);
CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int new_value); CIOLIBEXPORT void ciolib_setscaling(int new_value);
CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void); CIOLIBEXPORT int ciolib_getscaling(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b); CIOLIBEXPORT int ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b);
CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg); CIOLIBEXPORT int ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg);
CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour); CIOLIBEXPORT int ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour);
CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force); CIOLIBEXPORT struct ciolib_pixels * ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force);
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); CIOLIBEXPORT int 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);
CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels); CIOLIBEXPORT void ciolib_freepixels(struct ciolib_pixels *pixels);
CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void); CIOLIBEXPORT struct ciolib_screen * ciolib_savescreen(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *); CIOLIBEXPORT void ciolib_freescreen(struct ciolib_screen *);
CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn); CIOLIBEXPORT int ciolib_restorescreen(struct ciolib_screen *scrn);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcolour(uint32_t fg, uint32_t bg); CIOLIBEXPORT void ciolib_setcolour(uint32_t fg, uint32_t bg);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16]); CIOLIBEXPORT int ciolib_get_modepalette(uint32_t p[16]);
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16]); CIOLIBEXPORT int ciolib_set_modepalette(uint32_t p[16]);
CIOLIBEXPORT void CIOLIBCALL ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font); CIOLIBEXPORT void ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font);
CIOLIBEXPORT void CIOLIBCALL ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr); CIOLIBEXPORT void ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int width, int height); CIOLIBEXPORT void ciolib_setwinsize(int width, int height);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y); CIOLIBEXPORT void ciolib_setwinposition(int x, int y);
CIOLIBEXPORT enum ciolib_codepage CIOLIBCALL ciolib_getcodepage(void); CIOLIBEXPORT enum ciolib_codepage ciolib_getcodepage(void);
#if defined(WITH_SDL) #if defined(WITH_SDL)
int sdl_video_initialized = 0; int sdl_video_initialized = 0;
...@@ -372,7 +372,7 @@ static int try_conio_init(int mode) ...@@ -372,7 +372,7 @@ static int try_conio_init(int mode)
#endif #endif
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL suspendciolib(void) CIOLIBEXPORT void suspendciolib(void)
{ {
ciolib_clrscr(); ciolib_clrscr();
if(cio_api.suspend != NULL) if(cio_api.suspend != NULL)
...@@ -380,7 +380,7 @@ CIOLIBEXPORT void CIOLIBCALL suspendciolib(void) ...@@ -380,7 +380,7 @@ CIOLIBEXPORT void CIOLIBCALL suspendciolib(void)
initialized=-1; initialized=-1;
} }
CIOLIBEXPORT int CIOLIBCALL initciolib(int mode) CIOLIBEXPORT int initciolib(int mode)
{ {
switch(initialized) { switch(initialized) {
case 1: case 1:
...@@ -473,7 +473,7 @@ CIOLIBEXPORT int CIOLIBCALL initciolib(int mode) ...@@ -473,7 +473,7 @@ CIOLIBEXPORT int CIOLIBCALL initciolib(int mode)
/* /*
* Returns non-zero if a key is hit * Returns non-zero if a key is hit
*/ */
CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void) CIOLIBEXPORT int ciolib_kbhit(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
if(ungotch) if(ungotch)
...@@ -482,7 +482,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void) ...@@ -482,7 +482,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void)
} }
/* **MUST** be implemented */ /* **MUST** be implemented */
CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void) CIOLIBEXPORT int ciolib_getch(void)
{ {
int ch; int ch;
...@@ -497,7 +497,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void) ...@@ -497,7 +497,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void) CIOLIBEXPORT int ciolib_getche(void)
{ {
int ch; int ch;
...@@ -529,7 +529,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void) ...@@ -529,7 +529,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void)
/* /*
* On success, returns ch, on error, returns EOF * On success, returns ch, on error, returns EOF
*/ */
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch) CIOLIBEXPORT int ciolib_ungetch(int ch)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -545,7 +545,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch) ...@@ -545,7 +545,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch)
/* /*
* Returns non-zero on success * Returns non-zero on success
*/ */
CIOLIBEXPORT int CIOLIBCALL ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy) CIOLIBEXPORT int ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy)
{ {
int width; int width;
int height; int height;
...@@ -589,7 +589,7 @@ fail: ...@@ -589,7 +589,7 @@ fail:
* Returns &str[2] * Returns &str[2]
* Cannot fail * Cannot fail
*/ */
CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str) CIOLIBEXPORT char * ciolib_cgets(char *str)
{ {
int maxlen; int maxlen;
int len=0; int len=0;
...@@ -672,7 +672,7 @@ int vsscanf( const char *buffer, const char *format, va_list arg_ptr ) ...@@ -672,7 +672,7 @@ int vsscanf( const char *buffer, const char *format, va_list arg_ptr )
/* Can't be overridden */ /* Can't be overridden */
/* Returns the number of fields converted */ /* Returns the number of fields converted */
CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...) CIOLIBEXPORT int ciolib_cscanf (char *format , ...)
{ {
char str[255]; char str[255];
va_list argptr; va_list argptr;
...@@ -689,7 +689,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...) ...@@ -689,7 +689,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...)
/* Optional */ /* Optional */
/* So dumb */ /* So dumb */
CIOLIBEXPORT char * CIOLIBCALL ciolib_getpass(const char *prompt) CIOLIBEXPORT char * ciolib_getpass(const char *prompt)
{ {
static char pass[9]; static char pass[9];
int len=0; int len=0;
...@@ -732,7 +732,7 @@ early_return: ...@@ -732,7 +732,7 @@ early_return:
/* TODO: Hackery here... must fix */ /* TODO: Hackery here... must fix */
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info) CIOLIBEXPORT void ciolib_gettextinfo(struct text_info *info)
{ {
CIOLIB_INIT() CIOLIB_INIT()
...@@ -745,7 +745,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info) ...@@ -745,7 +745,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info)
/* Optional */ /* Optional */
/* Not part of Borland conio? */ /* Not part of Borland conio? */
CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void) CIOLIBEXPORT void ciolib_wscroll(void)
{ {
int os; int os;
...@@ -774,7 +774,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void) ...@@ -774,7 +774,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void)
/* Optional */ /* Optional */
/* Cannot fail */ /* Cannot fail */
CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void) CIOLIBEXPORT int ciolib_wherex(void)
{ {
int x; int x;
...@@ -792,7 +792,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void) ...@@ -792,7 +792,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void)
/* Optional */ /* Optional */
/* Cannot fail */ /* Cannot fail */
CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void) CIOLIBEXPORT int ciolib_wherey(void)
{ {
int y; int y;
...@@ -809,7 +809,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void) ...@@ -809,7 +809,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void)
} }
/* **MUST** be implemented */ /* **MUST** be implemented */
CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y) CIOLIBEXPORT void ciolib_gotoxy(int x, int y)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -822,7 +822,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y) ...@@ -822,7 +822,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y)
} }
/* **MUST** be implemented */ /* **MUST** be implemented */
CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode) CIOLIBEXPORT void ciolib_textmode(int mode)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -858,7 +858,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode) ...@@ -858,7 +858,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey) CIOLIBEXPORT void ciolib_window(int sx, int sy, int ex, int ey)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -885,7 +885,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey) ...@@ -885,7 +885,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void) CIOLIBEXPORT void ciolib_clreol(void)
{ {
struct vmem_cell *buf; struct vmem_cell *buf;
int i; int i;
...@@ -920,7 +920,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void) ...@@ -920,7 +920,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void) CIOLIBEXPORT void ciolib_clrscr(void)
{ {
struct vmem_cell *buf; struct vmem_cell *buf;
int i; int i;
...@@ -954,7 +954,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void) ...@@ -954,7 +954,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void) CIOLIBEXPORT void ciolib_delline(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -974,7 +974,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void) ...@@ -974,7 +974,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void) CIOLIBEXPORT void ciolib_insline(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -990,7 +990,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void) ...@@ -990,7 +990,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void)
/* Not overridable due to varargs */ /* Not overridable due to varargs */
/* Returns the number of characters or EOF on error */ /* Returns the number of characters or EOF on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...) CIOLIBEXPORT int ciolib_cprintf(const char *fmat, ...)
{ {
va_list argptr; va_list argptr;
int ret; int ret;
...@@ -1052,7 +1052,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...) ...@@ -1052,7 +1052,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...)
/* The Borland version does not translate \n into \r\n... this does. /* The Borland version does not translate \n into \r\n... this does.
* Returns last character printed (!) * Returns last character printed (!)
*/ */
CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str) CIOLIBEXPORT int ciolib_cputs(char *str)
{ {
int pos; int pos;
int ret=0; int ret=0;
...@@ -1078,7 +1078,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str) ...@@ -1078,7 +1078,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str)
} }
/* Optional... and overriding is silly */ /* Optional... and overriding is silly */
CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour) CIOLIBEXPORT void ciolib_textbackground(int colour)
{ {
unsigned char attr; unsigned char attr;
unsigned char col; unsigned char col;
...@@ -1098,7 +1098,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour) ...@@ -1098,7 +1098,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour)
} }
/* Optional... and overriding is silly */ /* Optional... and overriding is silly */
CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour) CIOLIBEXPORT void ciolib_textcolor(int colour)
{ {
unsigned char attr; unsigned char attr;
unsigned char col; unsigned char col;
...@@ -1118,7 +1118,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour) ...@@ -1118,7 +1118,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour)
} }
/* Optional... and overriding is silly */ /* Optional... and overriding is silly */
CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void) CIOLIBEXPORT void ciolib_highvideo(void)
{ {
int attr; int attr;
...@@ -1135,7 +1135,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void) ...@@ -1135,7 +1135,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void)
} }
/* Optional... and overriding is silly */ /* Optional... and overriding is silly */
CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void) CIOLIBEXPORT void ciolib_lowvideo(void)
{ {
int attr; int attr;
...@@ -1152,7 +1152,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void) ...@@ -1152,7 +1152,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void)
} }
/* Optional... and overriding is silly */ /* Optional... and overriding is silly */
CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void) CIOLIBEXPORT void ciolib_normvideo(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1167,7 +1167,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void) ...@@ -1167,7 +1167,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void)
/* /*
* Non-zero on success * Non-zero on success
*/ */
CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e) CIOLIBEXPORT int ciolib_puttext(int a,int b,int c,int d,void *e)
{ {
char *buf=e; char *buf=e;
int ret; int ret;
...@@ -1181,7 +1181,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e) ...@@ -1181,7 +1181,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e)
/* **MUST** be implemented */ /* **MUST** be implemented */
/* 1 on success, 0 on failure */ /* 1 on success, 0 on failure */
CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e) CIOLIBEXPORT int ciolib_gettext(int a,int b,int c,int d,void *e)
{ {
char *ch; char *ch;
int i; int i;
...@@ -1208,7 +1208,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e) ...@@ -1208,7 +1208,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e)
/* Optional */ /* Optional */
/* 1 on success, 0 on failure */ /* 1 on success, 0 on failure */
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e) CIOLIBEXPORT int ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e)
{ {
int ret; int ret;
uint16_t *buf; uint16_t *buf;
...@@ -1235,7 +1235,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct v ...@@ -1235,7 +1235,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct v
/* Optional */ /* Optional */
/* Non-zero on success */ /* Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e) CIOLIBEXPORT int ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e)
{ {
int i; int i;
int ret; int ret;
...@@ -1256,7 +1256,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct v ...@@ -1256,7 +1256,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct v
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_textattr(int a) CIOLIBEXPORT void ciolib_textattr(int a)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1270,7 +1270,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textattr(int a) ...@@ -1270,7 +1270,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_textattr(int a)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a) CIOLIBEXPORT void ciolib_delay(long a)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1283,7 +1283,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a) ...@@ -1283,7 +1283,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a)
/* Optional */ /* Optional */
/* Returns ch on success, EOF on error */ /* Returns ch on success, EOF on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int ch) CIOLIBEXPORT int ciolib_putch(int ch)
{ {
unsigned char a1=ch; unsigned char a1=ch;
struct vmem_cell buf[1]; struct vmem_cell buf[1];
...@@ -1391,7 +1391,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int ch) ...@@ -1391,7 +1391,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int ch)
} }
/* **MUST** be implemented */ /* **MUST** be implemented */
CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a) CIOLIBEXPORT void ciolib_setcursortype(int a)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1400,7 +1400,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a) ...@@ -1400,7 +1400,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a)
/* Optional */ /* Optional */
/* Return Non-zero on success */ /* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void) { CIOLIBEXPORT int ciolib_showmouse(void) {
CIOLIB_INIT(); CIOLIB_INIT();
if(cio_api.showmouse!=NULL) if(cio_api.showmouse!=NULL)
...@@ -1410,7 +1410,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void) { ...@@ -1410,7 +1410,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void) {
/* Optional */ /* Optional */
/* Return Non-zero on success */ /* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void) { CIOLIBEXPORT int ciolib_hidemouse(void) {
CIOLIB_INIT(); CIOLIB_INIT();
if(cio_api.hidemouse!=NULL) if(cio_api.hidemouse!=NULL)
...@@ -1419,7 +1419,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void) { ...@@ -1419,7 +1419,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void) {
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setname(const char *name) { CIOLIBEXPORT void ciolib_setname(const char *name) {
CIOLIB_INIT(); CIOLIB_INIT();
if(cio_api.setname!=NULL) if(cio_api.setname!=NULL)
...@@ -1427,7 +1427,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setname(const char *name) { ...@@ -1427,7 +1427,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setname(const char *name) {
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_seticon(const void *icon, unsigned long size) { CIOLIBEXPORT void ciolib_seticon(const void *icon, unsigned long size) {
CIOLIB_INIT(); CIOLIB_INIT();
if(cio_api.seticon!=NULL) if(cio_api.seticon!=NULL)
...@@ -1435,7 +1435,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_seticon(const void *icon, unsigned long size ...@@ -1435,7 +1435,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_seticon(const void *icon, unsigned long size
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_settitle(const char *title) { CIOLIBEXPORT void ciolib_settitle(const char *title) {
CIOLIB_INIT(); CIOLIB_INIT();
if(cio_api.settitle!=NULL) if(cio_api.settitle!=NULL)
...@@ -1443,7 +1443,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_settitle(const char *title) { ...@@ -1443,7 +1443,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_settitle(const char *title) {
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen) CIOLIBEXPORT void ciolib_copytext(const char *text, size_t buflen)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1453,7 +1453,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen) ...@@ -1453,7 +1453,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen)
/* Optional */ /* Optional */
/* Returns NULL on error */ /* Returns NULL on error */
CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void) CIOLIBEXPORT char * ciolib_getcliptext(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1465,7 +1465,7 @@ CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void) ...@@ -1465,7 +1465,7 @@ CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void)
/* Optional */ /* Optional */
/* Return Non-zero on success */ /* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num) CIOLIBEXPORT int ciolib_setfont(int font, int force, int font_num)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1477,7 +1477,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num) ...@@ -1477,7 +1477,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num)
/* Optional */ /* Optional */
/* Return -1 if not implemented */ /* Return -1 if not implemented */
CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num) CIOLIBEXPORT int ciolib_getfont(int font_num)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1489,7 +1489,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num) ...@@ -1489,7 +1489,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num)
/* Optional */ /* Optional */
/* Return Non-zero on success */ /* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename) CIOLIBEXPORT int ciolib_loadfont(char *filename)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1501,7 +1501,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename) ...@@ -1501,7 +1501,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename)
/* Optional */ /* Optional */
/* Return Non-zero on success */ /* Return Non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos) CIOLIBEXPORT int ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1521,7 +1521,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int ...@@ -1521,7 +1521,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void) CIOLIBEXPORT void ciolib_beep(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1533,7 +1533,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void) ...@@ -1533,7 +1533,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *start, int *end, int *range, int *blink, int *visible) CIOLIBEXPORT void ciolib_getcustomcursor(int *start, int *end, int *range, int *blink, int *visible)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1542,7 +1542,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *start, int *end, int *r ...@@ -1542,7 +1542,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *start, int *end, int *r
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int start, int end, int range, int blink, int visible) CIOLIBEXPORT void ciolib_setcustomcursor(int start, int end, int range, int blink, int visible)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1551,7 +1551,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int start, int end, int rang ...@@ -1551,7 +1551,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int start, int end, int rang
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags) CIOLIBEXPORT void ciolib_setvideoflags(int flags)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1560,7 +1560,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags) ...@@ -1560,7 +1560,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void) CIOLIBEXPORT int ciolib_getvideoflags(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1570,7 +1570,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void) ...@@ -1570,7 +1570,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int new_value) CIOLIBEXPORT void ciolib_setscaling(int new_value)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1580,7 +1580,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int new_value) ...@@ -1580,7 +1580,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int new_value)
/* Optional */ /* Optional */
/* Returns zero on error */ /* Returns zero on error */
CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void) CIOLIBEXPORT int ciolib_getscaling(void)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1591,7 +1591,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void) ...@@ -1591,7 +1591,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void)
/* Optional */ /* Optional */
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b) CIOLIBEXPORT int ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1601,7 +1601,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16 ...@@ -1601,7 +1601,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg) CIOLIBEXPORT int ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1615,7 +1615,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint ...@@ -1615,7 +1615,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour) CIOLIBEXPORT int ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1625,7 +1625,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t col ...@@ -1625,7 +1625,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t col
} }
/* Returns NULL on failure */ /* Returns NULL on failure */
CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force) CIOLIBEXPORT struct ciolib_pixels * ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1635,7 +1635,7 @@ CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uin ...@@ -1635,7 +1635,7 @@ CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uin
} }
/* Returns non-zero on success */ /* 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) CIOLIBEXPORT int 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(); CIOLIB_INIT();
...@@ -1644,7 +1644,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpixels(uint32_t sx, uint32_t sy, uint32_t ...@@ -1644,7 +1644,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_setpixels(uint32_t sx, uint32_t sy, uint32_t
return 0; return 0;
} }
CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels) CIOLIBEXPORT void ciolib_freepixels(struct ciolib_pixels *pixels)
{ {
if (pixels == NULL) if (pixels == NULL)
return; return;
...@@ -1655,7 +1655,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels) ...@@ -1655,7 +1655,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels)
} }
/* Returns NULL on failure */ /* Returns NULL on failure */
CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void) CIOLIBEXPORT struct ciolib_screen * ciolib_savescreen(void)
{ {
struct ciolib_screen *ret; struct ciolib_screen *ret;
int vmode; int vmode;
...@@ -1689,7 +1689,7 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void) ...@@ -1689,7 +1689,7 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void)
return ret; return ret;
} }
CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *scrn) CIOLIBEXPORT void ciolib_freescreen(struct ciolib_screen *scrn)
{ {
if (scrn == NULL) if (scrn == NULL)
return; return;
...@@ -1700,7 +1700,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *scrn) ...@@ -1700,7 +1700,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *scrn)
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn) CIOLIBEXPORT int ciolib_restorescreen(struct ciolib_screen *scrn)
{ {
struct text_info ti; struct text_info ti;
int vmode; int vmode;
...@@ -1727,14 +1727,14 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn) ...@@ -1727,14 +1727,14 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn)
return 1; return 1;
} }
CIOLIBEXPORT void CIOLIBCALL ciolib_setcolour(uint32_t fg, uint32_t bg) CIOLIBEXPORT void ciolib_setcolour(uint32_t fg, uint32_t bg)
{ {
ciolib_fg = fg; ciolib_fg = fg;
ciolib_bg = bg; ciolib_bg = bg;
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16]) CIOLIBEXPORT int ciolib_get_modepalette(uint32_t p[16])
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1744,7 +1744,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16]) ...@@ -1744,7 +1744,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t p[16])
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16]) CIOLIBEXPORT int ciolib_set_modepalette(uint32_t p[16])
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1754,7 +1754,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16]) ...@@ -1754,7 +1754,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t p[16])
} }
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b) CIOLIBEXPORT uint32_t ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1763,7 +1763,7 @@ CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t ...@@ -1763,7 +1763,7 @@ CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t
return 0; return 0;
} }
CIOLIBEXPORT void CIOLIBCALL ciolib_replace_font(uint8_t id, char *name, void *data, size_t size) CIOLIBEXPORT void ciolib_replace_font(uint8_t id, char *name, void *data, size_t size)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1775,7 +1775,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_replace_font(uint8_t id, char *name, void *d ...@@ -1775,7 +1775,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_replace_font(uint8_t id, char *name, void *d
free(data); free(data);
} }
CIOLIBEXPORT int CIOLIBCALL ciolib_attrfont(uint8_t attr) CIOLIBEXPORT int ciolib_attrfont(uint8_t attr)
{ {
int flags; int flags;
int font = 0; int font = 0;
...@@ -1790,7 +1790,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_attrfont(uint8_t attr) ...@@ -1790,7 +1790,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_attrfont(uint8_t attr)
} }
/* Returns non-zero if fontnum is supported in this mode */ /* Returns non-zero if fontnum is supported in this mode */
CIOLIBEXPORT int CIOLIBCALL ciolib_checkfont(int fontnum) CIOLIBEXPORT int ciolib_checkfont(int fontnum)
{ {
int vmode; int vmode;
struct text_info ti; struct text_info ti;
...@@ -1834,7 +1834,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_checkfont(int fontnum) ...@@ -1834,7 +1834,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_checkfont(int fontnum)
} }
CIOLIBEXPORT void CIOLIBCALL CIOLIBEXPORT void
ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font) ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1846,7 +1846,7 @@ ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font) ...@@ -1846,7 +1846,7 @@ ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font)
ciolib_set_vmem_attr(cell, attr); ciolib_set_vmem_attr(cell, attr);
} }
CIOLIBEXPORT void CIOLIBCALL CIOLIBEXPORT void
ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr) ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1858,7 +1858,7 @@ ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr) ...@@ -1858,7 +1858,7 @@ ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int w, int h) CIOLIBEXPORT void ciolib_setwinsize(int w, int h)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1867,7 +1867,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int w, int h) ...@@ -1867,7 +1867,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int w, int h)
} }
/* Optional */ /* Optional */
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y) CIOLIBEXPORT void ciolib_setwinposition(int x, int y)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
...@@ -1875,7 +1875,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y) ...@@ -1875,7 +1875,7 @@ CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y)
cio_api.setwinposition(x, y); cio_api.setwinposition(x, y);
} }
CIOLIBEXPORT enum ciolib_codepage CIOLIBCALL ciolib_getcodepage(void) CIOLIBEXPORT enum ciolib_codepage ciolib_getcodepage(void)
{ {
int font = ciolib_getfont(1); int font = ciolib_getfont(1);
...@@ -1932,7 +1932,7 @@ int main(int argc, char **argv) ...@@ -1932,7 +1932,7 @@ int main(int argc, char **argv)
#endif #endif
/* Returns non-zero on success */ /* Returns non-zero on success */
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_mousepointer(enum ciolib_mouse_ptr type) CIOLIBEXPORT uint32_t ciolib_mousepointer(enum ciolib_mouse_ptr type)
{ {
CIOLIB_INIT(); CIOLIB_INIT();
......
...@@ -46,11 +46,6 @@ ...@@ -46,11 +46,6 @@
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef __BORLANDC__
#define CIOLIBCALL
#else
#define CIOLIBCALL
#endif
#if defined(CIOLIB_IMPORTS) || defined(CIOLIB_EXPORTS) #if defined(CIOLIB_IMPORTS) || defined(CIOLIB_EXPORTS)
#if defined(CIOLIB_IMPORTS) #if defined(CIOLIB_IMPORTS)
#define CIOLIBEXPORT __declspec( dllimport ) #define CIOLIBEXPORT __declspec( dllimport )
...@@ -64,11 +59,9 @@ ...@@ -64,11 +59,9 @@
#define CIOLIBEXPORTVAR extern #define CIOLIBEXPORTVAR extern
#endif #endif
#elif defined __unix__ #elif defined __unix__
#define CIOLIBCALL
#define CIOLIBEXPORT #define CIOLIBEXPORT
#define CIOLIBEXPORTVAR extern #define CIOLIBEXPORTVAR extern
#else #else
#define CIOLIBCALL
#define CIOLIBEXPORT #define CIOLIBEXPORT
#define CIOLIBEXPORTVAR extern #define CIOLIBEXPORTVAR extern
#endif #endif
...@@ -399,86 +392,86 @@ CIOLIBEXPORTVAR int ciolib_initial_window_width; ...@@ -399,86 +392,86 @@ CIOLIBEXPORTVAR int ciolib_initial_window_width;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
CIOLIBEXPORT int CIOLIBCALL initciolib(int mode); CIOLIBEXPORT int initciolib(int mode);
CIOLIBEXPORT void CIOLIBCALL suspendciolib(void); CIOLIBEXPORT void suspendciolib(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy); CIOLIBEXPORT int ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy);
CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str); CIOLIBEXPORT char * ciolib_cgets(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...); CIOLIBEXPORT int ciolib_cscanf (char *format , ...);
CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void); CIOLIBEXPORT int ciolib_kbhit(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void); CIOLIBEXPORT int ciolib_getch(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void); CIOLIBEXPORT int ciolib_getche(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch); CIOLIBEXPORT int ciolib_ungetch(int ch);
CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info); CIOLIBEXPORT void ciolib_gettextinfo(struct text_info *info);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void); CIOLIBEXPORT int ciolib_wherex(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void); CIOLIBEXPORT int ciolib_wherey(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void); CIOLIBEXPORT void ciolib_wscroll(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y); CIOLIBEXPORT void ciolib_gotoxy(int x, int y);
CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void); CIOLIBEXPORT void ciolib_clreol(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void); CIOLIBEXPORT void ciolib_clrscr(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str); CIOLIBEXPORT int ciolib_cputs(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...); CIOLIBEXPORT int ciolib_cprintf(const char *fmat, ...);
CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour); CIOLIBEXPORT void ciolib_textbackground(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour); CIOLIBEXPORT void ciolib_textcolor(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void); CIOLIBEXPORT void ciolib_highvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void); CIOLIBEXPORT void ciolib_lowvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void); CIOLIBEXPORT void ciolib_normvideo(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_puttext(int a,int b,int c,int d,void *e); CIOLIBEXPORT int ciolib_puttext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e); CIOLIBEXPORT int ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_gettext(int a,int b,int c,int d,void *e); CIOLIBEXPORT int ciolib_gettext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int CIOLIBCALL ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e); CIOLIBEXPORT int ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT void CIOLIBCALL ciolib_textattr(int a); CIOLIBEXPORT void ciolib_textattr(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a); CIOLIBEXPORT void ciolib_delay(long a);
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int a); CIOLIBEXPORT int ciolib_putch(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a); CIOLIBEXPORT void ciolib_setcursortype(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode); CIOLIBEXPORT void ciolib_textmode(int mode);
CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey); CIOLIBEXPORT void ciolib_window(int sx, int sy, int ex, int ey);
CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void); CIOLIBEXPORT void ciolib_delline(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void); CIOLIBEXPORT void ciolib_insline(void);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getpass(const char *prompt); CIOLIBEXPORT char * ciolib_getpass(const char *prompt);
CIOLIBEXPORT void CIOLIBCALL ciolib_settitle(const char *title); CIOLIBEXPORT void ciolib_settitle(const char *title);
CIOLIBEXPORT void CIOLIBCALL ciolib_setname(const char *title); CIOLIBEXPORT void ciolib_setname(const char *title);
CIOLIBEXPORT void CIOLIBCALL ciolib_seticon(const void *icon,unsigned long size); CIOLIBEXPORT void ciolib_seticon(const void *icon,unsigned long size);
CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void); CIOLIBEXPORT int ciolib_showmouse(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void); CIOLIBEXPORT int ciolib_hidemouse(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_mousepointeer(enum ciolib_mouse_ptr); CIOLIBEXPORT int ciolib_mousepointeer(enum ciolib_mouse_ptr);
CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen); CIOLIBEXPORT void ciolib_copytext(const char *text, size_t buflen);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void); CIOLIBEXPORT char * ciolib_getcliptext(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num); CIOLIBEXPORT int ciolib_setfont(int font, int force, int font_num);
CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num); CIOLIBEXPORT int ciolib_getfont(int font_num);
CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename); CIOLIBEXPORT int ciolib_loadfont(char *filename);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos); CIOLIBEXPORT int ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos);
CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void); CIOLIBEXPORT void ciolib_beep(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_getcustomcursor(int *startline, int *endline, int *range, int *blink, int *visible); CIOLIBEXPORT void ciolib_getcustomcursor(int *startline, int *endline, int *range, int *blink, int *visible);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcustomcursor(int startline, int endline, int range, int blink, int visible); CIOLIBEXPORT void ciolib_setcustomcursor(int startline, int endline, int range, int blink, int visible);
CIOLIBEXPORT void CIOLIBCALL ciolib_setvideoflags(int flags); CIOLIBEXPORT void ciolib_setvideoflags(int flags);
CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void); CIOLIBEXPORT int ciolib_getvideoflags(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int flags); CIOLIBEXPORT void ciolib_setscaling(int flags);
CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void); CIOLIBEXPORT int ciolib_getscaling(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b); CIOLIBEXPORT int ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b);
CIOLIBEXPORT int CIOLIBCALL ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg); CIOLIBEXPORT int ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg);
CIOLIBEXPORT int CIOLIBCALL ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour); CIOLIBEXPORT int ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour);
CIOLIBEXPORT struct ciolib_pixels * CIOLIBCALL ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force); CIOLIBEXPORT struct ciolib_pixels * ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force);
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); CIOLIBEXPORT int 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);
CIOLIBEXPORT void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels); CIOLIBEXPORT void ciolib_freepixels(struct ciolib_pixels *pixels);
CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void); CIOLIBEXPORT struct ciolib_screen * ciolib_savescreen(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_freescreen(struct ciolib_screen *); CIOLIBEXPORT void ciolib_freescreen(struct ciolib_screen *);
CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn); CIOLIBEXPORT int ciolib_restorescreen(struct ciolib_screen *scrn);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcolour(uint32_t fg, uint32_t bg); CIOLIBEXPORT void ciolib_setcolour(uint32_t fg, uint32_t bg);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_modepalette(uint32_t[16]); CIOLIBEXPORT int ciolib_get_modepalette(uint32_t[16]);
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t[16]); CIOLIBEXPORT int ciolib_set_modepalette(uint32_t[16]);
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b); CIOLIBEXPORT uint32_t ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b);
CIOLIBEXPORT void CIOLIBCALL ciolib_replace_font(uint8_t id, char *name, void *data, size_t size); CIOLIBEXPORT void ciolib_replace_font(uint8_t id, char *name, void *data, size_t size);
CIOLIBEXPORT int CIOLIBCALL ciolib_attrfont(uint8_t attr); CIOLIBEXPORT int ciolib_attrfont(uint8_t attr);
CIOLIBEXPORT int CIOLIBCALL ciolib_checkfont(int font_num); CIOLIBEXPORT int ciolib_checkfont(int font_num);
CIOLIBEXPORT void CIOLIBCALL ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font); CIOLIBEXPORT void ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font);
CIOLIBEXPORT void CIOLIBCALL ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr); CIOLIBEXPORT void ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int width, int height); CIOLIBEXPORT void ciolib_setwinsize(int width, int height);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y); CIOLIBEXPORT void ciolib_setwinposition(int x, int y);
CIOLIBEXPORT enum ciolib_codepage CIOLIBCALL ciolib_getcodepage(void); CIOLIBEXPORT enum ciolib_codepage ciolib_getcodepage(void);
/* DoorWay specific stuff that's only applicable to ANSI mode. */ /* DoorWay specific stuff that's only applicable to ANSI mode. */
CIOLIBEXPORT void CIOLIBCALL ansi_ciolib_setdoorway(int enable); CIOLIBEXPORT void ansi_ciolib_setdoorway(int enable);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
...@@ -657,21 +650,21 @@ extern int ciolib_mouse_initialized; ...@@ -657,21 +650,21 @@ extern int ciolib_mouse_initialized;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
CIOLIBEXPORT void CIOLIBCALL ciomouse_gotevent(int event, int x, int y, int x_res, int y_res); CIOLIBEXPORT void ciomouse_gotevent(int event, int x, int y, int x_res, int y_res);
CIOLIBEXPORT int CIOLIBCALL mouse_trywait(void); CIOLIBEXPORT int mouse_trywait(void);
CIOLIBEXPORT int CIOLIBCALL mouse_wait(void); CIOLIBEXPORT int mouse_wait(void);
CIOLIBEXPORT int CIOLIBCALL mouse_pending(void); CIOLIBEXPORT int mouse_pending(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent); CIOLIBEXPORT int ciolib_getmouse(struct mouse_event *mevent);
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetmouse(struct mouse_event *mevent); CIOLIBEXPORT int ciolib_ungetmouse(struct mouse_event *mevent);
CIOLIBEXPORT void ciolib_mouse_thread(void *data); CIOLIBEXPORT void ciolib_mouse_thread(void *data);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_setevents(uint64_t events); CIOLIBEXPORT uint64_t ciomouse_setevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_addevents(uint64_t events); CIOLIBEXPORT uint64_t ciomouse_addevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_delevents(uint64_t events); CIOLIBEXPORT uint64_t ciomouse_delevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_addevent(uint64_t event); CIOLIBEXPORT uint64_t ciomouse_addevent(uint64_t event);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_delevent(uint64_t event); CIOLIBEXPORT uint64_t ciomouse_delevent(uint64_t event);
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_mousepointer(enum ciolib_mouse_ptr type); CIOLIBEXPORT uint32_t ciolib_mousepointer(enum ciolib_mouse_ptr type);
CIOLIBEXPORT void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons); CIOLIBEXPORT void mousestate(int *x, int *y, uint8_t *buttons);
CIOLIBEXPORT void CIOLIBCALL mousestate_res(int *x_res, int *y_res, uint8_t *buttons); CIOLIBEXPORT void mousestate_res(int *x_res, int *y_res, uint8_t *buttons);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -1270,7 +1270,7 @@ clear2bol(struct cterminal * cterm) ...@@ -1270,7 +1270,7 @@ clear2bol(struct cterminal * cterm)
free(buf); free(buf);
} }
void CIOLIBCALL void
cterm_clearscreen(struct cterminal *cterm, char attr) cterm_clearscreen(struct cterminal *cterm, char attr)
{ {
int getw; int getw;
...@@ -4389,7 +4389,7 @@ cterm_reset(struct cterminal *cterm) ...@@ -4389,7 +4389,7 @@ cterm_reset(struct cterminal *cterm)
} }
} }
struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypos, int backlines, int backcols, struct vmem_cell *scrollback, int emulation) struct cterminal* cterm_init(int height, int width, int xpos, int ypos, int backlines, int backcols, struct vmem_cell *scrollback, int emulation)
{ {
char *revision="$Revision: 1.314 $"; char *revision="$Revision: 1.314 $";
char *in; char *in;
...@@ -4461,7 +4461,7 @@ struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypo ...@@ -4461,7 +4461,7 @@ struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypo
return cterm; return cterm;
} }
void CIOLIBCALL cterm_start(struct cterminal *cterm) void cterm_start(struct cterminal *cterm)
{ {
struct text_info ti; struct text_info ti;
...@@ -4758,7 +4758,7 @@ static void parse_macro_intro(struct cterminal *cterm) ...@@ -4758,7 +4758,7 @@ static void parse_macro_intro(struct cterminal *cterm)
#define uctputs(c, p) ctputs(c, (char *)p) #define uctputs(c, p) ctputs(c, (char *)p)
#define ustrcat(b, s) strcat((char *)b, (const char *)s) #define ustrcat(b, s) strcat((char *)b, (const char *)s)
CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void *vbuf, int buflen, char *retbuf, size_t retsize, int *speed) CIOLIBEXPORT char* cterm_write(struct cterminal * cterm, const void *vbuf, int buflen, char *retbuf, size_t retsize, int *speed)
{ {
const unsigned char *buf = (unsigned char *)vbuf; const unsigned char *buf = (unsigned char *)vbuf;
unsigned char ch[2]; unsigned char ch[2];
...@@ -5541,7 +5541,7 @@ CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void * ...@@ -5541,7 +5541,7 @@ CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void *
return(retbuf); return(retbuf);
} }
int CIOLIBCALL cterm_openlog(struct cterminal *cterm, char *logfile, int logtype) int cterm_openlog(struct cterminal *cterm, char *logfile, int logtype)
{ {
if(!cterm->started) if(!cterm->started)
cterm_start(cterm); cterm_start(cterm);
...@@ -5553,7 +5553,7 @@ int CIOLIBCALL cterm_openlog(struct cterminal *cterm, char *logfile, int logtype ...@@ -5553,7 +5553,7 @@ int CIOLIBCALL cterm_openlog(struct cterminal *cterm, char *logfile, int logtype
return(1); return(1);
} }
void CIOLIBCALL cterm_closelog(struct cterminal *cterm) void cterm_closelog(struct cterminal *cterm)
{ {
if(!cterm->started) if(!cterm->started)
cterm_start(cterm); cterm_start(cterm);
...@@ -5565,7 +5565,7 @@ void CIOLIBCALL cterm_closelog(struct cterminal *cterm) ...@@ -5565,7 +5565,7 @@ void CIOLIBCALL cterm_closelog(struct cterminal *cterm)
} }
FILE *dbg; FILE *dbg;
void CIOLIBCALL cterm_end(struct cterminal *cterm) void cterm_end(struct cterminal *cterm)
{ {
int i; int i;
......
...@@ -241,27 +241,27 @@ struct cterminal { ...@@ -241,27 +241,27 @@ struct cterminal {
int (*ciolib_cputs) (struct cterminal *,char *); int (*ciolib_cputs) (struct cterminal *,char *);
int (*ciolib_setfont) (struct cterminal *,int font, int force, int font_num); int (*ciolib_setfont) (struct cterminal *,int font, int force, int font_num);
#else #else
void CIOLIBCALL (*ciolib_gotoxy) (int,int); void (*ciolib_gotoxy) (int,int);
int CIOLIBCALL (*ciolib_wherex) (void); int (*ciolib_wherex) (void);
int CIOLIBCALL (*ciolib_wherey) (void); int (*ciolib_wherey) (void);
int CIOLIBCALL (*ciolib_gettext) (int,int,int,int,void *); int (*ciolib_gettext) (int,int,int,int,void *);
int CIOLIBCALL (*ciolib_vmem_gettext) (int,int,int,int,struct vmem_cell *); int (*ciolib_vmem_gettext) (int,int,int,int,struct vmem_cell *);
void CIOLIBCALL (*ciolib_gettextinfo) (struct text_info *); void (*ciolib_gettextinfo) (struct text_info *);
void CIOLIBCALL (*ciolib_textattr) (int); void (*ciolib_textattr) (int);
void CIOLIBCALL (*ciolib_setcursortype) (int); void (*ciolib_setcursortype) (int);
int CIOLIBCALL (*ciolib_movetext) (int,int,int,int,int,int); int (*ciolib_movetext) (int,int,int,int,int,int);
void CIOLIBCALL (*ciolib_clreol) (void); void (*ciolib_clreol) (void);
void CIOLIBCALL (*ciolib_clrscr) (void); void (*ciolib_clrscr) (void);
void CIOLIBCALL (*ciolib_setvideoflags) (int flags); void (*ciolib_setvideoflags) (int flags);
int CIOLIBCALL (*ciolib_getvideoflags) (void); int (*ciolib_getvideoflags) (void);
void CIOLIBCALL (*ciolib_setscaling) (int new_value); void (*ciolib_setscaling) (int new_value);
int CIOLIBCALL (*ciolib_getscaling) (void); int (*ciolib_getscaling) (void);
int CIOLIBCALL (*ciolib_putch) (int); int (*ciolib_putch) (int);
int CIOLIBCALL (*ciolib_puttext) (int,int,int,int,void *); int (*ciolib_puttext) (int,int,int,int,void *);
int CIOLIBCALL (*ciolib_vmem_puttext) (int,int,int,int,struct vmem_cell *); int (*ciolib_vmem_puttext) (int,int,int,int,struct vmem_cell *);
void CIOLIBCALL (*ciolib_window) (int,int,int,int); void (*ciolib_window) (int,int,int,int);
int CIOLIBCALL (*ciolib_cputs) (char *); int (*ciolib_cputs) (char *);
int CIOLIBCALL (*ciolib_setfont) (int font, int force, int font_num); int (*ciolib_setfont) (int font, int force, int font_num);
#endif #endif
int *_wscroll; int *_wscroll;
int *puttext_can_move; int *puttext_can_move;
...@@ -273,13 +273,13 @@ struct cterminal { ...@@ -273,13 +273,13 @@ struct cterminal {
extern "C" { extern "C" {
#endif #endif
CIOLIBEXPORT struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypos, int backlines, int backcols, struct vmem_cell *scrollback, int emulation); CIOLIBEXPORT struct cterminal* cterm_init(int height, int width, int xpos, int ypos, int backlines, int backcols, struct vmem_cell *scrollback, int emulation);
CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal *cterm, const void *buf, int buflen, char *retbuf, size_t retsize, int *speed); CIOLIBEXPORT char* cterm_write(struct cterminal *cterm, const void *buf, int buflen, char *retbuf, size_t retsize, int *speed);
CIOLIBEXPORT int CIOLIBCALL cterm_openlog(struct cterminal *cterm, char *logfile, int logtype); CIOLIBEXPORT int cterm_openlog(struct cterminal *cterm, char *logfile, int logtype);
CIOLIBEXPORT void CIOLIBCALL cterm_closelog(struct cterminal *cterm); CIOLIBEXPORT void cterm_closelog(struct cterminal *cterm);
CIOLIBEXPORT void CIOLIBCALL cterm_end(struct cterminal *cterm); CIOLIBEXPORT void cterm_end(struct cterminal *cterm);
CIOLIBEXPORT void CIOLIBCALL cterm_clearscreen(struct cterminal *cterm, char attr); CIOLIBEXPORT void cterm_clearscreen(struct cterminal *cterm, char attr);
CIOLIBEXPORT void CIOLIBCALL cterm_start(struct cterminal *cterm); CIOLIBEXPORT void cterm_start(struct cterminal *cterm);
void cterm_gotoxy(struct cterminal *cterm, int x, int y); void cterm_gotoxy(struct cterminal *cterm, int x, int y);
void setwindow(struct cterminal *cterm); void setwindow(struct cterminal *cterm);
void cterm_clreol(struct cterminal *cterm); void cterm_clreol(struct cterminal *cterm);
......
...@@ -110,7 +110,7 @@ int ciolib_mouse_initialized=0; ...@@ -110,7 +110,7 @@ int ciolib_mouse_initialized=0;
static int ungot=0; static int ungot=0;
pthread_mutex_t unget_mutex; pthread_mutex_t unget_mutex;
void CIOLIBCALL init_mouse(void) void init_mouse(void)
{ {
memset(&state,0,sizeof(state)); memset(&state,0,sizeof(state));
state.click_timeout=0; state.click_timeout=0;
...@@ -121,7 +121,7 @@ void CIOLIBCALL init_mouse(void) ...@@ -121,7 +121,7 @@ void CIOLIBCALL init_mouse(void)
ciolib_mouse_initialized=1; ciolib_mouse_initialized=1;
} }
void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons) void mousestate(int *x, int *y, uint8_t *buttons)
{ {
if (!ciolib_mouse_initialized) { if (!ciolib_mouse_initialized) {
if (x) if (x)
...@@ -139,7 +139,7 @@ void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons) ...@@ -139,7 +139,7 @@ void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons)
return; return;
} }
void CIOLIBCALL mousestate_res(int *x, int *y, uint8_t *buttons) void mousestate_res(int *x, int *y, uint8_t *buttons)
{ {
if (!ciolib_mouse_initialized) { if (!ciolib_mouse_initialized) {
if (x) if (x)
...@@ -157,37 +157,37 @@ void CIOLIBCALL mousestate_res(int *x, int *y, uint8_t *buttons) ...@@ -157,37 +157,37 @@ void CIOLIBCALL mousestate_res(int *x, int *y, uint8_t *buttons)
return; return;
} }
uint64_t CIOLIBCALL ciomouse_setevents(uint64_t events) uint64_t ciomouse_setevents(uint64_t events)
{ {
mouse_events=events; mouse_events=events;
return mouse_events; return mouse_events;
} }
uint64_t CIOLIBCALL ciomouse_addevents(uint64_t events) uint64_t ciomouse_addevents(uint64_t events)
{ {
mouse_events |= events; mouse_events |= events;
return mouse_events; return mouse_events;
} }
uint64_t CIOLIBCALL ciomouse_delevents(uint64_t events) uint64_t ciomouse_delevents(uint64_t events)
{ {
mouse_events &= ~events; mouse_events &= ~events;
return mouse_events; return mouse_events;
} }
uint64_t CIOLIBCALL ciomouse_addevent(uint64_t event) uint64_t ciomouse_addevent(uint64_t event)
{ {
mouse_events |= (UINT64_C(1)<<event); mouse_events |= (UINT64_C(1)<<event);
return mouse_events; return mouse_events;
} }
uint64_t CIOLIBCALL ciomouse_delevent(uint64_t event) uint64_t ciomouse_delevent(uint64_t event)
{ {
mouse_events &= ~(UINT64_C(1)<<event); mouse_events &= ~(UINT64_C(1)<<event);
return mouse_events; return mouse_events;
} }
void CIOLIBCALL ciomouse_gotevent(int event, int x, int y, int x_res, int y_res) void ciomouse_gotevent(int event, int x, int y, int x_res, int y_res)
{ {
struct in_mouse_event *ime; struct in_mouse_event *ime;
...@@ -207,7 +207,7 @@ void CIOLIBCALL ciomouse_gotevent(int event, int x, int y, int x_res, int y_res) ...@@ -207,7 +207,7 @@ void CIOLIBCALL ciomouse_gotevent(int event, int x, int y, int x_res, int y_res)
} }
} }
void CIOLIBCALL add_outevent(int event, int x, int y, int xres, int yres) void add_outevent(int event, int x, int y, int xres, int yres)
{ {
struct out_mouse_event *ome; struct out_mouse_event *ome;
int but; int but;
...@@ -236,7 +236,7 @@ void CIOLIBCALL add_outevent(int event, int x, int y, int xres, int yres) ...@@ -236,7 +236,7 @@ void CIOLIBCALL add_outevent(int event, int x, int y, int xres, int yres)
} }
} }
int CIOLIBCALL more_multies(int button, int clicks) int more_multies(int button, int clicks)
{ {
switch(clicks) { switch(clicks) {
case 0: case 0:
...@@ -516,7 +516,7 @@ void ciolib_mouse_thread(void *data) ...@@ -516,7 +516,7 @@ void ciolib_mouse_thread(void *data)
} }
} }
int CIOLIBCALL mouse_trywait(void) int mouse_trywait(void)
{ {
int result; int result;
...@@ -534,7 +534,7 @@ int CIOLIBCALL mouse_trywait(void) ...@@ -534,7 +534,7 @@ int CIOLIBCALL mouse_trywait(void)
} }
} }
int CIOLIBCALL mouse_wait(void) int mouse_wait(void)
{ {
int result; int result;
...@@ -552,14 +552,14 @@ int CIOLIBCALL mouse_wait(void) ...@@ -552,14 +552,14 @@ int CIOLIBCALL mouse_wait(void)
} }
} }
int CIOLIBCALL mouse_pending(void) int mouse_pending(void)
{ {
while(!ciolib_mouse_initialized) while(!ciolib_mouse_initialized)
SLEEP(1); SLEEP(1);
return(listCountNodes(&state.output)); return(listCountNodes(&state.output));
} }
int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent) int ciolib_getmouse(struct mouse_event *mevent)
{ {
int retval=0; int retval=0;
...@@ -594,7 +594,7 @@ int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent) ...@@ -594,7 +594,7 @@ int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent)
return(retval); return(retval);
} }
int CIOLIBCALL ciolib_ungetmouse(struct mouse_event *mevent) int ciolib_ungetmouse(struct mouse_event *mevent)
{ {
struct mouse_event *me; struct mouse_event *me;
......
...@@ -42,22 +42,16 @@ ...@@ -42,22 +42,16 @@
#else #else
#define B64EXPORT __declspec(dllexport) #define B64EXPORT __declspec(dllexport)
#endif #endif
#if defined(__BORLANDC__)
#define B64CALL
#else
#define B64CALL
#endif
#else /* !_WIN32 */ #else /* !_WIN32 */
#define B64EXPORT #define B64EXPORT
#define B64CALL
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
B64EXPORT int B64CALL b64_encode(char *target, size_t tlen, const char *source, size_t slen); B64EXPORT int b64_encode(char *target, size_t tlen, const char *source, size_t slen);
B64EXPORT int B64CALL b64_decode(char *target, size_t tlen, const char *source, size_t slen); B64EXPORT int b64_decode(char *target, size_t tlen, const char *source, size_t slen);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -558,7 +558,7 @@ static short int lzh_decode_position(lzh_t* lzh, uint8_t *inbuf, int32_t *incnt, ...@@ -558,7 +558,7 @@ static short int lzh_decode_position(lzh_t* lzh, uint8_t *inbuf, int32_t *incnt,
/* Encoding/Compressing */ /* Encoding/Compressing */
/* Returns length of outbuf */ /* Returns length of outbuf */
int32_t LZHCALL lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf) int32_t lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf)
{ {
short int i, c, len, r, s, last_match_length; short int i, c, len, r, s, last_match_length;
int32_t incnt,outlen; /* textsize=0; */ int32_t incnt,outlen; /* textsize=0; */
...@@ -688,7 +688,7 @@ int32_t LZHCALL lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf) ...@@ -688,7 +688,7 @@ int32_t LZHCALL lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf)
/* Decoding/Uncompressing */ /* Decoding/Uncompressing */
/* Returns length of outbuf */ /* Returns length of outbuf */
int32_t LZHCALL lzh_decode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf) int32_t lzh_decode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf)
{ {
short int i, j, k, r, c; short int i, j, k, r, c;
uint32_t count; uint32_t count;
......
/* lzh.h */
/* Synchronet LZH compression library */ /* Synchronet LZH compression library */
/* $Id: lzh.h,v 1.13 2019/03/22 21:29:12 rswindell Exp $ */
/**************************************************************************** /****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
...@@ -16,18 +12,6 @@ ...@@ -16,18 +12,6 @@
* Anonymous FTP access to the most recent released source is available at * * Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* * * *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. * * Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/ ****************************************************************************/
...@@ -39,11 +23,6 @@ ...@@ -39,11 +23,6 @@
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef __BORLANDC__
#define LZHCALL
#else
#define LZHCALL
#endif
#ifdef LZHDLL /* LZH functions in DLL */ #ifdef LZHDLL /* LZH functions in DLL */
#ifdef LZH_EXPORTS #ifdef LZH_EXPORTS
#define LZHEXPORT __declspec( dllexport ) #define LZHEXPORT __declspec( dllexport )
...@@ -54,7 +33,6 @@ ...@@ -54,7 +33,6 @@
#define LZHEXPORT #define LZHEXPORT
#endif #endif
#else /* !_WIN32 */ #else /* !_WIN32 */
#define LZHCALL
#define LZHEXPORT #define LZHEXPORT
#endif #endif
...@@ -63,8 +41,8 @@ ...@@ -63,8 +41,8 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
LZHEXPORT int32_t LZHCALL lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf); LZHEXPORT int32_t lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf);
LZHEXPORT int32_t LZHCALL lzh_decode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf); LZHEXPORT int32_t lzh_decode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -139,9 +139,6 @@ static ini_bitdesc_t ftp_options[] = { ...@@ -139,9 +139,6 @@ static ini_bitdesc_t ftp_options[] = {
#ifdef DLLEXPORT #ifdef DLLEXPORT
#undef DLLEXPORT #undef DLLEXPORT
#endif #endif
#ifdef DLLCALL
#undef DLLCALL
#endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef FTPSRVR_EXPORTS #ifdef FTPSRVR_EXPORTS
...@@ -149,23 +146,17 @@ static ini_bitdesc_t ftp_options[] = { ...@@ -149,23 +146,17 @@ static ini_bitdesc_t ftp_options[] = {
#else #else
#define DLLEXPORT __declspec(dllimport) #define DLLEXPORT __declspec(dllimport)
#endif #endif
#ifdef __BORLANDC__
#define DLLCALL
#else
#define DLLCALL
#endif
#else #else
#define DLLEXPORT #define DLLEXPORT
#define DLLCALL
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* arg is pointer to static ftp_startup_t */ /* arg is pointer to static ftp_startup_t */
DLLEXPORT void DLLCALL ftp_server(void* arg); DLLEXPORT void ftp_server(void* arg);
DLLEXPORT void DLLCALL ftp_terminate(void); DLLEXPORT void ftp_terminate(void);
DLLEXPORT const char* DLLCALL ftp_ver(void); DLLEXPORT const char* ftp_ver(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -7,6 +7,6 @@ struct js_cryptcert_private_data { ...@@ -7,6 +7,6 @@ struct js_cryptcert_private_data {
extern JSClass js_cryptcert_class; extern JSClass js_cryptcert_class;
JSObject* DLLCALL js_CreateCryptCertObject(JSContext* cx, CRYPT_CERTIFICATE cert); JSObject* js_CreateCryptCertObject(JSContext* cx, CRYPT_CERTIFICATE cert);
#endif #endif
...@@ -7,6 +7,6 @@ struct js_cryptcon_private_data { ...@@ -7,6 +7,6 @@ struct js_cryptcon_private_data {
extern JSClass js_cryptcon_class; extern JSClass js_cryptcon_class;
JSObject* DLLCALL js_CreateCryptconObject(JSContext* cx, CRYPT_CONTEXT ctx); JSObject* js_CreateCryptconObject(JSContext* cx, CRYPT_CONTEXT ctx);
#endif #endif
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
/****************************************************************************/ /****************************************************************************/
/* Returns 0 on success, non-zero on failure */ /* Returns 0 on success, non-zero on failure */
/****************************************************************************/ /****************************************************************************/
int RINGBUFCALL RingBufInit( RingBuf* rb, DWORD size int RingBufInit( RingBuf* rb, DWORD size
#ifndef RINGBUF_USE_STD_RTL #ifndef RINGBUF_USE_STD_RTL
,void *(os_malloc)(size_t) ,void *(os_malloc)(size_t)
,void (os_free)(void *) ,void (os_free)(void *)
...@@ -108,7 +108,7 @@ int RINGBUFCALL RingBufInit( RingBuf* rb, DWORD size ...@@ -108,7 +108,7 @@ int RINGBUFCALL RingBufInit( RingBuf* rb, DWORD size
return(0); return(0);
} }
void RINGBUFCALL RingBufDispose( RingBuf* rb) void RingBufDispose( RingBuf* rb)
{ {
if(rb->pStart!=NULL) if(rb->pStart!=NULL)
os_free(rb->pStart); os_free(rb->pStart);
...@@ -137,7 +137,7 @@ void RINGBUFCALL RingBufDispose( RingBuf* rb) ...@@ -137,7 +137,7 @@ void RINGBUFCALL RingBufDispose( RingBuf* rb)
#define RINGBUF_FILL_LEVEL(rb) (rb->pHead >= rb->pTail ? (rb->pHead - rb->pTail) \ #define RINGBUF_FILL_LEVEL(rb) (rb->pHead >= rb->pTail ? (rb->pHead - rb->pTail) \
: (rb->size - (rb->pTail - (rb->pHead + 1)))) : (rb->size - (rb->pTail - (rb->pHead + 1))))
DWORD RINGBUFCALL RingBufFull( RingBuf* rb ) DWORD RingBufFull( RingBuf* rb )
{ {
DWORD retval; DWORD retval;
...@@ -154,7 +154,7 @@ DWORD RINGBUFCALL RingBufFull( RingBuf* rb ) ...@@ -154,7 +154,7 @@ DWORD RINGBUFCALL RingBufFull( RingBuf* rb )
return(retval); return(retval);
} }
DWORD RINGBUFCALL RingBufFree( RingBuf* rb ) DWORD RingBufFree( RingBuf* rb )
{ {
DWORD retval; DWORD retval;
...@@ -163,7 +163,7 @@ DWORD RINGBUFCALL RingBufFree( RingBuf* rb ) ...@@ -163,7 +163,7 @@ DWORD RINGBUFCALL RingBufFree( RingBuf* rb )
return(retval); return(retval);
} }
DWORD RINGBUFCALL RingBufWrite( RingBuf* rb, const BYTE* src, DWORD cnt ) DWORD RingBufWrite( RingBuf* rb, const BYTE* src, DWORD cnt )
{ {
DWORD max, first, remain, fill_level; DWORD max, first, remain, fill_level;
...@@ -224,7 +224,7 @@ DWORD RINGBUFCALL RingBufWrite( RingBuf* rb, const BYTE* src, DWORD cnt ) ...@@ -224,7 +224,7 @@ DWORD RINGBUFCALL RingBufWrite( RingBuf* rb, const BYTE* src, DWORD cnt )
} }
/* Pass NULL dst to just foward pointer (after Peek) */ /* Pass NULL dst to just foward pointer (after Peek) */
DWORD RINGBUFCALL RingBufRead( RingBuf* rb, BYTE* dst, DWORD cnt ) DWORD RingBufRead( RingBuf* rb, BYTE* dst, DWORD cnt )
{ {
DWORD max, first, remain, len; DWORD max, first, remain, len;
...@@ -284,7 +284,7 @@ DWORD RINGBUFCALL RingBufRead( RingBuf* rb, BYTE* dst, DWORD cnt ) ...@@ -284,7 +284,7 @@ DWORD RINGBUFCALL RingBufRead( RingBuf* rb, BYTE* dst, DWORD cnt )
return(cnt); return(cnt);
} }
DWORD RINGBUFCALL RingBufPeek( RingBuf* rb, BYTE* dst, DWORD cnt) DWORD RingBufPeek( RingBuf* rb, BYTE* dst, DWORD cnt)
{ {
DWORD max, first, remain, len; DWORD max, first, remain, len;
...@@ -325,7 +325,7 @@ DWORD RINGBUFCALL RingBufPeek( RingBuf* rb, BYTE* dst, DWORD cnt) ...@@ -325,7 +325,7 @@ DWORD RINGBUFCALL RingBufPeek( RingBuf* rb, BYTE* dst, DWORD cnt)
} }
/* Reset head and tail pointers */ /* Reset head and tail pointers */
void RINGBUFCALL RingBufReInit(RingBuf* rb) void RingBufReInit(RingBuf* rb)
{ {
#ifdef RINGBUF_MUTEX #ifdef RINGBUF_MUTEX
pthread_mutex_lock(&rb->mutex); pthread_mutex_lock(&rb->mutex);
......
...@@ -151,9 +151,6 @@ static ini_bitdesc_t web_options[] = { ...@@ -151,9 +151,6 @@ static ini_bitdesc_t web_options[] = {
#ifdef DLLEXPORT #ifdef DLLEXPORT
#undef DLLEXPORT #undef DLLEXPORT
#endif #endif
#ifdef DLLCALL
#undef DLLCALL
#endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef WEBSRVR_EXPORTS #ifdef WEBSRVR_EXPORTS
...@@ -161,22 +158,16 @@ static ini_bitdesc_t web_options[] = { ...@@ -161,22 +158,16 @@ static ini_bitdesc_t web_options[] = {
#else #else
#define DLLEXPORT __declspec(dllimport) #define DLLEXPORT __declspec(dllimport)
#endif #endif
#ifdef __BORLANDC__
#define DLLCALL
#else
#define DLLCALL
#endif
#else #else
#define DLLEXPORT #define DLLEXPORT
#define DLLCALL
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
DLLEXPORT void DLLCALL web_server(void* arg); DLLEXPORT void web_server(void* arg);
DLLEXPORT void DLLCALL web_terminate(void); DLLEXPORT void web_terminate(void);
DLLEXPORT const char* DLLCALL web_ver(void); DLLEXPORT const char* web_ver(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -52,11 +52,6 @@ ...@@ -52,11 +52,6 @@
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef __BORLANDC__
#define UIFCCALL
#else
#define UIFCCALL
#endif
#if defined(UIFC_IMPORTS) || defined(UIFC_EXPORTS) #if defined(UIFC_IMPORTS) || defined(UIFC_EXPORTS)
#if defined(UIFC_IMPORTS) #if defined(UIFC_IMPORTS)
#define UIFCEXPORT __declspec( dllimport ) #define UIFCEXPORT __declspec( dllimport )
...@@ -70,7 +65,6 @@ ...@@ -70,7 +65,6 @@
#define UIFCEXPORTVAR extern #define UIFCEXPORTVAR extern
#endif #endif
#else #else
#define UIFCCALL
#define UIFCEXPORT #define UIFCEXPORT
#define UIFCEXPORTVAR extern #define UIFCEXPORTVAR extern
#endif #endif
...@@ -530,8 +524,8 @@ UIFCEXPORTVAR char* uifcYesNoOpts[]; ...@@ -530,8 +524,8 @@ UIFCEXPORTVAR char* uifcYesNoOpts[];
/* Returns 0 on success, non-zero on failure. */ /* Returns 0 on success, non-zero on failure. */
/****************************************************************************/ /****************************************************************************/
int uifcini(uifcapi_t*); /* Original implementation based on conio */ int uifcini(uifcapi_t*); /* Original implementation based on conio */
UIFCEXPORT int UIFCCALL uifcinix(uifcapi_t*); /* Standard I/O implementation */ UIFCEXPORT int uifcinix(uifcapi_t*); /* Standard I/O implementation */
UIFCEXPORT int UIFCCALL uifcini32(uifcapi_t*); /* modern implementation */ UIFCEXPORT int uifcini32(uifcapi_t*); /* modern implementation */
/****************************************************************************/ /****************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -207,7 +207,7 @@ int inkey(void) ...@@ -207,7 +207,7 @@ int inkey(void)
return(c); return(c);
} }
int UIFCCALL uifcini32(uifcapi_t* uifcapi) int uifcini32(uifcapi_t* uifcapi)
{ {
unsigned i; unsigned i;
struct text_info txtinfo; struct text_info txtinfo;
......
...@@ -86,7 +86,7 @@ static int uprintf(int x, int y, unsigned attr, char *fmat, ...) ...@@ -86,7 +86,7 @@ static int uprintf(int x, int y, unsigned attr, char *fmat, ...)
/* Initialization function, see uifc.h for details. */ /* Initialization function, see uifc.h for details. */
/* Returns 0 on success. */ /* Returns 0 on success. */
/****************************************************************************/ /****************************************************************************/
int UIFCCALL uifcinix(uifcapi_t* uifcapi) int uifcinix(uifcapi_t* uifcapi)
{ {
static char* yesNoOpts[] = {"Yes", "No", NULL}; static char* yesNoOpts[] = {"Yes", "No", NULL};
......
/* datewrap.h */
/* Wrappers for non-standard date and time functions */ /* Wrappers for non-standard date and time functions */
/* $Id: datewrap.h,v 1.28 2019/07/24 04:08:25 rswindell Exp $ */
/**************************************************************************** /****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
...@@ -17,21 +13,9 @@ ...@@ -17,21 +13,9 @@
* See the GNU Lesser General Public License for more details: lgpl.txt or * * See the GNU Lesser General Public License for more details: lgpl.txt or *
* http://www.fsf.org/copyleft/lesser.html * * http://www.fsf.org/copyleft/lesser.html *
* * * *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see * * For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html * * http://www.synchro.net/source.html *
* * * *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. * * Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/ ****************************************************************************/
...@@ -45,16 +29,16 @@ extern "C" { ...@@ -45,16 +29,16 @@ extern "C" {
#endif #endif
/* Return difference (in seconds) in time() result from standard (0 on success) */ /* Return difference (in seconds) in time() result from standard (0 on success) */
DLLEXPORT time_t DLLCALL checktime(void); DLLEXPORT time_t checktime(void);
/* Implementation of mktime()/timegm() that handles common tm element conversions for you */ /* Implementation of mktime()/timegm() that handles common tm element conversions for you */
DLLEXPORT time_t DLLCALL sane_mktime(struct tm*); DLLEXPORT time_t sane_mktime(struct tm*);
DLLEXPORT time_t DLLCALL sane_timegm(struct tm*); DLLEXPORT time_t sane_timegm(struct tm*);
/* Legacy (32-bit time_t) versions of time() and mktime() */ /* Legacy (32-bit time_t) versions of time() and mktime() */
DLLEXPORT time32_t DLLCALL time32(time32_t* tp); DLLEXPORT time32_t time32(time32_t* tp);
DLLEXPORT time32_t DLLCALL mktime32(struct tm*); DLLEXPORT time32_t mktime32(struct tm*);
DLLEXPORT struct tm* DLLCALL localtime32(const time32_t* t, struct tm* tm); DLLEXPORT struct tm* localtime32(const time32_t* t, struct tm* tm);
/*********************************************************************************/ /*********************************************************************************/
/* Win32 implementations of recursive (thread-safe) std C time functions on Unix */ /* Win32 implementations of recursive (thread-safe) std C time functions on Unix */
...@@ -64,10 +48,10 @@ DLLEXPORT struct tm* DLLCALL localtime32(const time32_t* t, struct tm* tm); ...@@ -64,10 +48,10 @@ DLLEXPORT struct tm* DLLCALL localtime32(const time32_t* t, struct tm* tm);
#include <time.h> /* time_t, etc. */ #include <time.h> /* time_t, etc. */
DLLEXPORT struct tm* DLLCALL gmtime_r(const time_t* t, struct tm* tm); DLLEXPORT struct tm* gmtime_r(const time_t* t, struct tm* tm);
DLLEXPORT struct tm* DLLCALL localtime_r(const time_t* t, struct tm* tm); DLLEXPORT struct tm* localtime_r(const time_t* t, struct tm* tm);
DLLEXPORT char* DLLCALL ctime_r(const time_t *t, char *buf); DLLEXPORT char* ctime_r(const time_t *t, char *buf);
DLLEXPORT char* DLLCALL asctime_r(const struct tm *tm, char *buf); DLLEXPORT char* asctime_r(const struct tm *tm, char *buf);
#endif #endif
...@@ -103,8 +87,8 @@ struct time { ...@@ -103,8 +87,8 @@ struct time {
}; };
#define getdate(x) xp_getdate(x) #define getdate(x) xp_getdate(x)
DLLEXPORT void DLLCALL xp_getdate(struct date*); DLLEXPORT void xp_getdate(struct date*);
DLLEXPORT void DLLCALL gettime(struct time*); DLLEXPORT void gettime(struct time*);
#endif /* !Borland */ #endif /* !Borland */
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#endif #endif
#include "gen_defs.h" /* ulong */ #include "gen_defs.h" /* ulong */
#include "wrapdll.h" /* DLLEXPORT and DLLCALL */ #include "wrapdll.h" /* DLLEXPORT */
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
...@@ -105,8 +105,8 @@ extern "C" { ...@@ -105,8 +105,8 @@ extern "C" {
#define GLOB_NOMATCH 3 /* No matches found. */ #define GLOB_NOMATCH 3 /* No matches found. */
#define GLOB_NOSYS 4 /* Not implemented. */ #define GLOB_NOSYS 4 /* Not implemented. */
DLLEXPORT int DLLCALL glob(const char *pattern, int flags, void* unused, glob_t*); DLLEXPORT int glob(const char *pattern, int flags, void* unused, glob_t*);
DLLEXPORT void DLLCALL globfree(glob_t*); DLLEXPORT void globfree(glob_t*);
#endif #endif
...@@ -140,10 +140,10 @@ extern "C" { ...@@ -140,10 +140,10 @@ extern "C" {
/* Prototypes. /* Prototypes.
*/ */
DLLEXPORT DIR* DLLCALL opendir (const char *__dirname); DLLEXPORT DIR* opendir (const char *__dirname);
DLLEXPORT struct dirent* DLLCALL readdir (DIR *__dir); DLLEXPORT struct dirent* readdir (DIR *__dir);
DLLEXPORT int DLLCALL closedir (DIR *__dir); DLLEXPORT int closedir (DIR *__dir);
DLLEXPORT void DLLCALL rewinddir(DIR *__dir); DLLEXPORT void rewinddir(DIR *__dir);
#elif !defined(__WATCOMC__) #elif !defined(__WATCOMC__)
#include <dirent.h> /* POSIX directory functions */ #include <dirent.h> /* POSIX directory functions */
#endif #endif
...@@ -200,37 +200,37 @@ extern "C" { ...@@ -200,37 +200,37 @@ extern "C" {
#endif #endif
/* General file system wrappers for all platforms and compilers */ /* General file system wrappers for all platforms and compilers */
DLLEXPORT BOOL DLLCALL fexist(const char *filespec); DLLEXPORT BOOL fexist(const char *filespec);
DLLEXPORT BOOL DLLCALL fexistcase(char *filespec); /* fixes upr/lwr case fname */ DLLEXPORT BOOL fexistcase(char *filespec); /* fixes upr/lwr case fname */
DLLEXPORT off_t DLLCALL flength(const char *filename); DLLEXPORT off_t flength(const char *filename);
DLLEXPORT time_t DLLCALL fdate(const char *filename); DLLEXPORT time_t fdate(const char *filename);
DLLEXPORT time_t DLLCALL fcdate(const char* filename); DLLEXPORT time_t fcdate(const char* filename);
DLLEXPORT int DLLCALL setfdate(const char* filename, time_t t); DLLEXPORT int setfdate(const char* filename, time_t t);
DLLEXPORT BOOL DLLCALL isdir(const char *filename); DLLEXPORT BOOL isdir(const char *filename);
DLLEXPORT BOOL DLLCALL isabspath(const char *filename); DLLEXPORT BOOL isabspath(const char *filename);
DLLEXPORT BOOL DLLCALL isfullpath(const char* filename); DLLEXPORT BOOL isfullpath(const char* filename);
DLLEXPORT char* DLLCALL getfname(const char* path); DLLEXPORT char* getfname(const char* path);
DLLEXPORT char* DLLCALL getfext(const char* path); DLLEXPORT char* getfext(const char* path);
DLLEXPORT int DLLCALL getfattr(const char* filename); DLLEXPORT int getfattr(const char* filename);
DLLEXPORT int DLLCALL getfmode(const char* filename); DLLEXPORT int getfmode(const char* filename);
DLLEXPORT ulong DLLCALL getfilecount(const char *path); DLLEXPORT ulong getfilecount(const char *path);
DLLEXPORT char* DLLCALL getdirname(const char* path); DLLEXPORT char* getdirname(const char* path);
DLLEXPORT long DLLCALL getdirsize(const char* path, BOOL include_subdirs, BOOL subdir_only); DLLEXPORT long getdirsize(const char* path, BOOL include_subdirs, BOOL subdir_only);
DLLEXPORT ulong DLLCALL getdisksize(const char* path, ulong unit); DLLEXPORT ulong getdisksize(const char* path, ulong unit);
DLLEXPORT ulong DLLCALL getfreediskspace(const char* path, ulong unit); DLLEXPORT ulong getfreediskspace(const char* path, ulong unit);
DLLEXPORT uint64_t DLLCALL getfilesizetotal(const char *path); DLLEXPORT uint64_t getfilesizetotal(const char *path);
DLLEXPORT long DLLCALL delfiles(const char *inpath, const char *spec, size_t keep); DLLEXPORT long delfiles(const char *inpath, const char *spec, size_t keep);
DLLEXPORT char* DLLCALL backslash(char* path); DLLEXPORT char* backslash(char* path);
DLLEXPORT BOOL DLLCALL wildmatch(const char *fname, const char *spec, BOOL path, BOOL case_sensitive); DLLEXPORT BOOL wildmatch(const char *fname, const char *spec, BOOL path, BOOL case_sensitive);
DLLEXPORT BOOL DLLCALL wildmatchi(const char *fname, const char *spec, BOOL path); DLLEXPORT BOOL wildmatchi(const char *fname, const char *spec, BOOL path);
DLLEXPORT int DLLCALL mkpath(const char* path); DLLEXPORT int mkpath(const char* path);
#if defined(__unix__) #if defined(__unix__)
DLLEXPORT void DLLCALL _splitpath(const char *path, char *drive, char *dir, DLLEXPORT void _splitpath(const char *path, char *drive, char *dir,
char *fname, char *ext); char *fname, char *ext);
DLLEXPORT char * DLLCALL _fullpath(char *target, const char *path, size_t size); DLLEXPORT char * _fullpath(char *target, const char *path, size_t size);
DLLEXPORT int DLLCALL removecase(const char *path); DLLEXPORT int removecase(const char *path);
#else #else
#define removecase(x) remove(x) #define removecase(x) remove(x)
#endif #endif
......
/* eventwrap.h */
/* Event-related cross-platform development wrappers (Win32 API emulation) */ /* Event-related cross-platform development wrappers (Win32 API emulation) */
/* $Id: eventwrap.h,v 1.4 2018/07/24 01:13:09 rswindell Exp $ */
/**************************************************************************** /****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
...@@ -17,21 +13,9 @@ ...@@ -17,21 +13,9 @@
* See the GNU Lesser General Public License for more details: lgpl.txt or * * See the GNU Lesser General Public License for more details: lgpl.txt or *
* http://www.fsf.org/copyleft/lesser.html * * http://www.fsf.org/copyleft/lesser.html *
* * * *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see * * For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html * * http://www.synchro.net/source.html *
* * * *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. * * Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/ ****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment