Commit 61590f47 authored by Deucе's avatar Deucе 👌🏾
Browse files

Constify loadfont()

parent af7b3efb
Pipeline #2702 failed with stage
in 8 minutes and 50 seconds
......@@ -104,7 +104,7 @@ pthread_mutex_t blinker_lock;
/* Forward declarations */
static int bitmap_loadfont_locked(char *filename);
static int bitmap_loadfont_locked(const char *filename);
static void set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t fg, uint32_t bg);
static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp);
static void cb_drawrect(struct rectlist *data);
......@@ -125,7 +125,7 @@ void bitmap_drv_free_rect(struct rectlist *rect);
/* These functions get called from the driver and ciolib only */
/**************************************************************/
static int bitmap_loadfont_locked(char *filename)
static int bitmap_loadfont_locked(const char *filename)
{
static char current_filename[MAX_PATH];
unsigned int fontsize;
......@@ -1108,7 +1108,7 @@ int bitmap_getfont(int font_num)
return ret;
}
int bitmap_loadfont(char *filename)
int bitmap_loadfont(const char *filename)
{
int ret;
......
......@@ -30,7 +30,7 @@ void bitmap_gotoxy(int x, int y);
void bitmap_setcursortype(int type);
int bitmap_setfont(int font, int force, int font_no);
int bitmap_getfont(int fnum);
int bitmap_loadfont(char *filename);
int bitmap_loadfont(const char *filename);
int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy);
void bitmap_clreol(void);
void bitmap_clrscr(void);
......
......@@ -1489,7 +1489,7 @@ CIOLIBEXPORT int ciolib_getfont(int font_num)
/* Optional */
/* Return Non-zero on success */
CIOLIBEXPORT int ciolib_loadfont(char *filename)
CIOLIBEXPORT int ciolib_loadfont(const char *filename)
{
CIOLIB_INIT();
......
......@@ -363,7 +363,7 @@ typedef struct {
void (*resume) (void);
int (*setfont) (int font, int force, int font_num);
int (*getfont) (int font_num);
int (*loadfont) (char *filename);
int (*loadfont) (const char *filename);
int (*get_window_info) (int* width, int* height, int* xpos, int* ypos);
void (*getcustomcursor) (int *startline, int *endline, int *range, int *blink, int *visible);
void (*setcustomcursor) (int startline, int endline, int range, int blink, int visible);
......@@ -448,7 +448,7 @@ 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_loadfont(const 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);
......
......@@ -32,7 +32,7 @@ void sdl_copytext(const char *text, size_t buflen);
char *sdl_getcliptext(void);
int sdl_setfont(int font, int force);
int sdl_getfont(void);
int sdl_loadfont(char *filename);
int sdl_loadfont(const char *filename);
int sdl_get_window_info(int *width, int *height, int *xpos, int *ypos);
int sdl_setpalette(uint32_t index, uint16_t r, uint16_t g, uint16_t b);
void sdl_setwinsize(int w, int h);
......
......@@ -69,7 +69,7 @@ void x_copytext(const char *text, size_t buflen);
char *x_getcliptext(void);
int x_setfont(int font, int force);
int x_getfont(void);
int x_loadfont(char *filename);
int x_loadfont(const char *filename);
int x_get_window_info(int *width, int *height, int *xpos, int *ypos);
void x11_drawrect(struct rectlist *data);
void x11_flush(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment