fs/kfar: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 21s
Build system / Build (pull_request) Successful in 4m29s

- Move source code from `trunk` into program root directory.
- Update build files and ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
This commit is contained in:
2025-05-21 19:49:38 +01:00
parent db00ee83dc
commit 6f389a9e16
66 changed files with 5297 additions and 5272 deletions

View File

@@ -154,7 +154,7 @@ extra_files = {
{"kolibrios/3D/info3ds/INFO3DS.INI", SRC_PROGS .. "/develop/info3ds/info3ds.ini"},
{"kolibrios/3D/info3ds/OBJECTS.PNG", SRC_PROGS .. "/develop/info3ds/objects.png"},
{"kolibrios/3D/info3ds/TOOLBAR.PNG", SRC_PROGS .. "/develop/info3ds/toolbar.png"},
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
{"kolibrios/3D/info3ds/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/font8x9.bmp"},
{"kolibrios/3D/blocks/blocks.kex", "../programs/bcc32/games/blocks/bin/blocks.kex"},
{"kolibrios/3D/blocks/models/", "../programs/bcc32/games/blocks/models/*"},
{"kolibrios/3D/md2view/", "common/3d/md2view/*"},
@@ -164,7 +164,7 @@ extra_files = {
{"kolibrios/3D/voxel_editor/HOUSE2.VOX", SRC_PROGS .. "/media/voxel_editor/trunk/house2.vox"},
{"kolibrios/3D/voxel_editor/SQUIRREL.VOX", SRC_PROGS .. "/media/voxel_editor/trunk/squirrel.vox"},
{"kolibrios/3D/voxel_utilites/VOX_MOVER.INI" , SRC_PROGS .. "/media/voxel_editor/utilites/vox_mover.ini"},
{"kolibrios/3D/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/trunk/font8x9.bmp"},
{"kolibrios/3D/FONT8X9.BMP", SRC_PROGS .. "/fs/kfar/font8x9.bmp"},
{"kolibrios/3D/TOOLB_1.PNG", SRC_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/toolb_1.png"},
{"kolibrios/3D/TEST_GLU1", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/test_glu1"},
{"kolibrios/3D/TEST_GLU2", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/examples/test_glu2"},
@@ -486,7 +486,7 @@ tup.append_table(img_files, {
{"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"},
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/trunk/cslide"},
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"},
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/kfar"},
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
{"GAMES/15", VAR_PROGS .. "/games/15/15"},
@@ -505,7 +505,7 @@ tup.append_table(img_files, {
{"GAMES/TANKS", VAR_PROGS .. "/games/tanks/tanks"},
{"GAMES/TETRIS", VAR_PROGS .. "/games/tetris/tetris"},
{"GAMES/C4", VAR_PROGS .. "/games/c4/c4"},
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/kfar_arc/kfar_arc.obj"},
{"LIB/BOX_LIB.OBJ", VAR_PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
{"LIB/BUF2D.OBJ", VAR_PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
{"LIB/CONSOLE.OBJ", VAR_PROGS .. "/develop/libraries/console_coff/console.obj"},

View File

@@ -113,7 +113,7 @@ echo Building fs
echo *
fasm fs\copy2\trunk\copy2.asm %BIN%\copy2
fasm fs\copyr\copyr.asm %BIN%\copyr
fasm fs\kfar\trunk\kfar.asm %BIN%\kfar
fasm fs\kfar\kfar.asm %BIN%\kfar
rem fasm fs\mfar\trunk\mfar.asm %BIN%\mfar
fasm fs\sysxtree\trunk\sysxtree.asm %BIN%\sysxtree

View File

@@ -4,7 +4,7 @@ if not exist bin mkdir bin
@copy objects.png bin\objects.png
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
@kpack bin\info3ds.kex
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex

View File

@@ -4,7 +4,7 @@ if not exist bin mkdir bin
@copy objects.png bin\objects.png
if not exist bin\info3ds.ini @copy info3ds.ini bin\info3ds.ini
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 info3ds.asm bin\info3ds.kex
@kpack bin\info3ds.kex
@fasm.exe -m 16384 info3ds_u.asm bin\info3ds_u.kex

View File

@@ -8,8 +8,8 @@ if not exist bin\icon.bmp @copy icon.bmp bin\icon.bmp
if not exist bin\base.bmp @copy base.bmp bin\base.bmp
if not exist bin\left.bmp @copy left.bmp bin\left.bmp
if not exist bin\oper.bmp @copy oper.bmp bin\oper.bmp
if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.bmp
if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\font6x9.bmp bin\font6x9.bmp
if not exist bin\asm.syn @copy ..\..\other\t_edit\info\asm.syn bin\asm.syn
copy *.ced bin\*.ced
pause
pause

View File

@@ -1,6 +1,6 @@
if not exist bin mkdir bin
@copy *.png bin\*.png
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
if not exist bin\tinygl.obj @fasm.exe -m 16384 ..\tinygl.asm bin\tinygl.obj
@fasm.exe -m 16384 test0.asm bin\test0.kex
@@ -38,4 +38,4 @@ if not exist bin\tinygl.obj @fasm.exe -m 16384 ..\tinygl.asm bin\tinygl.obj
@kpack bin\textures1.kex
@kpack bin\textures2.kex
pause
pause

View File

@@ -1,6 +1,6 @@
if not exist bin mkdir bin
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@copy foto.jpg bin\foto.jpg
@copy img0.png bin\img0.png
@copy img1.png bin\img1.png
@@ -25,4 +25,4 @@ if not exist bin\vaz2106.vox @copy ..\..\..\..\..\media\voxel_editor\trunk\vaz21
@kpack bin\e6_vox_1g.kex
@kpack bin\e7_vox_3g.kex
@kpack bin\e8_filters.kex
pause
pause

View File

@@ -2,7 +2,7 @@ if not exist bin mkdir bin
@fasm.exe -m 16384 crypt_files.asm bin\crypt_files.kex
@kpack bin\crypt_files.kex
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 ..\trunk\crypt_des.asm bin\crypt_des.obj
@kpack bin\crypt_des.obj
pause
pause

View File

@@ -2,7 +2,7 @@ if not exist bin mkdir bin
@fasm.exe -m 16384 viev_exif.asm bin\viev_exif.kex
@kpack bin\viev_exif.kex
if not exist bin\toolbar.png @copy toolbar.png bin\toolbar.png
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@fasm.exe -m 16384 ..\trunk\exif.asm bin\exif.obj
@kpack bin\exif.obj
pause
pause

View File

@@ -1,4 +1,3 @@
; png.asm - location for general purpose libpng functions
; Last changed in libpng 1.6.25 [September 1, 2016]
@@ -13,7 +12,7 @@
DEBUG equ 0
include '../../../../../../KOSfuncs.inc'
include '../../../../../../fs/kfar/trunk/zlib/deflate.inc'
include '../../../../../../fs/kfar/zlib/deflate.inc'
include 'pngtokos.inc' ;integrate png to kos
;files from libpng

View File

@@ -21,7 +21,7 @@
; in this structure and is required for decompressing the LZ compressed
; data in PNG files.
include '../../../../../../fs/kfar/trunk/zlib/zlib.inc'
include '../../../../../../fs/kfar/zlib/zlib.inc'
; zlib.inc declares a magic type 'uInt' that limits the amount of data that zlib
; can handle at once. This type need be no larger than 16 bits (so maximum of
@@ -74,7 +74,7 @@ ends
; from chromaticities the sum of the Y values is assumed to be 1.0
struct png_XYZ
red_X dd ? ;png_fixed_point
red_X dd ? ;png_fixed_point
red_Y dd ?
red_Z dd ?
green_X dd ?

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,3 +1,9 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
use32
db 'MENUET01'
dd 1
@@ -15,8 +21,8 @@ max_width = 255
min_height = 8
max_height = 255
include '../../../KOSfuncs.inc'
include '../../../macros.inc'
include '../../KOSfuncs.inc'
include '../../macros.inc'
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include 'font.inc'
include 'sort.inc'

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR")
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())

View File

@@ -1,170 +1,171 @@
include '../../../../proc32.inc'
include '../../../../macros.inc'
include '../../../../KOSfuncs.inc'
FASTEST equ 0
GEN_TREES_H equ 0
DEBUG equ 0
DYNAMIC_CRC_TABLE equ 1
Z_SOLO equ 0
; define NO_GZIP when compiling if you want to disable gzip header and
; trailer creation by deflate(). NO_GZIP would be used to avoid linking in
; the crc code when it is not needed. For shared libraries, gzip encoding
; should be left enabled.
GZIP equ 1
macro zlib_debug fmt,p1
{
if DEBUG eq 1
zlib_assert fmt,p1
end if
}
macro zlib_assert fmt,p1
{
local .end_t
local .m_fmt
pushf
jmp .end_t
.m_fmt db fmt,13,10,0
align 4
.end_t:
if p1 eq
stdcall dbg_print,0,.m_fmt
else
stdcall str_format_dbg, buf_param,.m_fmt,p1
end if
popf
}
include 'zlib.inc'
include 'deflate.inc'
include 'zutil.asm'
;include '../kfar_arc/crc.inc'
include 'crc32.asm'
include 'adler32.asm'
include 'trees.asm'
include 'deflate.asm'
align 4
buf_param rb 80
align 4
proc dbg_print, fun:dword, mes:dword
pushad
mov eax,SF_BOARD
mov ebx,SSF_DEBUG_WRITE
mov esi,[fun]
cmp esi,0
je .end0
@@:
mov cl,byte[esi]
int 0x40
inc esi
cmp byte[esi],0
jne @b
mov cl,':'
int 0x40
mov cl,' '
int 0x40
.end0:
mov esi,[mes]
cmp esi,0
je .end_f
@@:
mov cl,byte[esi]
cmp cl,0
je .end_f
int 0x40
inc esi
jmp @b
.end_f:
popad
ret
endp
align 4
proc str_format_dbg, buf:dword, fmt:dword, p1:dword
pushad
mov esi,[fmt]
mov edi,[buf]
mov ecx,80-1
.cycle0:
lodsb
cmp al,'%'
jne .no_param
lodsb
dec ecx
cmp al,0
je .cycle0end
cmp al,'d'
je @f
cmp al,'u'
je @f
cmp al,'l'
je .end1
jmp .end0
.end1: ;%lu %lx
lodsb
dec ecx
cmp al,'u'
jne .end0
@@:
mov eax,[p1]
stdcall convert_int_to_str,ecx
xor al,al
repne scasb
dec edi
.end0:
loop .cycle0
.no_param:
stosb
cmp al,0
je .cycle0end
loop .cycle0
.cycle0end:
xor al,al
stosb
stdcall dbg_print,0,[buf]
popad
ret
endp
;input:
; eax - число
; edi - буфер для строки
; len - длинна буфера
;output:
align 4
proc convert_int_to_str, len:dword
pushad
mov esi,[len]
add esi,edi
dec esi
call .str
popad
ret
endp
align 4
.str:
mov ecx,0x0a
cmp eax,ecx
jb @f
xor edx,edx
div ecx
push edx
call .str
pop eax
@@:
cmp edi,esi
jge @f
or al,0x30
stosb
mov byte[edi],0
@@:
ret
; SPDX-License-Identifier: NOASSERTION
;
include '../../../proc32.inc'
include '../../../macros.inc'
include '../../../KOSfuncs.inc'
FASTEST equ 0
GEN_TREES_H equ 0
DEBUG equ 0
DYNAMIC_CRC_TABLE equ 1
Z_SOLO equ 0
; define NO_GZIP when compiling if you want to disable gzip header and
; trailer creation by deflate(). NO_GZIP would be used to avoid linking in
; the crc code when it is not needed. For shared libraries, gzip encoding
; should be left enabled.
GZIP equ 1
macro zlib_debug fmt,p1
{
if DEBUG eq 1
zlib_assert fmt,p1
end if
}
macro zlib_assert fmt,p1
{
local .end_t
local .m_fmt
pushf
jmp .end_t
.m_fmt db fmt,13,10,0
align 4
.end_t:
if p1 eq
stdcall dbg_print,0,.m_fmt
else
stdcall str_format_dbg, buf_param,.m_fmt,p1
end if
popf
}
include 'zlib.inc'
include 'deflate.inc'
include 'zutil.asm'
;include '../kfar_arc/crc.inc'
include 'crc32.asm'
include 'adler32.asm'
include 'trees.asm'
include 'deflate.asm'
align 4
buf_param rb 80
align 4
proc dbg_print, fun:dword, mes:dword
pushad
mov eax,SF_BOARD
mov ebx,SSF_DEBUG_WRITE
mov esi,[fun]
cmp esi,0
je .end0
@@:
mov cl,byte[esi]
int 0x40
inc esi
cmp byte[esi],0
jne @b
mov cl,':'
int 0x40
mov cl,' '
int 0x40
.end0:
mov esi,[mes]
cmp esi,0
je .end_f
@@:
mov cl,byte[esi]
cmp cl,0
je .end_f
int 0x40
inc esi
jmp @b
.end_f:
popad
ret
endp
align 4
proc str_format_dbg, buf:dword, fmt:dword, p1:dword
pushad
mov esi,[fmt]
mov edi,[buf]
mov ecx,80-1
.cycle0:
lodsb
cmp al,'%'
jne .no_param
lodsb
dec ecx
cmp al,0
je .cycle0end
cmp al,'d'
je @f
cmp al,'u'
je @f
cmp al,'l'
je .end1
jmp .end0
.end1: ;%lu %lx
lodsb
dec ecx
cmp al,'u'
jne .end0
@@:
mov eax,[p1]
stdcall convert_int_to_str,ecx
xor al,al
repne scasb
dec edi
.end0:
loop .cycle0
.no_param:
stosb
cmp al,0
je .cycle0end
loop .cycle0
.cycle0end:
xor al,al
stosb
stdcall dbg_print,0,[buf]
popad
ret
endp
;input:
; eax - число
; edi - буфер для строки
; len - длинна буфера
;output:
align 4
proc convert_int_to_str, len:dword
pushad
mov esi,[len]
add esi,edi
dec esi
call .str
popad
ret
endp
align 4
.str:
mov ecx,0x0a
cmp eax,ecx
jb @f
xor edx,edx
div ecx
push edx
call .str
pop eax
@@:
cmp edi,esi
jge @f
or al,0x30
stosb
mov byte[edi],0
@@:
ret

View File

@@ -1,7 +1,7 @@
if not exist bin mkdir bin
if not exist bin\font8x9.bmp @copy ..\..\..\fs\kfar\trunk\font8x9.bmp bin\font8x9.bmp
if not exist bin\font8x9.bmp @copy ..\..\..\fs\kfar\font8x9.bmp bin\font8x9.bmp
@copy *.png bin\*.png
@copy *.ini bin\*.ini
@fasm.exe -m 16384 nu_pogod.asm bin\nu_pogod.kex
@kpack bin\nu_pogod.kex
pause
pause

View File

@@ -1,3 +1,8 @@
; SPDX-License-Identifier: NOASSERTION
;
; Text encoded with Code Page 866 - Cyrillic
use32
org 0
db 'MENUET01'
@@ -50,7 +55,7 @@ start:
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
include_image_file '../../../programs/fs/kfar/trunk/font6x9.bmp', image_data_toolbar, buf_font.w,buf_font.h
include_image_file '../../../programs/fs/kfar/font6x9.bmp', image_data_toolbar, buf_font.w,buf_font.h
stdcall [buf2d_create_f_img], buf_font,[image_data_toolbar] ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
stdcall mem.Free,[image_data_toolbar] ;<3B><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_conv_24_to_8], buf_font,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA7><EFBFBD><E7ADAE><EFBFBD> 8 <20><><EFBFBD>

View File

@@ -1,5 +1,5 @@
if not exist bin mkdir bin
if not exist bin\font6x9.bmp @copy ..\..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.bmp
if not exist bin\font6x9.bmp @copy ..\..\..\fs\kfar\font6x9.bmp bin\font6x9.bmp
@copy *.png bin\*.png
@copy *.txt bin\*.txt
@fasm.exe -m 16384 log_el.asm bin\log_el.kex

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff