libc: сплит «1 функция = 1 модуль» — вся библиотека, wildcard-сборка
- bios/conio/env/errno/gfx/io/mem/mouse/stdio/stdlib/string/sys/time/ video разложены по модулям: общие статики и helpers — в internal _-модулях (_conio.h/_mouse.h/_gfx.h/_palette.h/_atexit.h/_time.h) - lib/Makefile: LIBC_C = wildcard libc/*/*.c — гранулярность файлов = гранулярность DCE линкера - эффект _CODE: gfx_text 6986→2568 Б, gfx_mous −1745, gfx_demo/d16 −542; ранее timedir −3270, ls −3098, stattest −2995 - комментарии оставшихся модулей переведены на русский; puts: убран мёртвый pchars; videomode_raw разложен на get/set - docs/libc-split-asm-cases.md — правила asm-связок между модулями; docs/libc-roadmap.md — план этапа - восстановлен examples/mdview/SAMPLE.MD (нужен make floppy) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* gfx_rect256 — рамка w×h от (x,y) (mode 0x81); все четыре стороны
|
||||
* в одной W3-скобке.
|
||||
*/
|
||||
|
||||
#include "_gfx.h"
|
||||
|
||||
void gfx_rect256(int x, int y, int w, int h, uint8_t color)
|
||||
{
|
||||
if (w <= 0 || h <= 0) return;
|
||||
_gfx_w3_video_begin();
|
||||
_gfx_hline256_raw(x, y, w, color);
|
||||
_gfx_hline256_raw(x, y + h - 1, w, color);
|
||||
if (h > 2) {
|
||||
_gfx_vline256_raw(x, y + 1, h - 2, color);
|
||||
_gfx_vline256_raw(x + w - 1, y + 1, h - 2, color);
|
||||
}
|
||||
_gfx_w3_video_end();
|
||||
}
|
||||
Reference in New Issue
Block a user