it's just a typo: instead of looking for the end of the string pointed by path, if look for the end of uri. reached that point, path is NULL. reported by a gcc 11 warning: "argument 1 null where non-null expected"
in 0677399e i've re-added scan_scaled even if unused to reduce the diff with /usr/src. This causes a warning on platform that lacks that functions (everything not OpenBSD) because its prototype is missing.
can conflict with sys/prctl.h, spotted while trying to build on alpine linux.
add a mechanism that will signal a regeneration of the history file once it reaches the 150% of the HISTORY_CAP. while here refactor save_session, now it's somewhat readable.
was broken after the fs/ui merge
the recent commit to rework handle_save_page_path changed the tab id *before* setting it to the download, so the ui and net process went out of sync and downloads hanged.
must_select otherwise is set when MB_COMPREAD but not cleared on MB_READ, yielding funny errors. While here, move also the other parts of the state out of the if (MB_COMPLREAD) to avoid this kind of issues in the future.
it's unused as write_buffer now writes a buffer to the disk.
there's no need to handle the buffer case, which is now handled directly by write_page. While here fix an issue if the open fails: we still need to stop the tab!
I can't use the ""generate temp file + rename" trick used for the session file, because I only add items that are not "dirty". the history-on-disk things needs some improvements, mostly to limitate the size of the file, but for the time being unbreak it!