1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge branch 'master' into css

This commit is contained in:
Witold Filipczyk 2023-02-12 17:24:46 +01:00
commit ddc6e8381c
5 changed files with 12 additions and 7 deletions

View File

@ -846,7 +846,7 @@ else
CONFIG_SCRIPTING_SPIDERMONKEY=no
fi
CXXFLAGS="$CXXFLAGS -fpermissive -Wno-sign-compare -std=gnu++17"
CXXFLAGS="$CXXFLAGS -fpermissive -Wno-sign-compare"
if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes ||
test "x$CONFIG_SCRIPTING_SPIDERMONKEY" = xyes; then

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

@ -187,10 +187,10 @@ struct string {
* @relates string */
#ifdef __cplusplus
#ifdef DEBUG_MEMLEAK
[[nodiscard]] struct string *init_string__(const char *file, int line, struct string *string);
struct string *init_string__(const char *file, int line, struct string *string);
#define init_string(string) init_string__(__FILE__, __LINE__, string)
#else
[[nodiscard]] struct string *init_string(struct string *string);
struct string *init_string(struct string *string);
#endif
#else

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);
}
}