mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[c] Let be compatible with -std=gnu90
This commit is contained in:
parent
c455fbee19
commit
cb5916214d
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user