Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
61590f47
Commit
61590f47
authored
Feb 10, 2022
by
Deucе
👌🏾
Browse files
Constify loadfont()
parent
af7b3efb
Pipeline
#2702
failed with stage
in 8 minutes and 50 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
src/conio/bitmap_con.c
src/conio/bitmap_con.c
+3
-3
src/conio/bitmap_con.h
src/conio/bitmap_con.h
+1
-1
src/conio/ciolib.c
src/conio/ciolib.c
+1
-1
src/conio/ciolib.h
src/conio/ciolib.h
+2
-2
src/conio/sdl_con.h
src/conio/sdl_con.h
+1
-1
src/conio/x_cio.h
src/conio/x_cio.h
+1
-1
No files found.
src/conio/bitmap_con.c
View file @
61590f47
...
...
@@ -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
;
...
...
src/conio/bitmap_con.h
View file @
61590f47
...
...
@@ -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
);
...
...
src/conio/ciolib.c
View file @
61590f47
...
...
@@ -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
();
...
...
src/conio/ciolib.h
View file @
61590f47
...
...
@@ -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
);
...
...
src/conio/sdl_con.h
View file @
61590f47
...
...
@@ -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
);
...
...
src/conio/x_cio.h
View file @
61590f47
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment