1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00

[c] Let be compatible with -std=gnu90

This commit is contained in:
Witold Filipczyk 2023-02-12 12:54:22 +01:00
parent c455fbee19
commit cb5916214d
3 changed files with 9 additions and 4 deletions

View File

@ -446,7 +446,9 @@ static INIT_LIST_OF(struct screen_driver, active_screen_drivers);
void
set_screen_dirty(struct terminal_screen *screen, int from, int to)
{
for (unsigned int i = from; i <= to; i++) {
unsigned int i;
for (i = from; i <= to; i++) {
set_bitfield_bit(screen->dirty, i);
}
screen->was_dirty = 1;

View File

@ -553,6 +553,7 @@ string_replace(struct string *res, struct string *inp, struct string *what, stru
char *found;
char *ins;
char *tmp_cnt;
int i;
if (!init_string(&tmp)) {
return;
@ -579,7 +580,7 @@ string_replace(struct string *res, struct string *inp, struct string *what, stru
ins = tmp_cnt + what->length;
}
for (int i=0;i<count;i++) {
for (i = 0; i < count; i++) {
// find occurence of string
found=strstr(head,what->source);
// count chars before and after occurence

View File

@ -267,10 +267,11 @@ write_start_of_link(struct link *link, struct dump_output *out)
{
char buf[D_BUF];
char *where = link->where ?: link->where_img;
char *st;
snprintf(buf, D_BUF, "\033]8;;%s\033\\", where);
for (char *st = buf; *st; st++) {
for (st = buf; *st; st++) {
write_char(*st, out);
}
}
@ -279,8 +280,9 @@ static void
write_end_of_link(struct dump_output *out)
{
char buf[] = "\033]8;;\033\\";
char *st;
for (char *st = buf; *st; st++) {
for (st = buf; *st; st++) {
write_char(*st, out);
}
}