libbgi: фикс утечки W3-скобки в bar() + удалить дубликат _bgi_read

bar(): rectfill-ветки выходили ранним return без _bgi_end() — W3
оставался замаплен на видеобанк после каждого bar() со сплошной
заливкой.

_bgi_read дублировал getpixel (та же композиция begin+read_raw+end);
единственный потребитель floodfill переведён на getpixel, модуль
удалён.  getpixel.c: убраны мёртвые статики _gp_* (остались от
до-register версии).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 19:35:32 +03:00
parent 5f0c46f0ea
commit 40e896a73d
5 changed files with 21 additions and 39 deletions
+3 -4
View File
@@ -12,15 +12,14 @@ void bar(int left, int top, int right, int bottom)
if (bottom < top) { t = top; top = bottom; bottom = t; }
_bgi_begin();
if (_bgi_fill_pattern == EMPTY_FILL) {
_gfx_rectfill256(left, top, right - left + 1, bottom - top + 1, _bgi_bg); return;
if (_bgi_fill_pattern == EMPTY_FILL) {
_gfx_rectfill256(left, top, right - left + 1, bottom - top + 1, _bgi_bg);
}
else if (_bgi_fill_pattern == SOLID_FILL || _bgi_fill_pattern == USER_FILL || _bgi_fill_pattern > CLOSE_DOT_FILL) {
_gfx_rectfill256(left, top, right - left + 1, bottom - top + 1, _bgi_fill_color);
return;
} else {
for (y = top; y <= bottom; y++)
_bgi_fill_span(left, right, y);
}
_bgi_end();
_bgi_end(); /* ранний return здесь ЗАПРЕЩЁН — течёт W3-скобка */
}