webview-3.83

- fixed collection.h that caused webview crash
- fix rolled-up bug
- add special symbol from builds.kolibrios.org/status.html
This commit is contained in:
2025-03-16 15:01:57 +02:00
parent 7a2e48bed2
commit 5695f53145
4 changed files with 23 additions and 29 deletions

View File

@@ -66,6 +66,7 @@ char *unicode_symbols[]={
"lowast","*", "lowast","*",
"#128154","<3", "#128154","<3",
"#128545",":(",
0}; 0};

View File

@@ -199,7 +199,7 @@ void main()
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
ProcessMenuClick(); ProcessMenuClick();
sc.get(); sc.get();
if (Form.status_window>2) break; if (Form.status_window & ROLLED_UP) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; } if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; } if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
draw_window(); draw_window();
@@ -870,7 +870,7 @@ void DrawStatusBar(dword _msg)
{ {
dword status_y = Form.cheight - STATUSBAR_H + 4; dword status_y = Form.cheight - STATUSBAR_H + 4;
dword status_w = Form.cwidth - 90; dword status_w = Form.cwidth - 90;
if (Form.status_window>2) return; if (Form.status_window & ROLLED_UP) return;
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work); DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_msg) { if (_msg) {
ESI = math.min(status_w/6, strlen(_msg)); ESI = math.min(status_w/6, strlen(_msg));

View File

@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE #define DEFAULT_URL URL_SERVICE_HOMEPAGE
char version[]="WebView 3.82"; char version[]="WebView 3.83";

View File

@@ -26,15 +26,9 @@ struct collection_int
:void collection_int::add(dword _in) { :void collection_int::add(dword _in) {
unsigned i; unsigned i;
if (!buf) { if (!buf) || (count + 1 * DWSIZE4 >= buf_size) {
//if (buf_size) notify("'buf_size on empty buf' -A");
buf_size = 4096 * 5;
buf = malloc(4096 * 5);
//if (!buf) notify("'malloc error' -E");
} else if (count + 1 * DWSIZE4 >= buf_size) {
buf_size += 4096 * 5; buf_size += 4096 * 5;
buf = realloc(buf, buf_size); buf = realloc(buf, buf_size);
//if (!buf) notify("'realloc error' -E");
} }
i = count * DWSIZE4 + buf; i = count * DWSIZE4 + buf;
ESDWORD[i] = _in; ESDWORD[i] = _in;
@@ -77,8 +71,8 @@ struct collection_int
:void collection_int::drop() { :void collection_int::drop() {
count = 0; count = 0;
if (buf) buf = free(buf); //if (buf) buf = free(buf);
buf_size = 0; //buf_size = 0;
} }
/*======================================================== /*========================================================
@@ -97,31 +91,30 @@ struct collection
dword get(); //get_name_by_pos dword get(); //get_name_by_pos
dword get_pos_by_name(); dword get_pos_by_name();
void drop(); void drop();
void increase_data_size();
dword get_last(); dword get_last();
bool pop(); bool pop();
}; };
:void collection::increase_data_size() {
if (realloc_size<4096) realloc_size = 4096;
if (!data_size) {
data_size = realloc_size;
data_start = malloc(data_size);
} else {
data_size = data_size + realloc_size;
data_start = realloc(data_start, data_size);
}
}
:dword collection::add(dword in) { :dword collection::add(dword in) {
dword len = strlen(in); dword len = strlen(in);
while (offset.get(count) + len + 4 > data_size) { unsigned cur_buf_size;
increase_data_size();
if (!count) {
cur_buf_size = 0;
} else {
cur_buf_size = offset.get(count);
} }
strncpy(data_start+offset.get(count), in, len);
if (realloc_size<4096) realloc_size = 4096;
while (cur_buf_size + len + 4 > data_size) {
data_size += realloc_size;
data_start = realloc(data_start, data_size);
}
strncpy(data_start+cur_buf_size, in, len);
count++; count++;
offset.set(count, offset.get(count-1) + len + 1); offset.set(count, cur_buf_size + len + 1);
return data_start+offset.get(count-1); return data_start + cur_buf_size;
} }
:dword collection::get(dword pos) { :dword collection::get(dword pos) {