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 4da964dd authored by Rob Swindell's avatar Rob Swindell 💬

The great DLLCALL purge of 2021 - part 2

parent 759d2788
Pipeline #1831 passed with stage
in 10 minutes and 47 seconds
......@@ -1019,7 +1019,7 @@ void ansi_suspend(void)
#endif
}
CIOLIBEXPORT void CIOLIBCALL ansi_ciolib_setdoorway(int enable)
CIOLIBEXPORT void ansi_ciolib_setdoorway(int enable)
{
if(cio_api.mode!=CIOLIB_MODE_ANSI)
return;
......
This diff is collapsed.
......@@ -46,11 +46,6 @@
#endif
#ifdef _WIN32
#ifdef __BORLANDC__
#define CIOLIBCALL
#else
#define CIOLIBCALL
#endif
#if defined(CIOLIB_IMPORTS) || defined(CIOLIB_EXPORTS)
#if defined(CIOLIB_IMPORTS)
#define CIOLIBEXPORT __declspec( dllimport )
......@@ -64,11 +59,9 @@
#define CIOLIBEXPORTVAR extern
#endif
#elif defined __unix__
#define CIOLIBCALL
#define CIOLIBEXPORT
#define CIOLIBEXPORTVAR extern
#else
#define CIOLIBCALL
#define CIOLIBEXPORT
#define CIOLIBEXPORTVAR extern
#endif
......@@ -399,86 +392,86 @@ CIOLIBEXPORTVAR int ciolib_initial_window_width;
#ifdef __cplusplus
extern "C" {
#endif
CIOLIBEXPORT int CIOLIBCALL initciolib(int mode);
CIOLIBEXPORT void CIOLIBCALL suspendciolib(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy);
CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cscanf (char *format , ...);
CIOLIBEXPORT int CIOLIBCALL ciolib_kbhit(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getch(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getche(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetch(int ch);
CIOLIBEXPORT void CIOLIBCALL ciolib_gettextinfo(struct text_info *info);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherex(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_wherey(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_wscroll(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_gotoxy(int x, int y);
CIOLIBEXPORT void CIOLIBCALL ciolib_clreol(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_clrscr(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_cputs(char *str);
CIOLIBEXPORT int CIOLIBCALL ciolib_cprintf(const char *fmat, ...);
CIOLIBEXPORT void CIOLIBCALL ciolib_textbackground(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_textcolor(int colour);
CIOLIBEXPORT void CIOLIBCALL ciolib_highvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_lowvideo(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_normvideo(void);
CIOLIBEXPORT int CIOLIBCALL 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 CIOLIBCALL 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 void CIOLIBCALL ciolib_textattr(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_delay(long a);
CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_setcursortype(int a);
CIOLIBEXPORT void CIOLIBCALL ciolib_textmode(int mode);
CIOLIBEXPORT void CIOLIBCALL ciolib_window(int sx, int sy, int ex, int ey);
CIOLIBEXPORT void CIOLIBCALL ciolib_delline(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_insline(void);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getpass(const char *prompt);
CIOLIBEXPORT void CIOLIBCALL ciolib_settitle(const char *title);
CIOLIBEXPORT void CIOLIBCALL ciolib_setname(const char *title);
CIOLIBEXPORT void CIOLIBCALL ciolib_seticon(const void *icon,unsigned long size);
CIOLIBEXPORT int CIOLIBCALL ciolib_showmouse(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_hidemouse(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_mousepointeer(enum ciolib_mouse_ptr);
CIOLIBEXPORT void CIOLIBCALL ciolib_copytext(const char *text, size_t buflen);
CIOLIBEXPORT char * CIOLIBCALL ciolib_getcliptext(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_setfont(int font, int force, int font_num);
CIOLIBEXPORT int CIOLIBCALL ciolib_getfont(int font_num);
CIOLIBEXPORT int CIOLIBCALL ciolib_loadfont(char *filename);
CIOLIBEXPORT int CIOLIBCALL ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos);
CIOLIBEXPORT void CIOLIBCALL ciolib_beep(void);
CIOLIBEXPORT void CIOLIBCALL 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 CIOLIBCALL ciolib_setvideoflags(int flags);
CIOLIBEXPORT int CIOLIBCALL ciolib_getvideoflags(void);
CIOLIBEXPORT void CIOLIBCALL ciolib_setscaling(int flags);
CIOLIBEXPORT int CIOLIBCALL ciolib_getscaling(void);
CIOLIBEXPORT int CIOLIBCALL 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 CIOLIBCALL 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 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 void CIOLIBCALL ciolib_freepixels(struct ciolib_pixels *pixels);
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 int CIOLIBCALL ciolib_get_modepalette(uint32_t[16]);
CIOLIBEXPORT int CIOLIBCALL ciolib_set_modepalette(uint32_t[16]);
CIOLIBEXPORT uint32_t CIOLIBCALL 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 int CIOLIBCALL ciolib_attrfont(uint8_t attr);
CIOLIBEXPORT int CIOLIBCALL 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 CIOLIBCALL ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinsize(int width, int height);
CIOLIBEXPORT void CIOLIBCALL ciolib_setwinposition(int x, int y);
CIOLIBEXPORT enum ciolib_codepage CIOLIBCALL ciolib_getcodepage(void);
CIOLIBEXPORT int initciolib(int mode);
CIOLIBEXPORT void suspendciolib(void);
CIOLIBEXPORT int ciolib_movetext(int sx, int sy, int ex, int ey, int dx, int dy);
CIOLIBEXPORT char * ciolib_cgets(char *str);
CIOLIBEXPORT int ciolib_cscanf (char *format , ...);
CIOLIBEXPORT int ciolib_kbhit(void);
CIOLIBEXPORT int ciolib_getch(void);
CIOLIBEXPORT int ciolib_getche(void);
CIOLIBEXPORT int ciolib_ungetch(int ch);
CIOLIBEXPORT void ciolib_gettextinfo(struct text_info *info);
CIOLIBEXPORT int ciolib_wherex(void);
CIOLIBEXPORT int ciolib_wherey(void);
CIOLIBEXPORT void ciolib_wscroll(void);
CIOLIBEXPORT void ciolib_gotoxy(int x, int y);
CIOLIBEXPORT void ciolib_clreol(void);
CIOLIBEXPORT void ciolib_clrscr(void);
CIOLIBEXPORT int ciolib_cputs(char *str);
CIOLIBEXPORT int ciolib_cprintf(const char *fmat, ...);
CIOLIBEXPORT void ciolib_textbackground(int colour);
CIOLIBEXPORT void ciolib_textcolor(int colour);
CIOLIBEXPORT void ciolib_highvideo(void);
CIOLIBEXPORT void ciolib_lowvideo(void);
CIOLIBEXPORT void ciolib_normvideo(void);
CIOLIBEXPORT int ciolib_puttext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int ciolib_vmem_puttext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT int ciolib_gettext(int a,int b,int c,int d,void *e);
CIOLIBEXPORT int ciolib_vmem_gettext(int a,int b,int c,int d,struct vmem_cell *e);
CIOLIBEXPORT void ciolib_textattr(int a);
CIOLIBEXPORT void ciolib_delay(long a);
CIOLIBEXPORT int ciolib_putch(int a);
CIOLIBEXPORT void ciolib_setcursortype(int a);
CIOLIBEXPORT void ciolib_textmode(int mode);
CIOLIBEXPORT void ciolib_window(int sx, int sy, int ex, int ey);
CIOLIBEXPORT void ciolib_delline(void);
CIOLIBEXPORT void ciolib_insline(void);
CIOLIBEXPORT char * ciolib_getpass(const char *prompt);
CIOLIBEXPORT void ciolib_settitle(const char *title);
CIOLIBEXPORT void ciolib_setname(const char *title);
CIOLIBEXPORT void ciolib_seticon(const void *icon,unsigned long size);
CIOLIBEXPORT int ciolib_showmouse(void);
CIOLIBEXPORT int ciolib_hidemouse(void);
CIOLIBEXPORT int ciolib_mousepointeer(enum ciolib_mouse_ptr);
CIOLIBEXPORT void ciolib_copytext(const char *text, size_t buflen);
CIOLIBEXPORT char * ciolib_getcliptext(void);
CIOLIBEXPORT int ciolib_setfont(int font, int force, int font_num);
CIOLIBEXPORT int ciolib_getfont(int font_num);
CIOLIBEXPORT int ciolib_loadfont(char *filename);
CIOLIBEXPORT int ciolib_get_window_info(int *width, int *height, int *xpos, int *ypos);
CIOLIBEXPORT void ciolib_beep(void);
CIOLIBEXPORT void ciolib_getcustomcursor(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 ciolib_setvideoflags(int flags);
CIOLIBEXPORT int ciolib_getvideoflags(void);
CIOLIBEXPORT void ciolib_setscaling(int flags);
CIOLIBEXPORT int ciolib_getscaling(void);
CIOLIBEXPORT int ciolib_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b);
CIOLIBEXPORT int ciolib_attr2palette(uint8_t attr, uint32_t *fg, uint32_t *bg);
CIOLIBEXPORT int ciolib_setpixel(uint32_t x, uint32_t y, uint32_t colour);
CIOLIBEXPORT struct ciolib_pixels * ciolib_getpixels(uint32_t sx, uint32_t sy, uint32_t ex, uint32_t ey, int force);
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 ciolib_freepixels(struct ciolib_pixels *pixels);
CIOLIBEXPORT struct ciolib_screen * ciolib_savescreen(void);
CIOLIBEXPORT void ciolib_freescreen(struct ciolib_screen *);
CIOLIBEXPORT int ciolib_restorescreen(struct ciolib_screen *scrn);
CIOLIBEXPORT void ciolib_setcolour(uint32_t fg, uint32_t bg);
CIOLIBEXPORT int ciolib_get_modepalette(uint32_t[16]);
CIOLIBEXPORT int ciolib_set_modepalette(uint32_t[16]);
CIOLIBEXPORT uint32_t ciolib_map_rgb(uint16_t r, uint16_t g, uint16_t b);
CIOLIBEXPORT void ciolib_replace_font(uint8_t id, char *name, void *data, size_t size);
CIOLIBEXPORT int ciolib_attrfont(uint8_t attr);
CIOLIBEXPORT int ciolib_checkfont(int font_num);
CIOLIBEXPORT void ciolib_set_vmem(struct vmem_cell *cell, uint8_t ch, uint8_t attr, uint8_t font);
CIOLIBEXPORT void ciolib_set_vmem_attr(struct vmem_cell *cell, uint8_t attr);
CIOLIBEXPORT void ciolib_setwinsize(int width, int height);
CIOLIBEXPORT void ciolib_setwinposition(int x, int y);
CIOLIBEXPORT enum ciolib_codepage ciolib_getcodepage(void);
/* 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
}
#endif
......@@ -657,21 +650,21 @@ extern int ciolib_mouse_initialized;
#ifdef __cplusplus
extern "C" {
#endif
CIOLIBEXPORT void CIOLIBCALL ciomouse_gotevent(int event, int x, int y, int x_res, int y_res);
CIOLIBEXPORT int CIOLIBCALL mouse_trywait(void);
CIOLIBEXPORT int CIOLIBCALL mouse_wait(void);
CIOLIBEXPORT int CIOLIBCALL mouse_pending(void);
CIOLIBEXPORT int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent);
CIOLIBEXPORT int CIOLIBCALL ciolib_ungetmouse(struct mouse_event *mevent);
CIOLIBEXPORT void ciomouse_gotevent(int event, int x, int y, int x_res, int y_res);
CIOLIBEXPORT int mouse_trywait(void);
CIOLIBEXPORT int mouse_wait(void);
CIOLIBEXPORT int mouse_pending(void);
CIOLIBEXPORT int ciolib_getmouse(struct mouse_event *mevent);
CIOLIBEXPORT int ciolib_ungetmouse(struct mouse_event *mevent);
CIOLIBEXPORT void ciolib_mouse_thread(void *data);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_setevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_addevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_delevents(uint64_t events);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_addevent(uint64_t event);
CIOLIBEXPORT uint64_t CIOLIBCALL ciomouse_delevent(uint64_t event);
CIOLIBEXPORT uint32_t CIOLIBCALL ciolib_mousepointer(enum ciolib_mouse_ptr type);
CIOLIBEXPORT void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons);
CIOLIBEXPORT void CIOLIBCALL mousestate_res(int *x_res, int *y_res, uint8_t *buttons);
CIOLIBEXPORT uint64_t ciomouse_setevents(uint64_t events);
CIOLIBEXPORT uint64_t ciomouse_addevents(uint64_t events);
CIOLIBEXPORT uint64_t ciomouse_delevents(uint64_t events);
CIOLIBEXPORT uint64_t ciomouse_addevent(uint64_t event);
CIOLIBEXPORT uint64_t ciomouse_delevent(uint64_t event);
CIOLIBEXPORT uint32_t ciolib_mousepointer(enum ciolib_mouse_ptr type);
CIOLIBEXPORT void mousestate(int *x, int *y, uint8_t *buttons);
CIOLIBEXPORT void mousestate_res(int *x_res, int *y_res, uint8_t *buttons);
#ifdef __cplusplus
}
#endif
......
......@@ -1270,7 +1270,7 @@ clear2bol(struct cterminal * cterm)
free(buf);
}
void CIOLIBCALL
void
cterm_clearscreen(struct cterminal *cterm, char attr)
{
int getw;
......@@ -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 *in;
......@@ -4461,7 +4461,7 @@ struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypo
return cterm;
}
void CIOLIBCALL cterm_start(struct cterminal *cterm)
void cterm_start(struct cterminal *cterm)
{
struct text_info ti;
......@@ -4758,7 +4758,7 @@ static void parse_macro_intro(struct cterminal *cterm)
#define uctputs(c, p) ctputs(c, (char *)p)
#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;
unsigned char ch[2];
......@@ -5541,7 +5541,7 @@ CIOLIBEXPORT char* CIOLIBCALL cterm_write(struct cterminal * cterm, const void *
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)
cterm_start(cterm);
......@@ -5553,7 +5553,7 @@ int CIOLIBCALL cterm_openlog(struct cterminal *cterm, char *logfile, int logtype
return(1);
}
void CIOLIBCALL cterm_closelog(struct cterminal *cterm)
void cterm_closelog(struct cterminal *cterm)
{
if(!cterm->started)
cterm_start(cterm);
......@@ -5565,7 +5565,7 @@ void CIOLIBCALL cterm_closelog(struct cterminal *cterm)
}
FILE *dbg;
void CIOLIBCALL cterm_end(struct cterminal *cterm)
void cterm_end(struct cterminal *cterm)
{
int i;
......
......@@ -241,27 +241,27 @@ struct cterminal {
int (*ciolib_cputs) (struct cterminal *,char *);
int (*ciolib_setfont) (struct cterminal *,int font, int force, int font_num);
#else
void CIOLIBCALL (*ciolib_gotoxy) (int,int);
int CIOLIBCALL (*ciolib_wherex) (void);
int CIOLIBCALL (*ciolib_wherey) (void);
int CIOLIBCALL (*ciolib_gettext) (int,int,int,int,void *);
int CIOLIBCALL (*ciolib_vmem_gettext) (int,int,int,int,struct vmem_cell *);
void CIOLIBCALL (*ciolib_gettextinfo) (struct text_info *);
void CIOLIBCALL (*ciolib_textattr) (int);
void CIOLIBCALL (*ciolib_setcursortype) (int);
int CIOLIBCALL (*ciolib_movetext) (int,int,int,int,int,int);
void CIOLIBCALL (*ciolib_clreol) (void);
void CIOLIBCALL (*ciolib_clrscr) (void);
void CIOLIBCALL (*ciolib_setvideoflags) (int flags);
int CIOLIBCALL (*ciolib_getvideoflags) (void);
void CIOLIBCALL (*ciolib_setscaling) (int new_value);
int CIOLIBCALL (*ciolib_getscaling) (void);
int CIOLIBCALL (*ciolib_putch) (int);
int CIOLIBCALL (*ciolib_puttext) (int,int,int,int,void *);
int CIOLIBCALL (*ciolib_vmem_puttext) (int,int,int,int,struct vmem_cell *);
void CIOLIBCALL (*ciolib_window) (int,int,int,int);
int CIOLIBCALL (*ciolib_cputs) (char *);
int CIOLIBCALL (*ciolib_setfont) (int font, int force, int font_num);
void (*ciolib_gotoxy) (int,int);
int (*ciolib_wherex) (void);
int (*ciolib_wherey) (void);
int (*ciolib_gettext) (int,int,int,int,void *);
int (*ciolib_vmem_gettext) (int,int,int,int,struct vmem_cell *);
void (*ciolib_gettextinfo) (struct text_info *);
void (*ciolib_textattr) (int);
void (*ciolib_setcursortype) (int);
int (*ciolib_movetext) (int,int,int,int,int,int);
void (*ciolib_clreol) (void);
void (*ciolib_clrscr) (void);
void (*ciolib_setvideoflags) (int flags);
int (*ciolib_getvideoflags) (void);
void (*ciolib_setscaling) (int new_value);
int (*ciolib_getscaling) (void);
int (*ciolib_putch) (int);
int (*ciolib_puttext) (int,int,int,int,void *);
int (*ciolib_vmem_puttext) (int,int,int,int,struct vmem_cell *);
void (*ciolib_window) (int,int,int,int);
int (*ciolib_cputs) (char *);
int (*ciolib_setfont) (int font, int force, int font_num);
#endif
int *_wscroll;
int *puttext_can_move;
......@@ -273,13 +273,13 @@ struct cterminal {
extern "C" {
#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 char* CIOLIBCALL 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 void CIOLIBCALL cterm_closelog(struct cterminal *cterm);
CIOLIBEXPORT void CIOLIBCALL cterm_end(struct cterminal *cterm);
CIOLIBEXPORT void CIOLIBCALL cterm_clearscreen(struct cterminal *cterm, char attr);
CIOLIBEXPORT void CIOLIBCALL cterm_start(struct cterminal *cterm);
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* cterm_write(struct cterminal *cterm, const void *buf, int buflen, char *retbuf, size_t retsize, int *speed);
CIOLIBEXPORT int cterm_openlog(struct cterminal *cterm, char *logfile, int logtype);
CIOLIBEXPORT void cterm_closelog(struct cterminal *cterm);
CIOLIBEXPORT void cterm_end(struct cterminal *cterm);
CIOLIBEXPORT void cterm_clearscreen(struct cterminal *cterm, char attr);
CIOLIBEXPORT void cterm_start(struct cterminal *cterm);
void cterm_gotoxy(struct cterminal *cterm, int x, int y);
void setwindow(struct cterminal *cterm);
void cterm_clreol(struct cterminal *cterm);
......
......@@ -110,7 +110,7 @@ int ciolib_mouse_initialized=0;
static int ungot=0;
pthread_mutex_t unget_mutex;
void CIOLIBCALL init_mouse(void)
void init_mouse(void)
{
memset(&state,0,sizeof(state));
state.click_timeout=0;
......@@ -121,7 +121,7 @@ void CIOLIBCALL init_mouse(void)
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 (x)
......@@ -139,7 +139,7 @@ void CIOLIBCALL mousestate(int *x, int *y, uint8_t *buttons)
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 (x)
......@@ -157,37 +157,37 @@ void CIOLIBCALL mousestate_res(int *x, int *y, uint8_t *buttons)
return;
}
uint64_t CIOLIBCALL ciomouse_setevents(uint64_t events)
uint64_t ciomouse_setevents(uint64_t events)
{
mouse_events=events;
return mouse_events;
}
uint64_t CIOLIBCALL ciomouse_addevents(uint64_t events)
uint64_t ciomouse_addevents(uint64_t events)
{
mouse_events |= events;
return mouse_events;
}
uint64_t CIOLIBCALL ciomouse_delevents(uint64_t events)
uint64_t ciomouse_delevents(uint64_t events)
{
mouse_events &= ~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);
return mouse_events;
}
uint64_t CIOLIBCALL ciomouse_delevent(uint64_t event)
uint64_t ciomouse_delevent(uint64_t event)
{
mouse_events &= ~(UINT64_C(1)<<event);
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;
......@@ -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;
int but;
......@@ -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) {
case 0:
......@@ -516,7 +516,7 @@ void ciolib_mouse_thread(void *data)
}
}
int CIOLIBCALL mouse_trywait(void)
int mouse_trywait(void)
{
int result;
......@@ -534,7 +534,7 @@ int CIOLIBCALL mouse_trywait(void)
}
}
int CIOLIBCALL mouse_wait(void)
int mouse_wait(void)
{
int result;
......@@ -552,14 +552,14 @@ int CIOLIBCALL mouse_wait(void)
}
}
int CIOLIBCALL mouse_pending(void)
int mouse_pending(void)
{
while(!ciolib_mouse_initialized)
SLEEP(1);
return(listCountNodes(&state.output));
}
int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent)
int ciolib_getmouse(struct mouse_event *mevent)
{
int retval=0;
......@@ -594,7 +594,7 @@ int CIOLIBCALL ciolib_getmouse(struct mouse_event *mevent)
return(retval);
}
int CIOLIBCALL ciolib_ungetmouse(struct mouse_event *mevent)
int ciolib_ungetmouse(struct mouse_event *mevent)
{
struct mouse_event *me;
......
......@@ -42,25 +42,19 @@
#else
#define B64EXPORT __declspec(dllexport)
#endif
#if defined(__BORLANDC__)
#define B64CALL
#else
#define B64CALL
#endif
#else /* !_WIN32 */
#define B64EXPORT
#define B64CALL
#endif
#ifdef __cplusplus
extern "C" {
#endif
B64EXPORT int B64CALL 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_encode(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
}
#endif
#endif /* Don't add anything after this line */
\ No newline at end of file
#endif /* Don't add anything after this line */
......@@ -558,7 +558,7 @@ static short int lzh_decode_position(lzh_t* lzh, uint8_t *inbuf, int32_t *incnt,
/* Encoding/Compressing */
/* 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;
int32_t incnt,outlen; /* textsize=0; */
......@@ -688,7 +688,7 @@ int32_t LZHCALL lzh_encode(uint8_t *inbuf, int32_t inlen, uint8_t *outbuf)
/* Decoding/Uncompressing */
/* 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;
uint32_t count;
......
/* lzh.h */
/* 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.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
......@@ -16,18 +12,6 @@
* 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 *
* 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. *
****************************************************************************/
......@@ -39,11 +23,6 @@
#endif
#ifdef _WIN32
#ifdef __BORLANDC__
#define LZHCALL
#else
#define LZHCALL
#endif
#ifdef LZHDLL /* LZH functions in DLL */
#ifdef LZH_EXPORTS
#define LZHEXPORT __declspec( dllexport )
......@@ -54,7 +33,6 @@
#define LZHEXPORT
#endif