Compare commits
23 Commits
aab0a41198
...
ab1952ecc2
Author | SHA1 | Date | |
---|---|---|---|
|
ab1952ecc2 | ||
|
7a34f59358 | ||
4f1a8ef9a1 | |||
93f12c7673 | |||
|
3eb02af5fd | ||
|
83d8146ad1 | ||
|
1974f45c50 | ||
36ce6f0b74 | |||
4701a15222 | |||
61277f8822 | |||
abb7442055 | |||
81b15607dc | |||
30d8d45326 | |||
9a23c001e1 | |||
64b7372624 | |||
d04420295a | |||
2935b29fd8 | |||
505f741fbd | |||
5a852ebdfb | |||
026d2aba40 | |||
|
9b08b20cc3 | ||
38fdd13e0c | |||
d9679f5f81 |
@@ -4,33 +4,26 @@
|
||||
name: 'Build system'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
codestyle:
|
||||
name: "Check kernel codestyle"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: kolibri-toolchain
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
sudo apt update && sudo apt install perl -y
|
||||
|
||||
- name: Check codestyle
|
||||
run: |
|
||||
find kernel/trunk -iname '*.asm' -or -iname '*.inc' -exec bash -c "echo {}; cat {} | perl .gitea/workflows/checker.pl" \;
|
||||
|
||||
build:
|
||||
name: 'Build'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: kolibri-toolchain
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -38,29 +31,28 @@ jobs:
|
||||
|
||||
- name: Get describe
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT
|
||||
|
||||
- name: Setup dependencies
|
||||
- name: Get toolchain hash
|
||||
id: toolchain-hash
|
||||
run: |
|
||||
cd /tmp
|
||||
sudo apt update
|
||||
sudo apt install p7zip-full fasm nasm make gcc gcc-multilib g++ g++-multilib mtools mkisofs parted gdisk -y
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/universe/t/tup/tup_0.8-1_amd64.deb
|
||||
sudo apt install ./tup_0.8-1_amd64.deb -y
|
||||
a=$(find ${{ gitea.workspace }}/programs/develop/cmm/ -type f -print0 | sort -z | xargs -0 sha1sum)
|
||||
b=$(sha1sum ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc)
|
||||
c=$(find ${{ gitea.workspace }}/programs/develop/objconv/ -type f -print0 | sort -z | xargs -0 sha1sum)
|
||||
d=$(find ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/ -type f -print0 | sort -z | xargs -0 sha1sum)
|
||||
e=$(find ${{ gitea.workspace }}/programs/other/kpack/linux/ -type f -print0 | sort -z | xargs -0 sha1sum)
|
||||
f=$(find ${{ gitea.workspace }}/programs/develop/clink/ -type f -print0 | sort -z | xargs -0 sha1sum)
|
||||
echo hash=$(echo $a $b $c $d $e $f | sha1sum | awk '{print $1}') >> $GITEA_OUTPUT
|
||||
|
||||
- name: Install GCC toolchain
|
||||
run: |
|
||||
chmod +x ${{ gitea.workspace }}/.gitea/workflows/install_kgcc
|
||||
${{ gitea.workspace }}/.gitea/workflows/install_kgcc
|
||||
|
||||
- name: Install JWasm
|
||||
run: |
|
||||
cd /tmp
|
||||
wget -O JWasm211bl.zip https://sourceforge.net/projects/jwasm/files/JWasm%20Linux%20binary/JWasm211bl.zip/download
|
||||
unzip JWasm211bl.zip "jwasm" -d /home/autobuild/tools/win32/bin/
|
||||
chmod +x /home/autobuild/tools/win32/bin/jwasm
|
||||
- name: Restore toolchain
|
||||
id: cache-toolchain
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: /home/autobuild
|
||||
key: kolibri-toolchain-${{ steps.toolchain-hash.outputs.hash }}
|
||||
|
||||
- name: Build and install C--
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}/programs/develop/cmm/
|
||||
make -f Makefile.lin32
|
||||
@@ -70,105 +62,152 @@ jobs:
|
||||
make -f Makefile.lin32 clean
|
||||
|
||||
- name: Install TCC
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cp ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc /home/autobuild/tools/win32/bin/kos32-tcc
|
||||
chmod +x /home/autobuild/tools/win32/bin/kos32-tcc
|
||||
|
||||
- name: Compile objconv
|
||||
- name: Build and install objconv
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}/programs/develop/objconv/
|
||||
g++ -o /home/autobuild/tools/win32/bin/objconv -O2 *.cpp
|
||||
chmod +x /home/autobuild/tools/win32/bin/objconv
|
||||
|
||||
- name: Compile kerpack
|
||||
- name: Build and install kerpack
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/
|
||||
make
|
||||
chmod +x kerpack
|
||||
mv kerpack /home/autobuild/tools/win32/bin/.
|
||||
|
||||
- name: Compile kpack
|
||||
- name: Build and install kpack
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}/programs/other/kpack/linux/
|
||||
bash build.sh
|
||||
chmod +x kpack
|
||||
mv kpack /home/autobuild/tools/win32/bin/.
|
||||
|
||||
- name: Compile clink
|
||||
- name: Build and install clink
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ${{ github.workspace }}/programs/develop/clink
|
||||
cd ${{ gitea.workspace }}/programs/develop/clink
|
||||
gcc main.c -o clink
|
||||
chmod a+x clink
|
||||
mv clink /home/autobuild/tools/win32/bin/clink
|
||||
|
||||
- name: Prepare cache folder
|
||||
run: |
|
||||
rm /home/autobuild
|
||||
mv /root/autobuild /home/autobuild
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Save toolchain
|
||||
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: /home/autobuild
|
||||
key: kolibri-toolchain-${{ steps.toolchain-hash.outputs.hash }}
|
||||
|
||||
- name: Configure tup
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
export ROOT=${{ gitea.workspace }}
|
||||
cd $ROOT
|
||||
|
||||
echo "CONFIG_KPACK_CMD=&& kpack --nologo %o" > tup.config
|
||||
echo "CONFIG_KERPACK_CMD=&& kerpack %o" >> tup.config
|
||||
echo "CONFIG_PESTRIP_CMD=&& EXENAME=%o fasm $ROOT/data/common/pestrip.asm %o" >> tup.config
|
||||
echo "CONFIG_NO_MSVC=full" >> tup.config
|
||||
echo "CONFIG_INSERT_REVISION_ID=1" >> tup.config
|
||||
export ROOT=${{ gitea.workspace }}
|
||||
echo "CONFIG_KPACK_CMD= && kpack --nologo %o" | tee en_US.config ru_RU.config es_ES.config
|
||||
echo "CONFIG_KERPACK_CMD= && kerpack %o" | tee -a en_US.config ru_RU.config es_ES.config
|
||||
echo "CONFIG_PESTRIP_CMD= && EXENAME=%o fasm $ROOT/data/common/pestrip.asm %o" | tee -a en_US.config ru_RU.config es_ES.config
|
||||
echo "CONFIG_NO_MSVC=full" | tee -a en_US.config ru_RU.config es_ES.config
|
||||
echo "CONFIG_INSERT_REVISION_ID=1" | tee -a en_US.config ru_RU.config es_ES.config
|
||||
|
||||
tup -v
|
||||
tup init
|
||||
|
||||
- name: Build KolibriOS (en_US)
|
||||
# Configure en_US
|
||||
echo "CONFIG_LANG=en_US" >> en_US.config
|
||||
echo "CONFIG_BUILD_TYPE=en_US" >> en_US.config
|
||||
tup variant en_US.config
|
||||
|
||||
# Configure ru_RU
|
||||
echo "CONFIG_LANG=ru_RU" >> ru_RU.config
|
||||
echo "CONFIG_BUILD_TYPE=ru_RU" >> ru_RU.config
|
||||
tup variant ru_RU.config
|
||||
|
||||
# Configure es_ES
|
||||
echo "CONFIG_LANG=es_ES" >> es_ES.config
|
||||
echo "CONFIG_BUILD_TYPE=es_ES" >> es_ES.config
|
||||
tup variant es_ES.config
|
||||
|
||||
# -------------------------- Build en_US ------------------------- #
|
||||
- name: (en_US) Build KolibriOS
|
||||
run: |
|
||||
cp tup.config tup.config.en_US
|
||||
echo "CONFIG_LANG=en_US" >> tup.config.en_US
|
||||
echo "CONFIG_BUILD_TYPE=en_US" >> tup.config.en_US
|
||||
|
||||
export PATH=/home/autobuild/tools/win32/bin:$PATH
|
||||
tup generate --config tup.config.en_US build-en_US.sh
|
||||
./build-en_US.sh
|
||||
tup build-en_US
|
||||
|
||||
- name: Upload floppy image (en_US)
|
||||
- name: (en_US) Upload floppy image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: data/kolibri.img
|
||||
path: build-en_US/data/kolibri.img
|
||||
|
||||
- name: Upload CD image (en_US)
|
||||
- name: (en_US) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: data/kolibri.iso
|
||||
path: build-en_US/data/kolibri.iso
|
||||
|
||||
- name: Upload raw image (en_US)
|
||||
- name: (en_US) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: data/kolibri.raw
|
||||
path: build-en_US/data/kolibri.raw
|
||||
|
||||
- name: Build KolibriOS (ru_RU)
|
||||
# -------------------------- Build ru_RU ------------------------- #
|
||||
- name: (ru_RU) Build KolibriOS
|
||||
run: |
|
||||
git clean -d -x -f -e tup.config
|
||||
cp tup.config tup.config.ru_RU
|
||||
echo "CONFIG_LANG=ru_RU" >> tup.config.ru_RU
|
||||
echo "CONFIG_BUILD_TYPE=ru_RU" >> tup.config.ru_RU
|
||||
|
||||
export PATH=/home/autobuild/tools/win32/bin:$PATH
|
||||
tup generate --config tup.config.ru_RU build-ru_RU.sh
|
||||
./build-ru_RU.sh
|
||||
tup build-ru_RU
|
||||
|
||||
- name: Upload floppy image (ru_RU)
|
||||
- name: (ru_RU) Upload floppy image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: data/kolibri.img
|
||||
path: build-ru_RU/data/kolibri.img
|
||||
|
||||
- name: Upload CD image (ru_RU)
|
||||
- name: (ru_RU) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: data/kolibri.iso
|
||||
path: build-ru_RU/data/kolibri.iso
|
||||
|
||||
- name: Upload raw image (ru_RU)
|
||||
- name: (ru_RU) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: data/kolibri.raw
|
||||
path: build-ru_RU/data/kolibri.raw
|
||||
|
||||
# -------------------------- Build es_ES ------------------------- #
|
||||
- name: (es_ES) Build KolibriOS
|
||||
run: |
|
||||
export PATH=/home/autobuild/tools/win32/bin:$PATH
|
||||
tup build-es_ES
|
||||
|
||||
- name: (es_ES) Upload floppy image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: build-es_ES/data/kolibri.img
|
||||
|
||||
- name: (es_ES) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: build-es_ES/data/kolibri.iso
|
||||
|
||||
- name: (es_ES) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: build-es_ES/data/kolibri.raw
|
||||
|
@@ -462,20 +462,20 @@ tup.append_table(img_files, {
|
||||
{"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"},
|
||||
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"},
|
||||
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"},
|
||||
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/trunk/tube"},
|
||||
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"},
|
||||
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/trunk/unvwater"},
|
||||
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"},
|
||||
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/trunk/zeroline"},
|
||||
{"DEVELOP/ASCIIVJU", VAR_PROGS .. "/develop/asciivju/trunk/asciivju"},
|
||||
{"DEVELOP/BOARD", VAR_PROGS .. "/system/board/trunk/board"},
|
||||
{"DEVELOP/DBGBOARD", VAR_PROGS .. "/system/dbgboard/dbgboard"},
|
||||
{"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"},
|
||||
{"DEVELOP/CHARSETS", VAR_PROGS .. "/develop/charsets/charsets"},
|
||||
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"},
|
||||
{"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"},
|
||||
{"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"},
|
||||
{"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"},
|
||||
{"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"},
|
||||
{"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"},
|
||||
{"DEVELOP/KEYASCII", VAR_PROGS .. "/develop/keyascii/trunk/keyascii"},
|
||||
{"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"},
|
||||
{"DEVELOP/MSTATE", VAR_PROGS .. "/develop/mstate/mstate"},
|
||||
{"DEVELOP/SCANCODE", VAR_PROGS .. "/develop/scancode/trunk/scancode"},
|
||||
@@ -484,7 +484,6 @@ 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"},
|
||||
{"DEVELOP/EXAMPLES/USE_MB", VAR_PROGS .. "/demos/use_mb/use_mb"},
|
||||
{"File Managers/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
|
||||
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
|
||||
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
|
||||
@@ -606,7 +605,6 @@ tup.append_table(extra_files, {
|
||||
{"kolibrios/demos/life3", VAR_PROGS .. "/games/life3/life3"},
|
||||
{"kolibrios/demos/qjulia", VAR_PROGS .. "/demos/qjulia/trunk/qjulia"},
|
||||
{"kolibrios/develop/koldbg", VAR_PROGS .. "/develop/koldbg/koldbg"},
|
||||
{"kolibrios/develop/utils/charset_checker", VAR_PROGS .. "/other/charset_checker/charchck"},
|
||||
{"kolibrios/games/Almaz", VAR_PROGS .. "/games/almaz/almaz"},
|
||||
{"kolibrios/games/arcanii", VAR_PROGS .. "/games/arcanii/arcanii"},
|
||||
{"kolibrios/games/bomber/bomber", VAR_PROGS .. "/games/bomber/bomber"},
|
||||
@@ -637,7 +635,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
|
||||
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
|
||||
}) else tup.append_table(img_files, {
|
||||
{"DEVELOP/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"},
|
||||
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"},
|
||||
}) end
|
||||
|
||||
if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||
@@ -674,7 +672,6 @@ tup.append_table(img_files, {
|
||||
{"DEVELOP/PIPET", VAR_PROGS .. "/cmm/misc/pipet.com"},
|
||||
{"File Managers/EOLITE", VAR_PROGS .. "/cmm/eolite/Eolite.com"},
|
||||
{"File Managers/KFM2", VAR_PROGS .. "/cmm/misc/kfm2.com"},
|
||||
{"KF_VIEW", VAR_PROGS .. "/cmm/kf_font_viewer/font_viewer.com"},
|
||||
{"DEVELOP/DIFF", VAR_PROGS .. "/cmm/diff/diff.com"},
|
||||
{"GAMES/CLICKS", VAR_PROGS .. "/games/clicks/clicks.com"},
|
||||
{"GAMES/MBLOCKS", VAR_PROGS .. "/cmm/misc/mblocks.com"},
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 700 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 809 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
@@ -79,7 +79,7 @@ next=$TextEditor
|
||||
[Assoc]
|
||||
/=/sys/file managers/eolite
|
||||
|
||||
kf=/sys/KF_VIEW
|
||||
kf=/sys/syspanel
|
||||
|
||||
txt=$CodeEdit
|
||||
log=$CodeEdit
|
||||
|
@@ -1,14 +1,16 @@
|
||||
The following "hot" shortcut keys are used in the system:
|
||||
(Indexing on time of appearance in the system)
|
||||
1) Ctrl + Alt + Del start of the application CPU (the manager of processes), is a sole combination maintained on a level of a kernel, all rest "hot" key is realized at the expense of the application @TASKBAR.
|
||||
2) Ctrl + Shift - switching of keyboard layout.
|
||||
3) Win - start of the application MENU.
|
||||
4) Alt + Ctrl + F12 - start of the application END.
|
||||
5) Alt + F4 - terminate the active application.
|
||||
6) Alt + Tab - switch to the next (in the window stack) window
|
||||
7) Alt + Shift + Tab - switch to the previous (in the window stack) window
|
||||
2) Ctrl + Shift - switching of keyboard layout
|
||||
3) Win - start of the application MENU
|
||||
4) Alt + Ctrl + F12 - start of the application END
|
||||
5) Alt + F4 - terminate the active application
|
||||
6) Alt + Tab - switch to the next window
|
||||
7) Alt + Shift + Tab - switch to the previous window
|
||||
8) Alt + Shift + NumLock - start of the application MOUSEMUL, which emulates mouse with numpad, when NumLock is on.
|
||||
9) Alt + 1...7 - fast switching to the selected keyboard layout (even if absent for Ctrl + Shift)
|
||||
10) Win + D - minimize/restore all windows (cleaning of desktop)
|
||||
10) Win + D - minimize/restore all windows
|
||||
11) Win + R - start of the application RUN
|
||||
12) Ctrl + PrintScreen - start of the application SCRSHOOT. Just do a screen shot and the user is offered to specify (with OpenDialog) where to save the BMP image.
|
||||
12) Ctrl + PrintScreen - start of the application SCRSHOOT
|
||||
13) Ctrl + Alt + Left / Right - change sound volume
|
||||
Ctrl + Alt + Up / Down - mute and unmute sound
|
||||
|
@@ -116,8 +116,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|
@@ -57,8 +57,7 @@
|
||||
20 Diff Tool |develop/diff
|
||||
52 Shared resources |/sys/@reshare
|
||||
34 Base Converter |develop/h2d2b
|
||||
59 Character table |develop/ASCIIVju
|
||||
59 Key ASCII-codes |develop/keyascii
|
||||
59 Charsets Viewer |develop/CHARSETS
|
||||
59 Key SCAN-codes |develop/scancode
|
||||
#6 **** EMUL
|
||||
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
|
||||
|
@@ -1,14 +1,16 @@
|
||||
The following "hot" shortcut keys are used in the system:
|
||||
(Indexing on time of appearance in the system)
|
||||
1) Ctrl + Alt + Del start of the application CPU (the manager of processes), is a sole combination maintained on a level of a kernel, all rest "hot" key is realized at the expense of the application @TASKBAR.
|
||||
2) Ctrl + Shift - switching of keyboard layout.
|
||||
3) Win - start of the application MENU.
|
||||
4) Alt + Ctrl + F12 - start of the application END.
|
||||
5) Alt + F4 - terminate the active application.
|
||||
6) Alt + Tab - switch to the next (in the window stack) window
|
||||
7) Alt + Shift + Tab - switch to the previous (in the window stack) window
|
||||
2) Ctrl + Shift - switching of keyboard layout
|
||||
3) Win - start of the application MENU
|
||||
4) Alt + Ctrl + F12 - start of the application END
|
||||
5) Alt + F4 - terminate the active application
|
||||
6) Alt + Tab - switch to the next window
|
||||
7) Alt + Shift + Tab - switch to the previous window
|
||||
8) Alt + Shift + NumLock - start of the application MOUSEMUL, which emulates mouse with numpad, when NumLock is on.
|
||||
9) Alt + 1...7 - fast switching to the selected keyboard layout (even if absent for Ctrl + Shift)
|
||||
10) Win + D - minimize/restore all windows (cleaning of desktop)
|
||||
10) Win + D - minimize/restore all windows
|
||||
11) Win + R - start of the application RUN
|
||||
12) Ctrl + PrintScreen - start of the application SCRSHOOT. Just do a screen shot and the user is offered to specify (with OpenDialog) where to save the BMP image.
|
||||
12) Ctrl + PrintScreen - start of the application SCRSHOOT
|
||||
13) Ctrl + Alt + Left / Right - change sound volume
|
||||
Ctrl + Alt + Up / Down - mute and unmute sound
|
@@ -116,8 +116,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|
@@ -56,8 +56,7 @@
|
||||
49 Debugger mtdbg |develop/mtdbg
|
||||
49 Debugger koldbg * |/kolibrios/develop/koldbg
|
||||
16 Hex2Dec2Bin |develop/h2d2b
|
||||
16 Tabla de caracteres |ASCIIVju
|
||||
16 C<>digos ASCII |develop/keyascii
|
||||
16 Tabla de caracteres |develop/CHARSETS
|
||||
16 C<>digos SCAN |develop/scancode
|
||||
#6 **** EMULATORS
|
||||
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
|
||||
|
@@ -116,8 +116,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|
@@ -116,8 +116,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|
@@ -1,14 +1,16 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>騥 "<22><><EFBFBD><EFBFBD>稥" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⥬<EFBFBD>:
|
||||
(<28>㬥<EFBFBD><E3ACA5><EFBFBD><EFBFBD><EFBFBD> <20><> <20>६<EFBFBD><E0A5AC><EFBFBD> <20><><EFBFBD><EFA2AB><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⥬<EFBFBD>)
|
||||
1) Ctrl + Alt + Del <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CPU (<28><>ᯥ<EFBFBD><E1AFA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ), <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⢥<EFBFBD><E2A2A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ঠ<EFBFBD><E0A6A0><EFBFBD><EFBFBD> <20><> <20><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><>⠫쭮<E2A0AB> ॠ<><E0A5A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> @TASKBAR.
|
||||
2) Ctrl + Shift - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
3) Win - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MENU.
|
||||
4) Alt + Ctrl + F12 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> END.
|
||||
5) Alt + F4 - <20><><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><E8A5AD> <20><>⨢<EFBFBD><E2A8A2><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
6) Alt + Tab - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><> <><E1ABA5><EFBFBD>饥 (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⥪<EFBFBD>) <20><><EFBFBD><EFBFBD>
|
||||
7) Alt + Shift + Tab - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD>饥 (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⥪<EFBFBD>) <20><><EFBFBD><EFBFBD>
|
||||
2) Ctrl + Shift - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
3) Win - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MENU
|
||||
4) Alt + Ctrl + F12 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> END
|
||||
5) Alt + F4 - <20><><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><E8A5AD> <20><>⨢<EFBFBD><E2A8A2><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
6) Alt + Tab - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><> <><E1ABA5><EFBFBD>饥 <20><><EFBFBD><EFBFBD>
|
||||
7) Alt + Shift + Tab - <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><> <20>।<EFBFBD><E0A5A4><EFBFBD>饥 <20><><EFBFBD><EFBFBD>
|
||||
8) Alt + Shift + NumLock - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MOUSEMUL, <20><>㫨<EFBFBD><E3ABA8><EFBFBD>饣<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NumLock <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>蠬<EFBFBD> <20>㬯<EFBFBD><E3ACAF><EFBFBD>
|
||||
9) Alt + 1...7 - <20><><EFBFBD><EFBFBD> <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD> <20><> <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> Ctrl + Shift)
|
||||
10) Win + D - ᢥ<><E1A2A5><EFBFBD><EFBFBD><EFBFBD>/ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD>⪠ ࠡ<>祣<EFBFBD> <20>⮫<EFBFBD>)
|
||||
10) Win + D - ᢥ<><E1A2A5><EFBFBD><EFBFBD><EFBFBD>/ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
11) Win + R - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RUN
|
||||
12) Ctrl + PrintScreen - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCRSHOOT. <20>ࠧ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᭨<><E1ADA8><EFBFBD> <20><>࠭<EFBFBD> <20> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<><E3AAA0><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OpenDialog, <20>㤠 <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD> ᭨<><E1ADA8><EFBFBD> <20> <20><>ଠ<EFBFBD><E0ACA0> BMP.
|
||||
12) Ctrl + PrintScreen - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCRSHOOT
|
||||
13) Ctrl + Alt + Left / Right - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEAC><EFBFBD><EFBFBD><EFBFBD>
|
||||
Ctrl + Alt + Up / Down - <20>몫<EFBFBD><EBAAAB><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
@@ -116,8 +116,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|
@@ -58,8 +58,7 @@
|
||||
20 Diff tool |develop/diff
|
||||
52 Shared resources |/sys/@reshare
|
||||
34 Hex2Dec2Bin |develop/h2d2b
|
||||
59 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> |develop/ASCIIVju
|
||||
59 ASCII-<2D><><EFBFBD><EFBFBD> |develop/keyascii
|
||||
59 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD><EFBFBD> |develop/CHARSETS
|
||||
59 SCAN-<2D><><EFBFBD><EFBFBD> |develop/scancode
|
||||
#6 **** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
|
||||
|
BIN
programs/cmm/barscfg/bars_8b.raw
Normal file
@@ -55,9 +55,15 @@ _ini taskbar_vars_ini = { #taskbar_ini_path, "Variables" };
|
||||
|
||||
_ini docky_ini = { "/sys/settings/docky.ini", "@" };
|
||||
|
||||
unsigned char panels_img_data[] = FROM "bars.raw";
|
||||
#define PIMG_W 37
|
||||
#define PIMG_H 27 //27*5
|
||||
unsigned char panels_img_data[] = FROM "bars_8b.raw";
|
||||
dword panels_img_pal[] = {
|
||||
0x00405D74,0x0084FC84,0x00FAFAFA,0x0000B400,
|
||||
0x00E4E4E4,0x008C9B9C,0x000212FD,0x00D8DEDF,
|
||||
0x00585C5D,0x0085B7E0,0x009EC6E7,0x0094C0E5,
|
||||
0x00CB8800,0x00CE3D9E,0x00D20404,0x00485966
|
||||
};
|
||||
|
||||
proc_info Form;
|
||||
|
||||
@@ -137,7 +143,7 @@ void main()
|
||||
|
||||
void DrawPanelsImage(dword y, n)
|
||||
{
|
||||
PutImage(22, y, PIMG_W, PIMG_H, n * PIMG_W * PIMG_H * 3 + #panels_img_data);
|
||||
PutPaletteImage(n * PIMG_W * PIMG_H + #panels_img_data, PIMG_W, PIMG_H, 22, y, 8, #panels_img_pal);
|
||||
}
|
||||
|
||||
void SetDisabledMode()
|
||||
|
@@ -101,16 +101,16 @@ void TWebBrowser::SetPageDefaults()
|
||||
img_url.drop();
|
||||
text_colors.drop();
|
||||
text_colors.add(0);
|
||||
if (!secondrun) {
|
||||
bg_colors.drop();
|
||||
bg_colors.add(DEFAULT_BG_COL);
|
||||
} else {
|
||||
if (secondrun) {
|
||||
canvas.Init(list.x, list.y, list.w, math.max(list.visible, list.count));
|
||||
canvas.Fill(0, bg_colors.get(0));
|
||||
}
|
||||
bg_colors.drop();
|
||||
bg_colors.add(DEFAULT_BG_COL);
|
||||
header = NULL;
|
||||
draw_y = BODY_MARGIN;
|
||||
draw_x = left_gap = BODY_MARGIN;
|
||||
draw_w = list.w - BODY_MARGIN;
|
||||
draw_w = list.w - BODY_MARGIN - BODY_MARGIN;
|
||||
linebuf = 0;
|
||||
redirect = '\0';
|
||||
list.SetFont(8, 14, 10011000b);
|
||||
@@ -136,8 +136,6 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
|
||||
dword bufpos;
|
||||
bufsize = _bufsize;
|
||||
|
||||
if (list.w!=canvas.bufw) canvas.Init(list.x, list.y, list.w, 400*20);
|
||||
|
||||
if (bufpointer == _bufpointer) {
|
||||
custom_encoding = cur_encoding;
|
||||
} else {
|
||||
@@ -156,7 +154,6 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table.cols.drop();
|
||||
secondrun = false;
|
||||
|
||||
@@ -219,19 +216,15 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
|
||||
AddCharToTheLine(ESBYTE[bufpos]);
|
||||
}
|
||||
|
||||
RenderTextbuf();
|
||||
list.count = draw_y + style.cur_line_h;
|
||||
list.CheckDoesValuesOkey();
|
||||
anchors.current = NULL;
|
||||
|
||||
if (!secondrun) {
|
||||
secondrun = true;
|
||||
goto _PARSE_START_;
|
||||
}
|
||||
|
||||
RenderTextbuf();
|
||||
list.count = draw_y + style.cur_line_h;
|
||||
|
||||
canvas.bufh = math.max(list.visible, list.count);
|
||||
buf_data = realloc(buf_data, canvas.bufh * canvas.bufw * 4 + 8);
|
||||
|
||||
list.CheckDoesValuesOkey();
|
||||
anchors.current = NULL;
|
||||
if (!header) {
|
||||
strncpy(#header, #version, sizeof(TWebBrowser.header)-1);
|
||||
DrawTitle(#header);
|
||||
|
@@ -22,11 +22,10 @@ void TWebBrowser::RenderLine(dword _line)
|
||||
zoom = list.font_w / BASIC_CHAR_W;
|
||||
|
||||
//there is some shit happens!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
if (pw > draw_w) {
|
||||
//draw_w = pw;
|
||||
NewLine();
|
||||
if (pw > draw_w + BODY_MARGIN) {
|
||||
//debugln("shit");
|
||||
}
|
||||
|
||||
|
||||
if (debug_mode) {
|
||||
canvas.DrawBar(draw_x, draw_y, pw, list.item_h, 0xCCCccc);
|
||||
debugln(_line);
|
||||
@@ -83,12 +82,13 @@ void TWebBrowser::RenderTextbuf()
|
||||
|
||||
//debugln(" \\n");
|
||||
|
||||
//Is a new line fits in the current line?
|
||||
//Is a new line fits in the maximum line width?
|
||||
if (br * list.font_w + draw_x - left_gap >= draw_w) {
|
||||
br = draw_w - draw_x + left_gap /list.font_w;
|
||||
if (br < 0) br = 0;
|
||||
while(br) {
|
||||
if (ESBYTE[lbp + br]==' ') {
|
||||
br++;
|
||||
if (br < len) br++;
|
||||
break;
|
||||
}
|
||||
br--;
|
||||
@@ -96,7 +96,16 @@ void TWebBrowser::RenderTextbuf()
|
||||
}
|
||||
//Maybe a new line is too big for the whole new line? Then we have to split it
|
||||
if (!br) && (len * list.font_w >= draw_w) {
|
||||
//debugln("bigbr");
|
||||
//debugval("draw_x", draw_x);
|
||||
//debugval("draw_w", draw_w);
|
||||
br = draw_w - draw_x / list.font_w;
|
||||
//debugval("cut into 1", br * list.font_w);
|
||||
if (br < 0) {
|
||||
NewLine();
|
||||
br = draw_w - draw_x / list.font_w;
|
||||
//debugval("cut into 2", br * list.font_w);
|
||||
}
|
||||
}
|
||||
|
||||
if (br) {
|
||||
@@ -120,9 +129,13 @@ void TWebBrowser::NewLine()
|
||||
|
||||
if (draw_x==left_gap) && (draw_y==BODY_MARGIN) return;
|
||||
if (t_html) && (!t_body) return;
|
||||
|
||||
|
||||
if (draw_x == style.tag_list.level * 5 * list.font_w + left_gap) {
|
||||
if (!empty_line) empty_line=true; else return;
|
||||
if (!empty_line) {
|
||||
empty_line=true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
empty_line = false;
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ void TWebBrowser::SetStyle()
|
||||
void TWebBrowser::tag_p()
|
||||
{
|
||||
IF (tag.prior[0] == 'h') || (streq(#tag.prior,"td")) return;
|
||||
if (!tag.opened) && (streq(#tag.prior,"p")) return;
|
||||
IF (!tag.opened) && (streq(#tag.prior,"p")) return;
|
||||
NewLine();
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ void TWebBrowser::tag_iframe()
|
||||
|
||||
void TWebBrowser::tag_a()
|
||||
{
|
||||
if (!secondrun) return;
|
||||
if (tag.opened)
|
||||
{
|
||||
if (tag.get_value_of("href")) && (!strstr(tag.value,"javascript:"))
|
||||
@@ -133,6 +134,7 @@ void TWebBrowser::tag_a()
|
||||
|
||||
void TWebBrowser::tag_meta_xml()
|
||||
{
|
||||
if (secondrun) return;
|
||||
if (custom_encoding == -1) if (tag.get_value_of("charset"))
|
||||
|| (tag.get_value_of("content")) || (tag.get_value_of("encoding"))
|
||||
{
|
||||
@@ -187,7 +189,7 @@ void TWebBrowser::tag_ol_ul_dt()
|
||||
|
||||
void TWebBrowser::tag_li()
|
||||
{
|
||||
if (style.nav) return;
|
||||
//if (style.nav) return;
|
||||
if (tag.opened) {
|
||||
if (!style.tag_list.level) style.tag_list.upd_level(1, 'u');
|
||||
if (!style.pre) NewLine();
|
||||
@@ -216,13 +218,10 @@ void TWebBrowser::tag_hr()
|
||||
void TWebBrowser::tag_body()
|
||||
{
|
||||
t_body = tag.opened;
|
||||
if (tag.get_value_of("link")) link_color_default = GetColor(tag.value);
|
||||
if (tag.get_value_of("alink")) link_color_active = GetColor(tag.value);
|
||||
if (tag.get_value_of("text")) text_colors.set(0, GetColor(tag.value));
|
||||
if (tag.get_value_of("bgcolor")) {
|
||||
bg_colors.set(0, GetColor(tag.value));
|
||||
canvas.Fill(0, bg_colors.get(0));
|
||||
}
|
||||
if (tag.get_value_of("link")) link_color_default = GetColor(tag.value);
|
||||
if (tag.get_value_of("alink")) link_color_active = GetColor(tag.value);
|
||||
if (tag.get_value_of("text")) text_colors.set(0, GetColor(tag.value));
|
||||
if (tag.get_value_of("bgcolor")) bg_colors.set(0, GetColor(tag.value));
|
||||
// Autodetecting encoding if no encoding was set
|
||||
if (tag.opened) && (custom_encoding==-1) && (cur_encoding == CH_CP866) {
|
||||
if (strstr(bufpointer, "\208\190")) ChangeEncoding(CH_UTF8);
|
||||
@@ -250,10 +249,10 @@ void TWebBrowser::tag_h1234_caption()
|
||||
NewLine();
|
||||
}
|
||||
if (tag.is("h1")) {
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+12, 10011001b);
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
|
||||
style.b = true;
|
||||
} else if (tag.is("h2")) {
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+12, 10011001b);
|
||||
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
|
||||
} else {
|
||||
list.SetFont(6*2, 9+7, 10001001b);
|
||||
}
|
||||
@@ -294,7 +293,7 @@ void TWebBrowser::tag_img()
|
||||
if (!strcmp(tag.value + strrchr(tag.value, '.'), "webp")) goto NOIMG;
|
||||
|
||||
strlcpy(#img_path, tag.value, sizeof(img_path)-1);
|
||||
replace_char(#img_path, ' ', '\0', sizeof(img_path));
|
||||
replace_char(#img_path, ' ', '\0', sizeof(img_path)-1);
|
||||
get_absolute_url(#img_path, history.current());
|
||||
|
||||
if (check_is_the_adress_local(#img_path)) {
|
||||
@@ -331,31 +330,28 @@ NOIMG:
|
||||
text_colors.pop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct TABLE {
|
||||
int count;
|
||||
int depth;
|
||||
int margin;
|
||||
collection_int cols;
|
||||
collection_int width;
|
||||
} table;
|
||||
|
||||
|
||||
int tr_pos, td_pos;
|
||||
int row_start_y;
|
||||
int colcount;
|
||||
dword tallest_cell_in_row;
|
||||
unsigned table_id;
|
||||
unsigned colcount;
|
||||
unsigned tr_pos;
|
||||
unsigned td_pos;
|
||||
unsigned row_start_y;
|
||||
unsigned tallest_cell_in_row;
|
||||
unsigned cur_cell_w;
|
||||
|
||||
void TWebBrowser::tag_table_reset()
|
||||
{
|
||||
table.depth = 0;
|
||||
table.count = 0;
|
||||
table_id = 0;
|
||||
colcount = 0;
|
||||
tr_pos = 0;
|
||||
td_pos = 0;
|
||||
table.depth = 0;
|
||||
cur_cell_w = 0;
|
||||
}
|
||||
|
||||
void TWebBrowser::tag_table()
|
||||
@@ -369,15 +365,15 @@ void TWebBrowser::tag_table()
|
||||
if(tag.opened) {
|
||||
table.depth++;
|
||||
if (table.depth==1) {
|
||||
table.count++;
|
||||
table_id++;
|
||||
colcount = 0;
|
||||
td_pos = 0;
|
||||
row_start_y = draw_y;
|
||||
if (tag.get_number_of("width")) {
|
||||
if (strchr(tag.value, '%')) tag.number = list.w * tag.number / 100;
|
||||
table.width.set(table.count, math.min(tag.number,list.w));
|
||||
cur_cell_w = math.min(tag.number,list.w);
|
||||
} else {
|
||||
table.width.set(table.count, list.w);
|
||||
cur_cell_w = list.w;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -436,26 +432,17 @@ void TWebBrowser::tag_table()
|
||||
|
||||
if (!tr_pos) goto _TR_FIX;
|
||||
|
||||
/*
|
||||
if (tag.opened) {
|
||||
if (tag.get_value_of("bgcolor")) {
|
||||
bg_colors.add(GetColor(tag.value));
|
||||
} else {
|
||||
bg_colors.add(bg_colors.get(0));
|
||||
}
|
||||
} */
|
||||
|
||||
tallest_cell_in_row = math.max(draw_y+style.cur_line_h-list.item_h+1, tallest_cell_in_row);
|
||||
style.cur_line_h = list.item_h;
|
||||
if (tag.opened) {
|
||||
|
||||
if (tag.opened)
|
||||
{
|
||||
if (!td_pos) {
|
||||
table.margin = list.w - table.width.get(table.count) / 2 + BODY_MARGIN;
|
||||
table.margin = list.w - cur_cell_w / 2 + BODY_MARGIN;
|
||||
draw_x = left_gap = table.margin;
|
||||
draw_w = table.width.get(table.count) - BODY_MARGIN;
|
||||
draw_w = cur_cell_w - BODY_MARGIN;
|
||||
} else {
|
||||
draw_x = left_gap = left_gap + draw_w;
|
||||
draw_w = table.width.get(table.count) - left_gap + table.margin - BODY_MARGIN;
|
||||
draw_w = cur_cell_w - left_gap + table.margin - BODY_MARGIN;
|
||||
}
|
||||
|
||||
if (EAX = table.cols.get(tr_pos-1)-td_pos) {
|
||||
@@ -466,20 +453,18 @@ void TWebBrowser::tag_table()
|
||||
}
|
||||
if (table.cols.get(tr_pos-1)-td_pos>1) && (tag.get_number_of("width")) {
|
||||
if (strchr(tag.value, '%')) {
|
||||
tag.number = table.width.get(table.count) - table.margin - 23 - left_gap * tag.number / 100;
|
||||
tag.number = cur_cell_w - table.margin - 23 - left_gap * tag.number / 100;
|
||||
}
|
||||
if (tag.number < draw_w) draw_w = tag.number;
|
||||
}
|
||||
draw_y = row_start_y;
|
||||
//canvas.WriteText(draw_x, draw_y, 10001001b, 0x0000FE, itoa(draw_x), NULL);
|
||||
//canvas.WriteText(draw_x, draw_y+20, 10001001b, 0xFF0000, itoa(draw_w), NULL);
|
||||
td_pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (draw_x > table.width.get(table.count)) {
|
||||
if (draw_x > cur_cell_w) {
|
||||
draw_x = left_gap = table.margin;
|
||||
draw_w = table.width.get(table.count) - table.margin - 23 - left_gap;
|
||||
draw_w = cur_cell_w - table.margin - 23 - left_gap;
|
||||
table.depth = 0;
|
||||
NewLine();
|
||||
if (debug_mode) {
|
||||
@@ -487,11 +472,8 @@ void TWebBrowser::tag_table()
|
||||
canvas.DrawBar(0, draw_y, 20, 20, 0xFF0000);
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (left_gap + draw_w > list.w) {
|
||||
draw_w = list.w - left_gap;
|
||||
if (debug_mode) debugln("anomaly draw_W");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//if (left_gap + draw_w > list.w) {
|
||||
// draw_w = list.w - left_gap;
|
||||
// if (debug_mode) debugln("anomaly draw_W");
|
||||
//}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
//Copyright 2007-2021 by Veliant & Leency
|
||||
//Copyright 2007-2025 by Veliant & Leency
|
||||
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
|
||||
|
||||
//BUGS
|
||||
|
@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.8";
|
||||
char version[]="WebView 3.82";
|
@@ -4,10 +4,10 @@
|
||||
</head>
|
||||
<body><pre>Welcome to WebView a Text-Based Browser.
|
||||
|
||||
Bookmarks:
|
||||
1. <a href=//kolibrios.org>KolibriOS homepage</a>
|
||||
KolibriOS Bookmarks:
|
||||
1. <a href=//kolibrios.org>Homepage</a>
|
||||
2. <a href="//builds.kolibrios.org">Night-builds</a>
|
||||
3. <a href="//ftp.kolibrios.org">KolibriOS FTP</a>
|
||||
3. <a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
|
||||
<font bg=#F8F15B>By the way,</font>
|
||||
<font color="#555555">• You can check for browser updates from the main menu.
|
||||
|
@@ -1,16 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="cp-866">
|
||||
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></title>
|
||||
</head>
|
||||
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
1. <a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<> KolibriOS</a>
|
||||
2. <a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
3. <a href="//ftp.kolibrios.org">KolibriOS FTP</a>
|
||||
<html><head><meta charset="cp-866">
|
||||
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></title></head>
|
||||
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD>㧥<EFBFBD> WebView!
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol>
|
||||
<li><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<></a>
|
||||
<li><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<li><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a></ol>
|
||||
|
||||
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font>
|
||||
<font color="#555555">• <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>稥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
• <20><><EFBFBD> <20><><EFBFBD>᪠ <20> Google <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>᭮<EFBFBD> <20><>ப<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ctrl+Enter
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F6 <20><>६<EFBFBD>頥<EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><>࠭<EFBFBD><E0A0AD><EFBFBD>, <20><><EFBFBD> <20>⮣<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>ࠢ<EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㣫<> <20><><EFBFBD><EFBFBD>.
|
||||
</font>
|
||||
|
||||
|
@@ -11,9 +11,9 @@ TODO:
|
||||
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
|
||||
*/
|
||||
|
||||
#define ABOUT_TITLE "EOLITE 5.26a"
|
||||
#define TITLE_EOLITE "Eolite File Manager 5.26a"
|
||||
#define TITLE_KFM "Kolibri File Manager 2.26a";
|
||||
#define ABOUT_TITLE "EOLITE 5.28"
|
||||
#define TITLE_EOLITE "Eolite File Manager 5.28"
|
||||
#define TITLE_KFM "Kolibri File Manager 2.28";
|
||||
|
||||
#define MEMSIZE 1024 * 250
|
||||
#include "../lib/clipboard.h"
|
||||
@@ -239,6 +239,7 @@ void main()
|
||||
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) {
|
||||
EventChooseFilesRange(old_cur_y, files.cur_y);
|
||||
} else if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) {
|
||||
if (!getSelectedCount()) EventChooseFile(old_cur_y);
|
||||
EventChooseFile(files.cur_y);
|
||||
DrawStatusBar();
|
||||
List_ReDraw();
|
||||
@@ -539,16 +540,13 @@ void draw_window()
|
||||
incn x;
|
||||
dword title;
|
||||
static int rand_n;
|
||||
if (!rand_n) rand_n = random(80);
|
||||
if (!rand_n) && (Form.width + 1 != screen.w) rand_n = random(80);
|
||||
|
||||
#define STBAR_EOLITE_H 16
|
||||
#define STBAR_KFM_H 21
|
||||
if (efm) status_bar_h = STBAR_KFM_H;
|
||||
else status_bar_h = STBAR_EOLITE_H;
|
||||
|
||||
if (show_status_bar.checked) {
|
||||
#define STBAR_EOLITE_H 16
|
||||
#define STBAR_KFM_H 21
|
||||
if (efm) status_bar_h = STBAR_KFM_H;
|
||||
else status_bar_h = STBAR_EOLITE_H;
|
||||
} else {
|
||||
status_bar_h = 0;
|
||||
}
|
||||
if (efm) title = TITLE_KFM; else title = TITLE_EOLITE;
|
||||
DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,title,0);
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
@@ -596,7 +594,7 @@ void draw_window()
|
||||
}
|
||||
//main rectangles
|
||||
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,sc.line);
|
||||
DrawBar(0,39,1,-show_status_bar.checked*status_bar_h + Form.cheight - 40, sc.work);
|
||||
DrawBar(0,39,1,-status_bar_h + Form.cheight - 40, sc.work);
|
||||
EBX = Form.cwidth-1 * 65536 + 1;
|
||||
$int 64
|
||||
for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.dark, sc.work, i*10));
|
||||
@@ -651,17 +649,13 @@ void DrawStatusBar()
|
||||
{
|
||||
char status_bar_str[80];
|
||||
int go_up_folder_exists=0;
|
||||
dword topcolor;
|
||||
|
||||
if (show_status_bar.checked) topcolor=sc.light; else topcolor=sc.work;
|
||||
DrawBar(0, Form.cheight - status_bar_h-1, Form.cwidth, 1, topcolor);
|
||||
|
||||
DrawBar(0, Form.cheight - status_bar_h-1, Form.cwidth, 1, sc.light);
|
||||
if (efm) {
|
||||
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, 2, sc.work);
|
||||
DrawBar(0, Form.cheight - 2, Form.cwidth, 2, EDX);
|
||||
DrawBar(Form.cwidth-1, Form.cheight - 19, 1, 17, EDX);
|
||||
DrawFuncButtonsInKfm();
|
||||
} else if (show_status_bar.checked) {
|
||||
} else {
|
||||
if (files.count>0) && (streq(items.get(0)*304+buf+72,"..")) go_up_folder_exists=1;
|
||||
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, status_bar_h, sc.work);
|
||||
sprintf(#status_bar_str, T_STATUS_EVEMENTS, folder_count-go_up_folder_exists, files.count-folder_count);
|
||||
@@ -1115,7 +1109,6 @@ void EventClosePopinForm()
|
||||
void ShowPopinForm(byte _popin_type)
|
||||
{
|
||||
int popinx;
|
||||
popin_string[0] = -1;
|
||||
switch(_popin_type) {
|
||||
case POPIN_PATH:
|
||||
edit_box_set_text stdcall (#popin_text, path);
|
||||
@@ -1130,6 +1123,7 @@ void ShowPopinForm(byte _popin_type)
|
||||
DrawEolitePopup(T_CREATE, T_CANCEL);
|
||||
break;
|
||||
case POPIN_RENAME:
|
||||
if (itdir) && (streq(#file_name,"..")) return;
|
||||
edit_box_set_text stdcall (#popin_text, #file_name);
|
||||
DrawEolitePopup(T_RENAME, T_CANCEL);
|
||||
break;
|
||||
@@ -1187,7 +1181,7 @@ void FnProcess(byte N)
|
||||
if (files.count) ShowPopinForm(POPIN_RENAME);
|
||||
break;
|
||||
case 3:
|
||||
if (files.count) && (!itdir) RunProgram("/kolibrios/utils/quark", #file_path);
|
||||
if (files.count) && (!itdir) RunProgram("/sys/develop/heed", #file_path);
|
||||
break;
|
||||
case 4:
|
||||
if (files.count) && (!itdir) RunProgram("/sys/develop/cedit", #file_path);
|
||||
|
@@ -42,7 +42,7 @@ void about_dialog()
|
||||
about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2;
|
||||
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
|
||||
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
|
||||
WriteTextLines(73,163,0x90,sc.work_text," By Leency\nand KolibriOS Team\n 2008-2021",20);
|
||||
WriteTextLines(73,163,0x90,sc.work_text," By Leency\nand KolibriOS Team\n 2008-2025",20);
|
||||
#ifdef LANG_RUS
|
||||
DrawStandartCaptButton(60,about_form.cheight-38,11,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧࠡ<E0A0A7>⪨");
|
||||
#endif
|
||||
|
@@ -38,7 +38,7 @@
|
||||
char *kfm_func = {
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
"<EFBFBD><EFBFBD>२<EFBFBD><EFBFBD><EFBFBD>.",
|
||||
"<EFBFBD><EFBFBD><EFBFBD>ᬮ<EFBFBD><EFBFBD>",
|
||||
"HEX-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.",
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.",
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
"<EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
@@ -86,9 +86,9 @@ char *actions[] = {
|
||||
|
||||
#define TITLE_SETT "<22><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9>"
|
||||
#define SHOW_DEVICE_CLASS "<22>뢮<EFBFBD><EBA2AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ன<EFBFBD><E0AEA9><EFBFBD>"
|
||||
#define SHOW_STATUS_BAR "<22><><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>"
|
||||
#define BIG_ICONS "<22>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>訥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
#define COLORED_LINES "<22><><EFBFBD>ᢥ稢<E1A2A5><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ᯨ᪥"
|
||||
#define FONT_BOLD "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
|
||||
#define FONT_SIZE_LABEL "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
#define LIST_LINE_HEIGHT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD> <20> ᯨ᪥"
|
||||
#define SAVE_PATH_AS_DEFAULT "<22><><EFBFBD><EFBFBD>騩 <20><><EFBFBD><EFBFBD>"
|
||||
@@ -137,7 +137,7 @@ char *actions[] = {
|
||||
char *kfm_func = {
|
||||
"Info",
|
||||
"Rename",
|
||||
"View",
|
||||
"HEX View",
|
||||
"Edit",
|
||||
"Copy",
|
||||
"Move",
|
||||
@@ -185,9 +185,9 @@ char *actions[] = {
|
||||
|
||||
#define TITLE_SETT "Settings"
|
||||
#define SHOW_DEVICE_CLASS "Show device class name"
|
||||
#define SHOW_STATUS_BAR "Show status bar"
|
||||
#define BIG_ICONS "Big icons in list"
|
||||
#define COLORED_LINES "Highlight even lines in list"
|
||||
#define FONT_BOLD "Bold font"
|
||||
#define FONT_SIZE_LABEL "Font size"
|
||||
#define LIST_LINE_HEIGHT "List line height"
|
||||
#define SAVE_PATH_AS_DEFAULT "Current path"
|
||||
|
@@ -158,25 +158,27 @@ void _SystemDiscs::DrawOptions(int draw_x)
|
||||
SystemDiscs.Get();
|
||||
|
||||
DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.line);
|
||||
EAX = kfont.bold;
|
||||
$push eax
|
||||
|
||||
for (i=0;i<list.count;i++) {
|
||||
strcpy(#dev_name, list.get(i));
|
||||
GetDiskIconAndName(#dev_name, #dev_icon, #disc_name);
|
||||
if (strstr(path, #dev_name)!=0) is_active=true; else is_active=false;
|
||||
if (strstr(path, #dev_name)!=0) kfont.bold=true; else kfont.bold=false;
|
||||
|
||||
DrawBar(draw_x, optionsy, DDW, KFM2_DEVH, 0xFFFFFF);
|
||||
DefineButton(draw_x, optionsy, DDW, KFM2_DEVH-1, 100+i+BT_HIDE,0xFFFFFF);
|
||||
PutImage(draw_x + 5, optionsy+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
|
||||
if (is_active) kfont.bold = true;
|
||||
PutImage(draw_x + 5, optionsy+2, 18,17, kfont.bold*7+dev_icon*17*18*3+#devices);
|
||||
//strncpy(#volume_label, GetVolumeLabel(#dev_name), sizeof(volume_label));
|
||||
strcpy(#label_file_name, #dev_name);
|
||||
//if (dev_name[1]!='k') && (dev_name[2]!='y') {
|
||||
// if (volume_label) sprintf(#label_file_name, "%s [%s]", #dev_name, #volume_label);
|
||||
//}
|
||||
kfont.WriteIntoWindow(draw_x + 24, optionsy+2, 0xFFFfff, 0x000000, kfont.size.pt, #label_file_name+1);
|
||||
kfont.bold = false;
|
||||
optionsy += KFM2_DEVH;
|
||||
}
|
||||
$pop eax
|
||||
kfont.bold = EAX;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -9,9 +9,9 @@ edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x100000
|
||||
more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL };
|
||||
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT };
|
||||
checkbox show_dev_name = { SHOW_DEVICE_CLASS };
|
||||
checkbox show_status_bar = { SHOW_STATUS_BAR };
|
||||
checkbox big_icons = { BIG_ICONS };
|
||||
checkbox colored_lines = { COLORED_LINES };
|
||||
checkbox bold_font = { FONT_BOLD };
|
||||
|
||||
|
||||
void settings_dialog()
|
||||
@@ -51,8 +51,10 @@ void settings_dialog()
|
||||
break;
|
||||
}
|
||||
show_dev_name.click(id);
|
||||
show_status_bar.click(id);
|
||||
colored_lines.click(id);
|
||||
if (bold_font.click(id)) {
|
||||
kfont.bold^=1;
|
||||
}
|
||||
if (font_size.click(id)) {
|
||||
kfont.size.pt = font_size.value;
|
||||
kfont.changeSIZE();
|
||||
@@ -72,7 +74,7 @@ void settings_dialog()
|
||||
|
||||
case evReDraw:
|
||||
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
|
||||
-efm*42+345+skin_h,0x34,sc.work,TITLE_SETT,0);
|
||||
345+skin_h,0x34,sc.work,TITLE_SETT,0);
|
||||
GetProcessInfo(#Settings, SelfInfo);
|
||||
DrawSettingsCheckBoxes();
|
||||
}
|
||||
@@ -96,10 +98,10 @@ void DrawSettingsCheckBoxes()
|
||||
y.n = 0;
|
||||
if (!efm) {
|
||||
show_dev_name.draw(XXX, y.inc(14));
|
||||
show_status_bar.draw(XXX, y.inc(25));
|
||||
}
|
||||
big_icons.draw(XXX, y.inc(25));
|
||||
colored_lines.draw(XXX, y.inc(25));
|
||||
bold_font.draw(XXX, y.inc(25));
|
||||
font_size.draw(XXX, y.inc(31));
|
||||
line_height.draw(XXX, y.inc(31));
|
||||
|
||||
@@ -121,7 +123,7 @@ void LoadIniSettings()
|
||||
|
||||
files.SetFont(6, 9, 10000000b);
|
||||
show_dev_name.checked = ini.GetInt("ShowDeviceName", true);
|
||||
show_status_bar.checked = ini.GetInt("ShowStatusBar", true);
|
||||
kfont.bold = bold_font.checked = ini.GetInt("BoldFont", false);
|
||||
big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch();
|
||||
colored_lines.checked = ini.GetInt("ColoredLines", true);
|
||||
kfont.size.pt = ini.GetInt("FontSize", 13);
|
||||
@@ -141,7 +143,7 @@ void LoadIniSettings()
|
||||
void SaveIniSettings()
|
||||
{
|
||||
ini.SetInt("ShowDeviceName", show_dev_name.checked);
|
||||
ini.SetInt("ShowStatusBar", show_status_bar.checked);
|
||||
ini.SetInt("BoldFont", bold_font.checked);
|
||||
ini.SetInt("BigIcons", big_icons.checked);
|
||||
ini.SetInt("ColoredLines", colored_lines.checked);
|
||||
ini.SetInt("FontSize", kfont.size.pt);
|
||||
|
@@ -1,6 +0,0 @@
|
||||
if tup.getconfig("NO_CMM") ~= "" then return end
|
||||
if tup.getconfig("LANG") == "ru_RU"
|
||||
then C_LANG = "LANG_RUS"
|
||||
else C_LANG = "LANG_ENG" -- this includes default case without config
|
||||
end
|
||||
tup.rule("font_viewer.c", "c-- /D=$(C_LANG) /OPATH=%o %f" .. tup.getconfig("KPACK_CMD"), "font_viewer.com")
|
@@ -1,4 +0,0 @@
|
||||
@del kf_view
|
||||
@C-- font_viewer.c
|
||||
@rename font_viewer.com kf_view
|
||||
if not exist kf_view ( @pause )
|
@@ -66,10 +66,11 @@ int kfont_char_width[255];
|
||||
:bool KFONT::init(dword font_path)
|
||||
{
|
||||
dword fsize_notused;
|
||||
if(font)free(font);
|
||||
if(font) font = free(font);
|
||||
read_file(font_path, #font_begin, #fsize_notused);
|
||||
if(!EAX) {
|
||||
RunProgram("/sys/@notify", "'Error: KFONT is not loaded.' -E");
|
||||
RunProgram("/sys/@notify", "'Error: KFONT is not loaded' -E");
|
||||
kfont.height = 14;
|
||||
return false;
|
||||
}
|
||||
changeSIZE();
|
||||
@@ -99,6 +100,10 @@ int kfont_char_width[255];
|
||||
|
||||
:dword KFONT::getsize(byte font_size, dword text1)
|
||||
{
|
||||
if (!font) {
|
||||
size.width = strlen(text1) * 8;
|
||||
return size.width;
|
||||
}
|
||||
size.height = size.width = 0;
|
||||
size.offset_x = size.offset_y = -1;
|
||||
if (size.pt != font_size) {
|
||||
@@ -275,6 +280,11 @@ inline fastcall dword b32(EAX) { return DSDWORD[EAX]; }
|
||||
{
|
||||
if(!text1)return 0;
|
||||
getsize(font_size, text1);
|
||||
if (!font) {
|
||||
EDI = _background;
|
||||
WriteText(x, y, 0xD0, _color, text1);
|
||||
return size.width;
|
||||
}
|
||||
raw_size = NULL;
|
||||
WriteIntoBuffer(0, -size.offset_y, size.width-size.offset_x,
|
||||
size.height-size.offset_y, _background, _color, font_size, text1);
|
||||
|
@@ -1,8 +1,4 @@
|
||||
#define MEMSIZE 1024*30
|
||||
#define ENTRY_POINT #main
|
||||
|
||||
#include "../lib/kfont.h"
|
||||
#include "../lib/gui.h"
|
||||
|
||||
#define BARH 28
|
||||
#define WINW 528
|
||||
@@ -12,11 +8,8 @@ char active_tab = 0;
|
||||
char colored = true;
|
||||
dword checkbox_flag;
|
||||
|
||||
void main()
|
||||
void main_kfont()
|
||||
{
|
||||
proc_info Form;
|
||||
|
||||
mem_init();
|
||||
checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ);
|
||||
|
||||
if (!param) strcpy(#param, DEFAULT_FONT);
|
||||
@@ -48,7 +41,7 @@ void main()
|
||||
|
||||
case evReDraw:
|
||||
sc.get();
|
||||
DefineAndDrawWindow(215,100,WINW+9,WINH+GetSkinHeight()+4,0x74,0xFFFFFF,#title,0);
|
||||
DefineAndDrawWindow(215,100,WINW+9,WINH+skin_h+4,0x74,0xFFFFFF,#title,0);
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window&ROLLED_UP) break;
|
||||
_DRAW_WINDOW_CONTENT:
|
@@ -10,11 +10,13 @@ SOFTWARE CENTER v2.87
|
||||
#include "..\lib\obj\libini.h"
|
||||
#include "..\lib\kfont.h"
|
||||
#include "..\lib\list_box.h"
|
||||
#include "..\lib\collection.h"
|
||||
|
||||
proc_info Form;
|
||||
|
||||
#include "font_viewer.h"
|
||||
|
||||
llist list;
|
||||
collection app_path_collection=0;
|
||||
dword app_path_collection;
|
||||
bool kolibrios_mounted;
|
||||
|
||||
int window_width,
|
||||
@@ -30,17 +32,11 @@ char window_title[128],
|
||||
|
||||
bool small_screen = false;
|
||||
|
||||
struct SW_COLORS
|
||||
{
|
||||
dword list_bg;
|
||||
dword text;
|
||||
dword graph;
|
||||
dword dark;
|
||||
dword light;
|
||||
} swc;
|
||||
|
||||
block selection[128];
|
||||
|
||||
#define MAX_ITEMS 75
|
||||
#define MAX_FPATH 1024
|
||||
|
||||
void load_ini_config(dword _ini_path)
|
||||
{
|
||||
_ini ini;
|
||||
@@ -57,17 +53,21 @@ void main()
|
||||
{
|
||||
dword id;
|
||||
kfont.init(DEFAULT_FONT);
|
||||
load_dll(libini, #lib_init,1);
|
||||
|
||||
kolibrios_mounted = dir_exists("/kolibrios");
|
||||
|
||||
if (param) {
|
||||
if (streq(#param + strlen(#param) - 3, ".kf")) {
|
||||
main_kfont();
|
||||
} else if (param) {
|
||||
strcpy(#settings_ini_path, #param);
|
||||
} else {
|
||||
strcpy(#settings_ini_path, "/sys/settings/");
|
||||
strcat(#settings_ini_path, I_Path + strrchr(I_Path, '/'));
|
||||
strcat(#settings_ini_path, ".ini");
|
||||
}
|
||||
|
||||
load_dll(libini, #lib_init,1);
|
||||
kolibrios_mounted = dir_exists("/kolibrios");
|
||||
|
||||
app_path_collection = malloc(MAX_FPATH*MAX_ITEMS);
|
||||
|
||||
load_ini_config(#settings_ini_path);
|
||||
list.cur_y = -1;
|
||||
@@ -99,8 +99,8 @@ void main()
|
||||
break;
|
||||
|
||||
case evReDraw:
|
||||
SetAppColors();
|
||||
DefineAndDrawWindow(screen.w-window_width/2,screen.h-window_height/2,window_width,window_height,0x74,0,"",0);
|
||||
sc.get();
|
||||
GetProcessInfo(#Form, SelfInfo);
|
||||
if (Form.status_window&ROLLED_UP) {
|
||||
DrawTitle(#window_title);
|
||||
@@ -110,41 +110,18 @@ void main()
|
||||
DrawTitle(#window_title);
|
||||
list.y = 0;
|
||||
} else {
|
||||
DrawTitle(NULL);
|
||||
DrawTitle(NULL);
|
||||
DrawTopBar();
|
||||
}
|
||||
DrawList();
|
||||
DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, swc.list_bg);
|
||||
DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, sc.light);
|
||||
DrawSelection();
|
||||
}
|
||||
}
|
||||
|
||||
void SetAppColors()
|
||||
{
|
||||
dword bg_col, old_list_bg_color;
|
||||
sc.get();
|
||||
old_list_bg_color = swc.list_bg;
|
||||
bg_col = sc.work;
|
||||
if (skin_is_dark())
|
||||
{
|
||||
//dark colors
|
||||
swc.list_bg = sc.work;
|
||||
swc.text = sc.work_text;
|
||||
swc.dark = sc.dark;
|
||||
swc.light = sc.light;
|
||||
} else {
|
||||
//light colors
|
||||
swc.list_bg = 0xF3F3F3;
|
||||
swc.text = 0x000000;
|
||||
swc.dark = 0xDCDCDC;
|
||||
swc.light = 0xFCFCFC;
|
||||
}
|
||||
}
|
||||
|
||||
void DrawList() {
|
||||
list.count = 0;
|
||||
row = -1;
|
||||
app_path_collection.drop();
|
||||
list_pos = list.y;
|
||||
list.column_max = window_width - 10 / list.item_w;
|
||||
ini_enum_sections stdcall (#settings_ini_path, #process_sections);
|
||||
@@ -168,7 +145,7 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
|
||||
col=0;
|
||||
}
|
||||
|
||||
if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, swc.list_bg);
|
||||
if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, sc.light);
|
||||
DefineButton(col*list.item_w+6, row*list.item_h + list_pos,list.item_w,list.item_h-3,list.count + 100 + BT_HIDE,0);
|
||||
|
||||
icon_char_pos = strchr(key_value, ',');
|
||||
@@ -177,20 +154,21 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
|
||||
selection[list.count].x = icon_x-2;
|
||||
selection[list.count].y = icon_y-2;
|
||||
if (icon_char_pos) ESBYTE[icon_char_pos] = '\0'; //delete icon from string
|
||||
app_path_collection.add(key_value);
|
||||
|
||||
strncpy(list.count * MAX_FPATH + app_path_collection, key_value, MAX_FPATH);
|
||||
|
||||
text_x = col*list.item_w+5;
|
||||
text_y = list.item_h - 40 / 2;
|
||||
if (!strchr(key_name, ' ')) {//|| (kfont.getsize(key_name)+30<list.item_w) <== too slow
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos, list.item_w,0, swc.list_bg, swc.text, 12, key_name);
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos, list.item_w,0, sc.light, sc.work_text, 12, key_name);
|
||||
} else {
|
||||
space_pos = strrchr(key_name, ' ');
|
||||
ESBYTE[key_name+space_pos-1] = '\0';
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos - 2, list.item_w,0, swc.list_bg, swc.text, 12, key_name);
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos + 13, list.item_w,0, swc.list_bg, swc.text, 12, key_name+space_pos);
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos - 2, list.item_w,0, sc.light, sc.work_text, 12, key_name);
|
||||
kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos + 13, list.item_w,0, sc.light, sc.work_text, 12, key_name+space_pos);
|
||||
}
|
||||
if (icon_char_pos) icon_id = atoi(icon_char_pos+1);
|
||||
if (Form.cwidth) draw_icon_32(icon_x, icon_y, swc.list_bg, icon_id);
|
||||
if (Form.cwidth) draw_icon_32(icon_x, icon_y, sc.light, icon_id);
|
||||
list.count++;
|
||||
col++;
|
||||
return true;
|
||||
@@ -212,10 +190,9 @@ byte process_sections(dword sec_name, f_name)
|
||||
old_row = row;
|
||||
|
||||
if (!small_screen) {
|
||||
DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, swc.list_bg);
|
||||
text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, swc.list_bg, swc.text, 15, sec_name);
|
||||
DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, swc.dark);
|
||||
DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, swc.light);
|
||||
DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, sc.light);
|
||||
text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, sc.light, sc.work_text, 15, sec_name);
|
||||
DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 2, sc.work);
|
||||
list_pos += 29;
|
||||
}
|
||||
ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
|
||||
@@ -233,7 +210,7 @@ void DrawTopBar()
|
||||
void EventIconClick(dword appid)
|
||||
{
|
||||
char run_app_path[4096];
|
||||
dword app_path = app_path_collection.get(appid);
|
||||
dword app_path = MAX_FPATH * appid + app_path_collection;
|
||||
dword param_pos = strchr(app_path, '|');
|
||||
if (param_pos) {
|
||||
ESBYTE[param_pos] = NULL;
|
||||
@@ -273,7 +250,7 @@ void DrawSelection()
|
||||
int i;
|
||||
dword col;
|
||||
for (i=0; i<list.count; i++) {
|
||||
if (i==list.cur_y) col=0x0080FF; else col=swc.list_bg;
|
||||
if (i==list.cur_y) col=0x0080FF; else col=sc.light;
|
||||
DrawWideRectangle(selection[i].x, selection[i].y, 36, 36, 2, col);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 85 KiB |
@@ -1,2 +1,2 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("tube.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "tube")
|
||||
tup.rule("tube.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "tube")
|
@@ -1,5 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix en_US >lang.inc
|
||||
@fasm tube.asm tube
|
||||
@erase lang.inc
|
||||
@pause
|
@@ -1,5 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix ru_RU >lang.inc
|
||||
@fasm tube.asm tube
|
||||
@erase lang.inc
|
||||
@pause
|
@@ -1,264 +0,0 @@
|
||||
|
||||
; (<28>) ( ) <20> ) ( ) 256b intro by baze/3SC for Syndeecate 2001
|
||||
; <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> loveC: thanks, Serzh: eat my socks dude ;]
|
||||
; ( ) ( ) ( ) ( ) e-mail: baze@stonline.sk, web: www.3SC.sk
|
||||
|
||||
; Menuet port by VT
|
||||
|
||||
appname equ 'TUBE - FPU'
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd I_END
|
||||
dd 0x40000
|
||||
dd 0x40000
|
||||
dd 0,0
|
||||
|
||||
include '..\..\..\macros.inc'
|
||||
|
||||
START:
|
||||
|
||||
call draw_window
|
||||
|
||||
call init_tube
|
||||
|
||||
push ebx
|
||||
|
||||
still:
|
||||
|
||||
pop ebx
|
||||
|
||||
call MAIN
|
||||
|
||||
push ebx
|
||||
|
||||
mov eax,23
|
||||
mov ebx,1
|
||||
mcall
|
||||
|
||||
cmp eax,1
|
||||
jne no_red
|
||||
call draw_window
|
||||
jmp still
|
||||
no_red:
|
||||
|
||||
cmp eax,0
|
||||
je still
|
||||
|
||||
or eax,-1
|
||||
mcall
|
||||
|
||||
SCREEN equ 160
|
||||
PIXBUF equ 200h
|
||||
EYE equ EYE_P-2
|
||||
|
||||
|
||||
MAIN:
|
||||
|
||||
add bh,10;8
|
||||
mov edi,PIXBUF
|
||||
fadd dword [di-PIXBUF+TEXUV-4]
|
||||
push di
|
||||
mov dx,-80
|
||||
|
||||
TUBEY:
|
||||
|
||||
mov bp,-160
|
||||
|
||||
TUBEX:
|
||||
|
||||
mov si,TEXUV
|
||||
fild word [si-TEXUV+EYE]
|
||||
mov [si],bp
|
||||
fild word [si]
|
||||
mov [si],dx
|
||||
fild word [si]
|
||||
mov cl,2
|
||||
|
||||
ROTATE:
|
||||
|
||||
fld st3
|
||||
fsincos
|
||||
fld st2
|
||||
fmul st0,st1
|
||||
fld st4
|
||||
fmul st0,st3
|
||||
db 0xde,0xe9 ; fsubp st1,st0
|
||||
db 0xd9,0xcb ; fxch st3
|
||||
fmulp st2,st0
|
||||
fmulp st3,st0
|
||||
faddp st2,st0
|
||||
db 0xd9,0xca ; fxch st2
|
||||
|
||||
loop ROTATE
|
||||
|
||||
fld st1
|
||||
db 0xdc,0xc8 ; fmul st0,st
|
||||
fld st1
|
||||
db 0xdc,0xc8 ; fmul st0,st
|
||||
faddp st1,st0
|
||||
fsqrt
|
||||
db 0xde,0xfb ; fdivp st3,st0
|
||||
fpatan
|
||||
fimul word [si-4]
|
||||
fistp word [si]
|
||||
fimul word [si-4]
|
||||
fistp word [si+1]
|
||||
mov si,[si]
|
||||
|
||||
lea ax,[bx+si]
|
||||
add al,ah
|
||||
and al,64
|
||||
mov al,-5
|
||||
jz STORE_1
|
||||
|
||||
shl si,2
|
||||
lea ax,[bx+si]
|
||||
sub al,ah
|
||||
mov al,-16
|
||||
jns STORE_1
|
||||
|
||||
shl si,1
|
||||
mov al,-48
|
||||
|
||||
STORE_1:
|
||||
|
||||
; add al,[ebx+esi+0x80000]
|
||||
add [di],al
|
||||
inc di
|
||||
|
||||
inc bp
|
||||
cmp bp,160
|
||||
|
||||
EYE_P:
|
||||
|
||||
jnz TUBEX
|
||||
inc dx
|
||||
cmp dx,80
|
||||
jnz TUBEY
|
||||
|
||||
call display_image
|
||||
|
||||
pop si
|
||||
mov ch,SCREEN*320/256
|
||||
|
||||
BLUR:
|
||||
|
||||
inc si
|
||||
sar byte [si],2
|
||||
loop BLUR
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
||||
display_image:
|
||||
|
||||
pusha
|
||||
|
||||
mov esi,PIXBUF
|
||||
mov edi,0x10000
|
||||
newp:
|
||||
movzx edx,byte [esi]
|
||||
shl edx,4
|
||||
; mov dh,dl
|
||||
mov [edi],edx
|
||||
|
||||
add edi,3
|
||||
inc esi
|
||||
|
||||
cmp esi,320*160+PIXBUF
|
||||
jbe newp
|
||||
|
||||
mov eax,7
|
||||
mov ecx,320*65536+160
|
||||
xor edx,edx
|
||||
mov ebx,0x10000
|
||||
mcall
|
||||
|
||||
popa
|
||||
ret
|
||||
|
||||
|
||||
|
||||
draw_window:
|
||||
|
||||
pusha
|
||||
|
||||
mcall 12, 1
|
||||
mcall 48, 4 ;get skin width
|
||||
lea ecx,[100*65536+164+eax]
|
||||
xor eax,eax
|
||||
mov ebx,100*65536+329
|
||||
mov edx,0x74000000
|
||||
mov edi,title
|
||||
mcall
|
||||
mcall 12, 2
|
||||
popa
|
||||
ret
|
||||
|
||||
title db appname,0
|
||||
|
||||
db 41,0,0xC3,0x3C
|
||||
|
||||
TEXUV:
|
||||
|
||||
init_tube:
|
||||
|
||||
mov ecx,256
|
||||
|
||||
PAL1:
|
||||
|
||||
mov dx,3C8h
|
||||
mov ax,cx
|
||||
inc dx
|
||||
sar al,1
|
||||
js PAL2
|
||||
mul al
|
||||
shr ax,6
|
||||
|
||||
PAL2:
|
||||
|
||||
mov al,0
|
||||
jns PAL3
|
||||
sub al,cl
|
||||
shr al,1
|
||||
shr al,1
|
||||
|
||||
PAL3:
|
||||
|
||||
mov bx,cx
|
||||
mov [ebx+0x1000],bh
|
||||
loop PAL1
|
||||
mov ecx,256
|
||||
|
||||
TEX:
|
||||
|
||||
mov bx,cx
|
||||
add ax,cx
|
||||
rol ax,cl
|
||||
mov dh,al
|
||||
sar dh,5
|
||||
adc dl,dh
|
||||
adc dl,[ebx+255+0x1000]
|
||||
shr dl,1
|
||||
mov [ebx+0x1000],dl
|
||||
not bh
|
||||
mov [ebx+0x1000],dl
|
||||
loop TEX
|
||||
|
||||
fninit
|
||||
fldz
|
||||
|
||||
ret
|
||||
|
||||
|
||||
I_END:
|
||||
|
||||
|
||||
|
||||
|
313
programs/demos/tube/tube.asm
Normal file
@@ -0,0 +1,313 @@
|
||||
; SPDX-License-Identifier: GPL-2.0
|
||||
; Ported tube demo by VT
|
||||
; Copyright (C) 2001 Miloš Bazelides <baze@stonline.sk>
|
||||
; Copyright (C) 2006-2025 KolibriOS team
|
||||
|
||||
; Original comments:
|
||||
; 256b intro by baze/3SC for Syndeecate 2001
|
||||
; loveC: thanks, Serzh: eat my socks dude ;]
|
||||
; e-mail: baze@stonline.sk, web: www.3SC.sk
|
||||
|
||||
; Original source: https://baze.sk/3sc/files/tube.zip
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
dd 1,START,image_end,memory_end,stacktop,0,0
|
||||
|
||||
include '../../macros.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
|
||||
title db 'Tube - FPU',0
|
||||
|
||||
SCREEN_W dd 640-10 ;10 px for borders
|
||||
SCREEN_H dd 400-10
|
||||
|
||||
align 4
|
||||
START:
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
call OnResize
|
||||
call draw_window
|
||||
call init_tube
|
||||
push ebx
|
||||
|
||||
still:
|
||||
pop ebx
|
||||
call MAIN
|
||||
push ebx
|
||||
|
||||
mcall SF_WAIT_EVENT_TIMEOUT,1
|
||||
|
||||
cmp eax,EV_REDRAW
|
||||
jne no_red
|
||||
call draw_window
|
||||
jmp still
|
||||
no_red:
|
||||
|
||||
or eax,eax
|
||||
jz still
|
||||
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
align 4
|
||||
OnResize:
|
||||
mov ecx,[SCREEN_W]
|
||||
imul ecx,[SCREEN_H]
|
||||
;ecx = SCREEN_W*SCREEN_H
|
||||
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[PIXBUF]
|
||||
mov [PIXBUF],eax
|
||||
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buf1]
|
||||
mov [buf1],eax
|
||||
lea ecx,[ecx+2*ecx]
|
||||
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[buf2]
|
||||
mov [buf2],eax
|
||||
ret
|
||||
|
||||
align 4
|
||||
MAIN:
|
||||
;edx - coord y
|
||||
;ebp - coord x
|
||||
;edi - pixel buffer
|
||||
add ebx,10 shl 8
|
||||
mov edi,[PIXBUF]
|
||||
fadd dword [TEXUV-4]
|
||||
push edi
|
||||
mov edx,[SCREEN_H]
|
||||
inc edx ;fix (height%2)==1
|
||||
shr edx,1
|
||||
neg edx ;edx=-SCREEN_H/2
|
||||
align 4
|
||||
TUBEY:
|
||||
mov ebp,[SCREEN_W]
|
||||
inc ebp ;fix (width%2)==1
|
||||
shr ebp,1
|
||||
neg ebp ;ebp=-SCREEN_W/2
|
||||
align 4
|
||||
TUBEX:
|
||||
mov esi,TEXUV
|
||||
fild dword [SCREEN_W]
|
||||
fld1
|
||||
fld1
|
||||
faddp
|
||||
fdivp ;st0=SCREEN_W/2
|
||||
mov [esi],ebp
|
||||
fild word [esi]
|
||||
mov [esi],edx
|
||||
fild word [esi]
|
||||
mov cl,2
|
||||
|
||||
ROTATE:
|
||||
fld st3
|
||||
fsincos
|
||||
fld st2
|
||||
fmul st0,st1
|
||||
fld st4
|
||||
fmul st0,st3
|
||||
fsubp st1,st0
|
||||
fxch st3
|
||||
fmulp st2,st0
|
||||
fmulp st3,st0
|
||||
faddp st2,st0
|
||||
fxch st2
|
||||
loop ROTATE
|
||||
|
||||
fld st1
|
||||
fmul st0,st0
|
||||
fld st1
|
||||
fmul st0,st0
|
||||
faddp st1,st0
|
||||
fsqrt
|
||||
|
||||
fdivp st3,st0
|
||||
fpatan
|
||||
fimul word [esi-4]
|
||||
fistp word [esi]
|
||||
fimul word [esi-4]
|
||||
fistp word [esi+1]
|
||||
mov esi,[esi]
|
||||
|
||||
lea eax,[ebx+esi]
|
||||
add al,ah
|
||||
and al,64
|
||||
mov al,-5
|
||||
jz STORE_1
|
||||
|
||||
shl esi,2
|
||||
lea eax,[ebx+esi]
|
||||
sub al,ah
|
||||
mov al,-16
|
||||
jns STORE_1
|
||||
|
||||
shl esi,1
|
||||
mov al,-48
|
||||
|
||||
STORE_1:
|
||||
; add al,[ebx+esi+0x80000]
|
||||
add [edi],al
|
||||
inc edi
|
||||
inc ebp
|
||||
mov eax,[SCREEN_W]
|
||||
shr eax,1 ;eax=SCREEN_W/2
|
||||
cmp ebp,eax
|
||||
|
||||
jnz TUBEX
|
||||
inc edx
|
||||
mov eax,[SCREEN_H]
|
||||
shr eax,1 ;eax=SCREEN_H/2
|
||||
cmp edx,eax
|
||||
jnz TUBEY
|
||||
|
||||
call display_image
|
||||
|
||||
pop esi
|
||||
mov ecx,[SCREEN_W]
|
||||
imul ecx,[SCREEN_H]
|
||||
|
||||
align 4
|
||||
BLUR:
|
||||
inc esi
|
||||
sar byte [esi],2
|
||||
loop BLUR
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
display_image:
|
||||
pusha
|
||||
|
||||
mov esi,[PIXBUF]
|
||||
mov edi,[buf2]
|
||||
mov eax,[SCREEN_W]
|
||||
imul eax,[SCREEN_H]
|
||||
add eax,esi
|
||||
align 4
|
||||
newp:
|
||||
movzx edx,byte [esi]
|
||||
shl edx,4
|
||||
|
||||
mov [edi],edx
|
||||
|
||||
add edi,3
|
||||
inc esi
|
||||
|
||||
cmp esi,eax
|
||||
jbe newp
|
||||
|
||||
xor edx,edx
|
||||
mov ecx,[SCREEN_W]
|
||||
shl ecx,16
|
||||
add ecx,[SCREEN_H]
|
||||
mcall SF_PUT_IMAGE,[buf2]
|
||||
|
||||
popa
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
draw_window:
|
||||
pusha
|
||||
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
add eax,[SCREEN_H]
|
||||
lea ecx,[100*65536+4+eax]
|
||||
mov ebx,[SCREEN_W]
|
||||
add ebx,(100 shl 16)+9
|
||||
mcall SF_CREATE_WINDOW,,, 0x73000000,,title
|
||||
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
add eax,4
|
||||
sub eax,[procinfo.box.height]
|
||||
neg eax
|
||||
cmp eax,[SCREEN_H]
|
||||
je .end_h
|
||||
cmp eax,32 ;min height
|
||||
jge @f
|
||||
mov eax,32
|
||||
@@:
|
||||
mov [SCREEN_H],eax
|
||||
xor eax,eax
|
||||
mov [SCREEN_W],eax
|
||||
.end_h:
|
||||
|
||||
mov eax,[procinfo.box.width]
|
||||
sub eax,9
|
||||
cmp eax,[SCREEN_W]
|
||||
je .resize_end
|
||||
cmp eax,64 ;min width
|
||||
jge @f
|
||||
mov eax,64
|
||||
@@:
|
||||
mov [SCREEN_W],eax
|
||||
|
||||
call OnResize
|
||||
.resize_end:
|
||||
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
popa
|
||||
ret
|
||||
|
||||
align 4
|
||||
db 41,0,0xC3,0x3C
|
||||
TEXUV:
|
||||
rd 1
|
||||
|
||||
align 4
|
||||
init_tube:
|
||||
mov ecx,256
|
||||
mov edi,[buf1]
|
||||
|
||||
PAL1:
|
||||
mov edx,3C8h
|
||||
mov eax,ecx
|
||||
inc edx
|
||||
sar al,1
|
||||
js PAL2
|
||||
mul al
|
||||
shr ax,6
|
||||
|
||||
PAL2:
|
||||
mov al,0
|
||||
jns PAL3
|
||||
sub al,cl
|
||||
shr al,1
|
||||
shr al,1
|
||||
|
||||
PAL3:
|
||||
mov ebx,ecx
|
||||
mov [ebx+edi],bh
|
||||
loop PAL1
|
||||
mov ecx,256
|
||||
|
||||
TEX:
|
||||
mov bx,cx
|
||||
add ax,cx
|
||||
rol ax,cl
|
||||
mov dh,al
|
||||
sar dh,5
|
||||
adc dl,dh
|
||||
adc dl,[ebx+255+edi]
|
||||
shr dl,1
|
||||
mov [ebx+edi],dl
|
||||
not bh
|
||||
mov [ebx+edi],dl
|
||||
loop TEX
|
||||
|
||||
fninit
|
||||
fldz
|
||||
|
||||
ret
|
||||
|
||||
align 4
|
||||
image_end:
|
||||
|
||||
PIXBUF rd 1
|
||||
buf1 rd 1
|
||||
buf2 rd 1
|
||||
procinfo process_information
|
||||
|
||||
rb 1024
|
||||
align 4
|
||||
stacktop:
|
||||
memory_end:
|
2
programs/develop/charsets/Tupfile.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("charsets.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "charsets")
|
33
programs/develop/charsets/changelog.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
Development history
|
||||
|
||||
22.10.2024 - 0.1.0
|
||||
- First version, display of charpages in all KOS charsets
|
||||
|
||||
23.10.2024 - 0.2.0
|
||||
- Fixed UTF-8 display by Doczom
|
||||
- Interface adaptation for skins
|
||||
- Reduced redraw
|
||||
- Refactored code
|
||||
|
||||
27.10.2024 - 0.2.5
|
||||
- Fixed version in app header
|
||||
- Tweaked UI colors
|
||||
- Something else???
|
||||
|
||||
17.01.2025 - 0.3.0
|
||||
- Added button to reset charpage to 00
|
||||
- Functionality to pick and preview single character
|
||||
- Functionality to input characters from keyboard
|
||||
- Display of ASCII and SCAN codes of characters in dec and hex format
|
||||
- Tweaked UI colors
|
||||
|
||||
17.01.2025 - 0.3.1
|
||||
- Small UI fixes
|
||||
- Code refactoring
|
||||
- Reformatted sources, fixed indentation
|
||||
and removed non-Unicode characters
|
||||
|
||||
07.03.2025 - 0.3.2
|
||||
- Renamed to Charsets Viewer/Charsets
|
||||
- Symbol highlight UI tweaks
|
||||
- Fixed rolled up bug
|
@@ -1,3 +1,8 @@
|
||||
; SPDX-License-Identifier: GPL-2.0-only
|
||||
; SPDX-FileCopyrightText: 2024-2025 KolibriOS Team
|
||||
|
||||
; ================================================================
|
||||
|
||||
format binary as ""
|
||||
use32
|
||||
org 0
|
||||
@@ -170,7 +175,8 @@ draw_window:
|
||||
mcall 48, 3, window_colors, 40
|
||||
|
||||
mcall , 4
|
||||
push eax
|
||||
add eax, 3
|
||||
mov [win_head], eax
|
||||
|
||||
mov eax, 0
|
||||
mov ebx, 100 * 65536 + 685
|
||||
@@ -180,15 +186,24 @@ draw_window:
|
||||
mov edi, title
|
||||
mcall
|
||||
|
||||
pop esi
|
||||
add esi, 495
|
||||
mcall 67, -1, -1, -1,
|
||||
; Don't draw rolled up or rolled down window
|
||||
mcall 9, proc_info, -1
|
||||
mov eax, [proc_info + 70]
|
||||
mov [win_stat], eax
|
||||
test [win_stat], 100b
|
||||
jnz .draw_end
|
||||
|
||||
; Draw all app content
|
||||
add [win_head], 492
|
||||
|
||||
call draw_base
|
||||
call draw_update
|
||||
call draw_toggle
|
||||
|
||||
mcall 12, 2
|
||||
.draw_end:
|
||||
mov esi, [win_head]
|
||||
mcall 67, -1, -1, -1,
|
||||
mcall 12, 2
|
||||
|
||||
ret
|
||||
|
||||
@@ -399,9 +414,21 @@ draw_update:
|
||||
mov al, 0x01
|
||||
mov ecx, eax
|
||||
push ecx
|
||||
mcall 13, 65536 * 34 + 384, , [window_colors.work_button]
|
||||
add ecx, 65536 * 23
|
||||
|
||||
mov eax, 13
|
||||
mov ebx, 65536 * 34 + 384
|
||||
mov edx, [window_colors.work_button]
|
||||
|
||||
;skip lines aligned to table borders
|
||||
cmp ecx, 65536 * 34 + 65536
|
||||
jle .hl_next_hr
|
||||
mcall
|
||||
.hl_next_hr:
|
||||
add ecx, 65536 * 23
|
||||
cmp ecx, 65536 * 417
|
||||
jge .hl_end_hr
|
||||
mcall
|
||||
.hl_end_hr:
|
||||
|
||||
mov al, [char]
|
||||
and al, 0x0F
|
||||
@@ -411,15 +438,28 @@ draw_update:
|
||||
shl eax, 16
|
||||
mov al, 0x01
|
||||
mov ebx, eax
|
||||
mcall 13, , 65536 * 34 + 384, [window_colors.work_button]
|
||||
add ebx, 65536 * 23
|
||||
|
||||
mov eax, 13
|
||||
mov ecx, 65536 * 34 + 384
|
||||
mov edx, [window_colors.work_button]
|
||||
|
||||
;skip lines aligned to table borders
|
||||
cmp ebx, 65536 * 34 + 65536
|
||||
jle .hl_next_vr
|
||||
mcall
|
||||
.hl_next_vr:
|
||||
add ebx, 65536 * 23
|
||||
cmp ebx, 65536 * 417
|
||||
jge .hl_end_vr
|
||||
mcall
|
||||
.hl_end_vr:
|
||||
|
||||
pop ecx
|
||||
add ecx, 23
|
||||
sub ebx, 65535 * 23
|
||||
mcall
|
||||
|
||||
; redraw active symbol
|
||||
shr ecx, 16
|
||||
mov bx, cx
|
||||
add ebx, 65536 * 8 + 5
|
||||
@@ -574,7 +614,7 @@ logic_utf16to8:
|
||||
|
||||
; ================================================================
|
||||
|
||||
title db "Charset Checker 0.3.1", 0
|
||||
title db "Charsets Viewer 0.3.2", 0
|
||||
|
||||
lb_cp6x9 db "CP866 6x9 ", 0
|
||||
lb_cp8x16 db "CP866 8x16 ", 0
|
||||
@@ -609,7 +649,11 @@ char_ascii dw 0x0000, 0
|
||||
char_scan dw 0x0000, 0
|
||||
char_utf dd 0x00000000, 0
|
||||
|
||||
window_colors system_colors
|
||||
win_stat rd 1
|
||||
win_head rd 1
|
||||
|
||||
window_colors system_colors
|
||||
proc_info process_information
|
||||
|
||||
; ================================================================
|
||||
|
@@ -1,5 +1,5 @@
|
||||
; <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> console.inc - <EFBFBD><EFBFBD><EFBFBD>ᠭ<EFBFBD><EFBFBD> scrollbar
|
||||
; <EFBFBD><EFBFBD><EFBFBD>⨪<EFBFBD><EFBFBD>쭠<EFBFBD> <EFBFBD>ப<EFBFBD><EFBFBD>⪠
|
||||
; Helper file for console.inc - scrollbar definition
|
||||
; Vertical scrolling
|
||||
virtual at 0
|
||||
file 'conscrlv.bmp', 36h
|
||||
; sanity check
|
||||
@@ -28,7 +28,7 @@ if con.vscroll_btn_height*4 + con.vscroll_bgr_height*2 \
|
||||
error 'conscrlv.bmp: invalid dimensions!'
|
||||
end if
|
||||
|
||||
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㦠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BMP, <EFBFBD><EFBFBD> 室<EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 7-<EFBFBD> <EFBFBD>㭪樨
|
||||
; Load BMP data, converting it into data for sysfn 7 on the fly
|
||||
con.vscroll:
|
||||
repeat con.vscroll_height
|
||||
file 'conscrlv.bmp':36h + ((con.vscroll_width*3+3) and not 3)*(con.vscroll_height - %),\
|
||||
|
@@ -1,6 +1,7 @@
|
||||
; <EFBFBD>㭪樨 ࠡ<><E0A0A1><EFBFBD> <20> <20><><EFBFBD>᮫<EFBFBD><E1AEAB> <20><><EFBFBD> <20>ணࠬ<E0AEA3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
; SPDX-License-Identifier: GPL-2.0
|
||||
; Functions for interaction with the console for KolibriOS programs
|
||||
; diamond, 2006-2008
|
||||
|
||||
; Copyright (C) 2006-2025 KolibriOS team
|
||||
|
||||
format MS COFF
|
||||
|
||||
@@ -56,7 +57,7 @@ START:
|
||||
or eax, -1
|
||||
ret 4
|
||||
|
||||
; <EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>᮫<EFBFBD>
|
||||
; Console initialization
|
||||
; void __stdcall con_init(dword wnd_width, dword wnd_height,
|
||||
; dword scr_width, dword scr_height, const char* title);
|
||||
|
||||
@@ -271,13 +272,13 @@ con_write_length:
|
||||
pop esi ebx
|
||||
ret 8
|
||||
|
||||
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
|
||||
con.printfc.normal = 0 ; <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD>
|
||||
; Each character is classified as one of the following
|
||||
con.printfc.normal = 0 ; normal character
|
||||
con.printfc.percent = 1 ; '%'
|
||||
con.printfc.dot = 2 ; '.'
|
||||
con.printfc.asterisk = 3 ; '*'
|
||||
con.printfc.zero = 4 ; '0'
|
||||
con.printfc.digit = 5 ; <EFBFBD><EFBFBD><EFBFBD>㫥<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
con.printfc.digit = 5 ; non-null digit
|
||||
con.printfc.plus = 6 ; '+'
|
||||
con.printfc.minus = 7 ; '-'
|
||||
con.printfc.sharp = 8 ; '#'
|
||||
@@ -376,24 +377,24 @@ con_printf:
|
||||
jmp .normal
|
||||
.spec_begin:
|
||||
xor ebx, ebx
|
||||
; bl = ⨯ <20><><EFBFBD><EFBFBD>樨:
|
||||
; 0 = <EFBFBD><EFBFBD>砫<EFBFBD>
|
||||
; 1 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⠭ <20><><EFBFBD><EFBFBD>騩 0 <20> ᯥ<><E1AFA5>䨪<EFBFBD>樨 <20><>ଠ<EFBFBD><E0ACA0>
|
||||
; 2 = <EFBFBD><EFBFBD>⠥<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD>
|
||||
; 3 = <EFBFBD><EFBFBD>⠥<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>筮<EFBFBD><E7ADAE><EFBFBD>
|
||||
; 4 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⠭<EFBFBD> <20><><EFBFBD><EFBFBD> ࠧ<><E0A0A7><EFBFBD><EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>
|
||||
; 5 = <EFBFBD><EFBFBD>⠥<EFBFBD> <20><><EFBFBD><EFBFBD> ⨯<>
|
||||
; bh = 䫠<EFBFBD><EFBFBD>:
|
||||
; 1 = 䫠<EFBFBD> '#', <EFBFBD>뢮<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0/0x/0X
|
||||
; 2 = 䫠<EFBFBD> '-', <EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
; 4 = 䫠<EFBFBD> '0', <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ﬨ
|
||||
; 8 = 䫠<EFBFBD> 'h', <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⪨<EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5>
|
||||
; bl = position type:
|
||||
; 0 = start
|
||||
; 1 = read leading 0 in format specification
|
||||
; 2 = read width field
|
||||
; 3 = read precision field
|
||||
; 4 = read argument size field
|
||||
; 5 = read type field
|
||||
; bh = flags:
|
||||
; 1 = flag '#', output 0/0x/0X
|
||||
; 2 = flag '-', align left
|
||||
; 4 = flag '0', zero padding
|
||||
; 8 = flag 'h', short argument
|
||||
push -1
|
||||
; dword [esp+8] = precision
|
||||
push -1
|
||||
; dword [esp+4] = width
|
||||
push 0
|
||||
; byte [esp] = 䫠<EFBFBD> 0/'+'/' '
|
||||
; byte [esp] = flag 0/'+'/' '
|
||||
.spec:
|
||||
xor eax, eax
|
||||
lodsb
|
||||
@@ -529,7 +530,7 @@ con_printf:
|
||||
@@:
|
||||
push edx
|
||||
xor edx, edx
|
||||
; <EFBFBD><EFBFBD> <20> eax, <20>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD> <20> ecx
|
||||
; number in eax, radix in ecx
|
||||
@@:
|
||||
cmp dword [esp+16+8], 0
|
||||
jnz .print_num
|
||||
@@ -1777,10 +1778,10 @@ con.data2image:
|
||||
mov al, [esi+1]
|
||||
push eax
|
||||
and al, 0xF
|
||||
mov ebx, eax ; 梥<EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
||||
mov ebx, eax ; text color
|
||||
pop eax
|
||||
shr al, 4
|
||||
mov ebp, eax ; 梥<EFBFBD> 䮭<>
|
||||
mov ebp, eax ; background color
|
||||
sub ebx, ebp
|
||||
lodsb
|
||||
inc esi
|
||||
@@ -2188,7 +2189,7 @@ con_gets2:
|
||||
sub ebx, 1
|
||||
jle .ret
|
||||
mov byte [esi], 0
|
||||
xor ecx, ecx ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㦥 <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
||||
xor ecx, ecx ; length of the already entered string
|
||||
call con.get_data_ptr
|
||||
.loop:
|
||||
call con_getch2
|
||||
@@ -2596,15 +2597,15 @@ con.wake:
|
||||
popad
|
||||
ret
|
||||
|
||||
; <EFBFBD><EFBFBD>⮪ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>᮫<EFBFBD>. <20><>ࠡ<EFBFBD><E0A0A1>뢠<EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD> <20> <20>뢮<EFBFBD>.
|
||||
; Console window thread. Handles input and output.
|
||||
con.thread:
|
||||
; <EFBFBD><EFBFBD>⮪ ॠ<><E0A5A0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> IPC, <20><><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <20><><EFBFBD> ⮣<>, <20>⮡<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>뫮 "ࠧ<>㤨<EFBFBD><E3A4A8>"
|
||||
; The thread responds to IPC, which is used only so that it can be "waken up"
|
||||
push 40
|
||||
pop eax
|
||||
push 0x80000067 ; program dont getting events mouse, when it dont active
|
||||
pop ebx
|
||||
int 0x40
|
||||
xor ebx,ebx ;clear ebx
|
||||
xor ebx,ebx ; clear ebx
|
||||
mov al, 60
|
||||
mov bl, 1
|
||||
mov ecx, con.ipc_buf
|
||||
@@ -3212,7 +3213,7 @@ con.draw_image:
|
||||
@@:
|
||||
int 0x40
|
||||
push edx
|
||||
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㭪<EFBFBD>
|
||||
; Calculate the height of the slider
|
||||
mov ax, dx
|
||||
sub eax, con.vscroll_btn_height
|
||||
mov ecx, eax
|
||||
@@ -3222,7 +3223,7 @@ con.draw_image:
|
||||
jae @f
|
||||
mov al, 5
|
||||
@@:
|
||||
; eax = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㭪<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㭪<EFBFBD>
|
||||
; eax = slider height. Calculate the slider position
|
||||
mov [con.vscrollbar_size], eax
|
||||
xchg eax, ecx
|
||||
sub eax, ecx
|
||||
@@ -3232,7 +3233,7 @@ con.draw_image:
|
||||
div ebx
|
||||
pop edx
|
||||
push edx
|
||||
; ecx = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>㭪<EFBFBD>, eax = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
; ecx = slider height, eax = position
|
||||
add eax, con.vscroll_btn_height
|
||||
mov [con.vscrollbar_pos], eax
|
||||
mov ebx, con.vscroll_bgr2
|
||||
@@ -3331,8 +3332,8 @@ con.extended_numlock:
|
||||
|
||||
cursor_esc dd 27 + ('[' shl 8)
|
||||
|
||||
; <EFBFBD> ⥪<>饩 ॠ<><E0A5A0><EFBFBD><EFBFBD>樨 <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><> 㬮<>砭<EFBFBD><E7A0AD> ⠪<><E2A0AA><EFBFBD>.
|
||||
; <EFBFBD> <20><><EFBFBD><EFBFBD>饬 <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20><> ini-䠩<><E4A0A9> console.ini.
|
||||
; In the current implementation, the default values are:
|
||||
; In the future, they may be read as parameters from the console.ini ini file.
|
||||
con.def_wnd_width dd 80
|
||||
con.def_wnd_height dd 25
|
||||
con.def_scr_width dd 80
|
||||
|
@@ -1,91 +1,91 @@
|
||||
console.obj <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
console.obj экспортирует следующие функции:
|
||||
|
||||
typedef unsigned long dword; /* 32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> */
|
||||
typedef unsigned short word; /* 16-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> */
|
||||
typedef unsigned long dword; /* 32-битное беззнаковое целое */
|
||||
typedef unsigned short word; /* 16-битное беззнаковое целое */
|
||||
|
||||
void __stdcall con_init(dword wnd_width, dword wnd_height,
|
||||
dword scr_width, dword scr_height, const char* title);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
wnd_width, wnd_height - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
scr_width, scr_height - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> -1 (=0xFFFFFFFF)
|
||||
- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
title - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Инициализация консоли. Вызывается один раз в начале программы.
|
||||
wnd_width, wnd_height - высота и ширина (в символах) видимой в окне консоли
|
||||
области;
|
||||
scr_width, scr_height - высота и ширина (в символах) всей консоли;
|
||||
любые из первых 4 параметров могут быть установлены в -1 (=0xFFFFFFFF)
|
||||
- использовать значения по умолчанию;
|
||||
title - заголовок окна консоли.
|
||||
|
||||
void __stdcall con_exit(bool bCloseWindow);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bCloseWindow
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> " [Finished]".
|
||||
Вызывается при завершении программы. Если (байтовый) параметр bCloseWindow
|
||||
нулевой, то окно консоли остаётся на экране до того момента, как пользователь
|
||||
пожелает закрыть его, при этом к заголовку добавляется строка " [Finished]".
|
||||
|
||||
void __stdcall con_set_title(const char* title);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Устанавливает новый заголовок окна консоли.
|
||||
|
||||
void __stdcall con_write_asciiz(const char* string);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ASCIIZ-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Выводит ASCIIZ-строку в консоль в текущую позицию, продвигает текущую позицию.
|
||||
|
||||
void __stdcall con_write_string(const char* string, dword length);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> con_write_asciiz, <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> length <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Аналогично con_write_asciiz, но выводит ровно length символов.
|
||||
|
||||
int __cdecl con_printf(const char* format, ...)
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> printf <EFBFBD><EFBFBD> ANSI C.
|
||||
Стандартная printf из ANSI C.
|
||||
|
||||
dword __stdcall con_get_flags(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Получает значение флагов вывода.
|
||||
dword __stdcall con_set_flags(dword new_flags);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>):
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
Устанавливает значение флагов вывода. Возвращает старое значение.
|
||||
Флаги (битовая маска):
|
||||
/* цвет текста */
|
||||
#define CON_COLOR_BLUE 1
|
||||
#define CON_COLOR_GREEN 2
|
||||
#define CON_COLOR_RED 4
|
||||
#define CON_COLOR_BRIGHT 8
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
/* цвет фона */
|
||||
#define CON_BGR_BLUE 0x10
|
||||
#define CON_BGR_GREEN 0x20
|
||||
#define CON_BGR_RED 0x40
|
||||
#define CON_BGR_BRIGHT 0x80
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
/* управление выводом */
|
||||
#define CON_IGNORE_SPECIALS 0x100
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
10 ('\n') - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
13 ('\r') - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
8 ('\b') - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>)
|
||||
9 ('\t') - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
27 ('\033'='\x1B') - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Esc-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. */
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Esc-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
Esc[<number1>;<number2>;<number3>m - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
0 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
1 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
5 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
7 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
30 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
31 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
32 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
33 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
34 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
35 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
36 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
37 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
40 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
41 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
42 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
43 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
44 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
45 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
46 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
47 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
Esc[<number>A - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <number> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
Esc[<number>B - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <number> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
Esc[<number>C - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <number> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Esc[<number>D - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <number> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
/* Если флаг сброшен, функция интерпретирует специальные символы:
|
||||
10 ('\n') - перевод в начало следующей строки
|
||||
13 ('\r') - перевод в начало текущей строки
|
||||
8 ('\b') - забой (на символ назад)
|
||||
9 ('\t') - табуляция
|
||||
27 ('\033'='\x1B') - начало Esc-последовательности;
|
||||
иначе выводит их как обычные символы. */
|
||||
/* Поддерживаемые Esc-последовательности:
|
||||
Esc[<number1>;<number2>;<number3>m - выбор атрибутов символов:
|
||||
можно указывать один, два или три кода в любом порядке;
|
||||
0 = нормальное изображение (белые символы на чёрном фоне)
|
||||
1 = выделение яркостью
|
||||
5 = яркий фон
|
||||
7 = реверсное изображение (чёрные символы на белом фоне)
|
||||
30 = чёрные символы
|
||||
31 = красные символы
|
||||
32 = зелёные символы
|
||||
33 = жёлтые символы
|
||||
34 = синие символы
|
||||
35 = фиолетовые символы
|
||||
36 = бирюзовые символы
|
||||
37 = белые символы
|
||||
40 = чёрный фон
|
||||
41 = красный фон
|
||||
42 = зелёный фон
|
||||
43 = жёлтый фон
|
||||
44 = синий фон
|
||||
45 = фиолетовый фон
|
||||
46 = бирюзовый фон
|
||||
47 = белый фон
|
||||
Следующие последовательности появились в версии 5 библиотеки:
|
||||
Esc[<number>A - переместить курсор на <number> строк вверх
|
||||
Esc[<number>B - переместить курсор на <number> строк вниз
|
||||
Esc[<number>C - переместить курсор на <number> позиций вправо
|
||||
Esc[<number>D - переместить курсор на <number> позиций влево
|
||||
Esc[<number1>;<number2>H = Esc[<number1>;<number2>f -
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <number1>,<number2>
|
||||
Esc[2J - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 9 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
установить курсор в позицию с координатами <number1>,<number2>
|
||||
Esc[2J - очистить экран, переместить курсор в левый верхний угол
|
||||
Следующие последовательности появились в версии 9 библиотеки:
|
||||
Esc[J or Esc[0J - Erase everything below cursor
|
||||
Esc[1J - Erase everything above cursor
|
||||
Esc[K - Erase in line
|
||||
@@ -107,83 +107,83 @@ dword __stdcall con_set_flags(dword new_flags);
|
||||
Esc]2<string>ST/BEL - Implemented identical as Esc]0.
|
||||
|
||||
*/
|
||||
/* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> con_set_flags */
|
||||
/* сигнал о закрытии окна консоли; появился в версии 6 библиотеки;
|
||||
флаг игнорируется функцией con_set_flags */
|
||||
#define CON_WINDOW_CLOSED 0x200
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = 7.
|
||||
Значение по умолчанию для флагов = 7.
|
||||
|
||||
int __stdcall con_get_font_height(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Возвращает значение высоты шрифта.
|
||||
|
||||
int __stdcall con_get_cursor_height(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Получает значение высоты курсора.
|
||||
int __stdcall con_set_cursor_height(int new_height);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> 0 <EFBFBD><EFBFBD> font_height-1)
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - 15% <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Устанавливает значение высоты курсора. Возвращает старое значение.
|
||||
Попытка установить значение вне корректного интервала (от 0 до font_height-1)
|
||||
игнорируется.
|
||||
Курсор высоты 0 не отображается на экране.
|
||||
Значение высоты по умолчанию - 15% от высоты шрифта.
|
||||
|
||||
int __stdcall con_getch(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ASCII-<2D><><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Fx <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0,
|
||||
<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DOS-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>).
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 7 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0.
|
||||
Считывает один символ с клавиатуры.
|
||||
Для обычных символов возвращается ASCII-код. Для расширенных символов
|
||||
(например, Fx и стрелочек) первый вызов функции возвращает 0,
|
||||
а повторный вызов возвращает расширенный код (подобно DOS-функциям ввода).
|
||||
Начиная с версии 7 библиотеки, после закрытия окна консоли возвращается
|
||||
значение 0.
|
||||
|
||||
word __stdcall con_getch2(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ASCII-<2D><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(0 <EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BIOS-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>).
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 7 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0.
|
||||
Считывает один символ с клавиатуры. Младший байт содержит ASCII-код клавиши
|
||||
(0 для расширенных символов), старший - расширенный код
|
||||
(подобно BIOS-функциям ввода).
|
||||
Начиная с версии 7 библиотеки, после закрытия окна консоли возвращается
|
||||
значение 0.
|
||||
|
||||
int __stdcall con_kbhit(void);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 0 <20><><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> con_getch <EFBFBD> con_getch2.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.
|
||||
Возвращает 1, если какая-то клавиша была нажата, 0 иначе. Для считывания
|
||||
нажатой клавиши предназначены функции con_getch и con_getch2.
|
||||
Начиная с версии 6 библиотеки, после закрытия окна консоли всегда возвращает 1.
|
||||
|
||||
char* __stdcall con_gets(char* str, int n);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> n-1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>). <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>
|
||||
str. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> NULL, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
6 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Считывает строку с клавиатуры. Ввод прерывается при поступлении символа
|
||||
новой строки, а также по прочтении n-1 символа (в зависимости от того, что
|
||||
произойдёт раньше). В первом случае символ новой строки также записывается в
|
||||
str. Считанная строка дополняется нулевым символом.
|
||||
Начиная с версии 6 библиотеки, функция возвращает указатель на введённую
|
||||
строку при успешном чтении и NULL, если окно консоли было закрыто. До версии
|
||||
6 возвращаемое значение было неопределено.
|
||||
|
||||
typedef int (__stdcall * con_gets2_callback)(int keycode, char** pstr, int* pn, int* ppos);
|
||||
char* __stdcall con_gets2(con_gets2_callback callback, char* str, int n);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> con_gets <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> callback-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> up/down <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> tab <EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>). <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; 1=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>; 2=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
3=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 6 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> NULL, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
6 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Функция появилась в версии 4 библиотеки.
|
||||
Полностью аналогична con_gets за исключением того, что когда пользователь
|
||||
нажимает нераспознанную клавишу, вызывается указанная callback-процедура
|
||||
(которая может, например, обрабатывать up/down для истории ввода и tab для
|
||||
автодополнения). Процедуре передаётся код клавиши и три указателя - на строку,
|
||||
на лимит и на текущую позицию в строке. Процедура может менять содержимое
|
||||
строки и может менять саму строку (например, перераспределить память для
|
||||
увеличения лимита), лимит, позицию в строке - для этого и передаются указатели.
|
||||
Возвращаемое значение: 0=строка не менялась; 1=строка изменилась, необходимо
|
||||
удалить старую и вывести новую; 2=строка изменилась, необходимо её вывести;
|
||||
3=немедленно выйти из функции.
|
||||
Начиная с версии 6 библиотеки, функция возвращает указатель на введённую
|
||||
строку при успешном чтении и NULL, если окно консоли было закрыто. До версии
|
||||
6 возвращаемое значение было неопределено.
|
||||
|
||||
void __stdcall con_cls();
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
Функция появилась в версии 5 библиотеки.
|
||||
Очищает экран и переводит курсор в левый верхний угол.
|
||||
|
||||
void __stdcall con_get_cursor_pos(int* px, int* py);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> *px <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x, <EFBFBD> *py - <EFBFBD><EFBFBD> <20><><EFBFBD> y.
|
||||
Функция появилась в версии 5 библиотеки.
|
||||
Записывает в *px текущую координату курсора по оси x, в *py - по оси y.
|
||||
|
||||
void __stdcall con_set_cursor_pos(int x, int y);
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>-<2D><> <20><>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> 0 <EFBFBD><EFBFBD> scr_width-1
|
||||
<EFBFBD><EFBFBD><EFBFBD> x, <EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD> scr_height-1 <EFBFBD><EFBFBD><EFBFBD> y, scr_width <EFBFBD> scr_height <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> con_init), <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
Функция появилась в версии 5 библиотеки.
|
||||
Устанавливает курсор в позицию с указанными координатами. Если какой-то из
|
||||
параметров выходит за пределы соответствующего диапазона (от 0 до scr_width-1
|
||||
для x, от 0 до scr_height-1 для y, scr_width и scr_height были заданы при
|
||||
вызове con_init), то соответствующая координата курсора не меняется.
|
||||
|
||||
int __stdcall con_get_input(char* buf, int buflen);
|
||||
Read as many input events as are available and fit in the receive buffer.
|
||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 106 KiB |
510
programs/if.inc
Normal file
@@ -0,0 +1,510 @@
|
||||
; flat assembler version 1.73
|
||||
; Copyright (c) 1999-2024, Tomasz Grysztar.
|
||||
; All rights reserved.
|
||||
|
||||
; Macroinstructions for HLL-style conditional operations
|
||||
|
||||
macro .if [arg]
|
||||
{
|
||||
common
|
||||
__IF equ
|
||||
local ..endif
|
||||
__ENDIF equ ..endif
|
||||
local ..else
|
||||
__ELSE equ ..else
|
||||
JNCOND __ELSE,arg
|
||||
}
|
||||
|
||||
macro .else
|
||||
{
|
||||
jmp __ENDIF
|
||||
__ELSE:
|
||||
restore __IF
|
||||
__IF equ ,
|
||||
}
|
||||
|
||||
macro .elseif [arg]
|
||||
{
|
||||
common
|
||||
jmp __ENDIF
|
||||
__ELSE:
|
||||
restore __ELSE
|
||||
local ..else
|
||||
__ELSE equ ..else
|
||||
JNCOND __ELSE,arg
|
||||
}
|
||||
|
||||
macro .endif
|
||||
{
|
||||
if __IF eq
|
||||
__ELSE:
|
||||
end if
|
||||
__ENDIF:
|
||||
restore __ELSE
|
||||
restore __ENDIF
|
||||
restore __IF
|
||||
}
|
||||
|
||||
macro .while [arg]
|
||||
{
|
||||
common
|
||||
local ..while
|
||||
__WHILE equ ..while
|
||||
local ..endw
|
||||
__ENDW equ ..endw
|
||||
__WHILE:
|
||||
JNCOND __ENDW,arg
|
||||
}
|
||||
|
||||
macro .endw
|
||||
{
|
||||
jmp __WHILE
|
||||
__ENDW:
|
||||
restore __ENDW
|
||||
restore __WHILE
|
||||
}
|
||||
|
||||
macro .repeat
|
||||
{
|
||||
local ..repeat
|
||||
__REPEAT equ ..repeat
|
||||
__REPEAT:
|
||||
}
|
||||
|
||||
macro .until [arg]
|
||||
{
|
||||
common
|
||||
JNCOND __REPEAT,arg
|
||||
restore __REPEAT
|
||||
}
|
||||
|
||||
jnne equ je
|
||||
jnna equ ja
|
||||
jnnb equ jb
|
||||
jnng equ jg
|
||||
jnnl equ jl
|
||||
jnnae equ jae
|
||||
jnnbe equ jbe
|
||||
jnnge equ jge
|
||||
jnnle equ jle
|
||||
|
||||
macro JNCOND label,v1,c,v2
|
||||
{
|
||||
match any,c
|
||||
\{
|
||||
cmp v1,v2
|
||||
jn\#c label
|
||||
\}
|
||||
match ,c
|
||||
\{
|
||||
PARSECOND parsed@cond,v1
|
||||
match cond,parsed@cond \\{ JNCONDEXPR label,cond \\}
|
||||
\}
|
||||
}
|
||||
|
||||
gt equ >
|
||||
lt equ <
|
||||
|
||||
macro PARSECOND parsed,cond
|
||||
{
|
||||
define parsed
|
||||
define neg@cond
|
||||
define status@cond
|
||||
define nest@cond
|
||||
irps symb,cond
|
||||
\{
|
||||
define symb@cond symb
|
||||
match >,symb
|
||||
\\{
|
||||
define symb@cond gt
|
||||
\\}
|
||||
match <,symb
|
||||
\\{
|
||||
define symb@cond lt
|
||||
\\}
|
||||
current@cond equ status@cond
|
||||
match ,current@cond
|
||||
\\{
|
||||
match ~,symb
|
||||
\\\{
|
||||
neg@cond equ neg@cond ~
|
||||
match ~~,neg@cond
|
||||
\\\\{
|
||||
define neg@cond
|
||||
\\\\}
|
||||
define symb@cond
|
||||
\\\}
|
||||
match (,symb
|
||||
\\\{
|
||||
parsed equ parsed neg@cond,<
|
||||
define nest@cond +
|
||||
define symb@cond
|
||||
define neg@cond
|
||||
\\\}
|
||||
match any,symb@cond
|
||||
\\\{
|
||||
parsed equ parsed neg@cond,symb@cond
|
||||
define status@cond +
|
||||
\\\}
|
||||
\\}
|
||||
match status,current@cond
|
||||
\\{
|
||||
match &,symb
|
||||
\\\{
|
||||
parsed equ parsed,&,
|
||||
define status@cond
|
||||
define symb@cond
|
||||
define neg@cond
|
||||
\\\}
|
||||
match |,symb
|
||||
\\\{
|
||||
parsed equ parsed,|,
|
||||
define status@cond
|
||||
define symb@cond
|
||||
define neg@cond
|
||||
\\\}
|
||||
match (,symb
|
||||
\\\{
|
||||
define nest@cond (
|
||||
\\\}
|
||||
match ),symb
|
||||
\\\{
|
||||
match +,nest@cond
|
||||
\\\\{
|
||||
parsed equ parsed>
|
||||
define symb@cond
|
||||
\\\\}
|
||||
restore nest@cond
|
||||
\\\}
|
||||
match any,symb@cond
|
||||
\\\{
|
||||
parsed equ parsed symb@cond
|
||||
\\\}
|
||||
\\}
|
||||
\}
|
||||
}
|
||||
|
||||
macro define_JNCONDEXPR
|
||||
{
|
||||
macro JNCONDEXPR elabel,[mod,cond,op]
|
||||
\{
|
||||
\common
|
||||
\local ..t,..f
|
||||
define t@cond ..t
|
||||
define f@cond ..f
|
||||
\forward
|
||||
match ,op
|
||||
\\{
|
||||
match ,mod \\\{ JNCONDEL elabel,<cond> \\\}
|
||||
match ~,mod \\\{ JCONDEL elabel,<cond> \\\}
|
||||
\\}
|
||||
match &:flabel:tlabel, op:f@cond:t@cond
|
||||
\\{
|
||||
match ,mod \\\{ JNCONDEL flabel,<cond> \\\}
|
||||
match ~,mod \\\{ JCONDEL flabel,<cond> \\\}
|
||||
tlabel:
|
||||
\\local ..tnew
|
||||
restore t@cond
|
||||
define t@cond ..tnew
|
||||
\\}
|
||||
match |:flabel:tlabel, op:f@cond:t@cond
|
||||
\\{
|
||||
match ,mod \\\{ JCONDEL tlabel,<cond> \\\}
|
||||
match ~,mod \\\{ JNCONDEL tlabel,<cond> \\\}
|
||||
flabel:
|
||||
\\local ..fnew
|
||||
restore f@cond
|
||||
define f@cond ..fnew
|
||||
\\}
|
||||
\common
|
||||
label f@cond at elabel
|
||||
t@cond:
|
||||
restore t@cond
|
||||
restore f@cond
|
||||
\}
|
||||
}
|
||||
|
||||
macro define_JCONDEXPR
|
||||
{
|
||||
macro JCONDEXPR elabel,[mod,cond,op]
|
||||
\{
|
||||
\common
|
||||
\local ..t,..f
|
||||
define t@cond ..t
|
||||
define f@cond ..f
|
||||
\forward
|
||||
match ,op
|
||||
\\{
|
||||
match ,mod \\\{ JCONDEL elabel,<cond> \\\}
|
||||
match ~,mod \\\{ JNCONDEL elabel,<cond> \\\}
|
||||
\\}
|
||||
match |:flabel:tlabel, op:f@cond:t@cond
|
||||
\\{
|
||||
match ,mod \\\{ JCONDEL flabel,<cond> \\\}
|
||||
match ~,mod \\\{ JNCONDEL flabel,<cond> \\\}
|
||||
tlabel:
|
||||
\\local ..tnew
|
||||
restore t@cond
|
||||
define t@cond ..tnew
|
||||
\\}
|
||||
match &:flabel:tlabel, op:f@cond:t@cond
|
||||
\\{
|
||||
match ,mod \\\{ JNCONDEL tlabel,<cond> \\\}
|
||||
match ~,mod \\\{ JCONDEL tlabel,<cond> \\\}
|
||||
flabel:
|
||||
\\local ..fnew
|
||||
restore f@cond
|
||||
define f@cond ..fnew
|
||||
\\}
|
||||
\common
|
||||
label f@cond at elabel
|
||||
t@cond:
|
||||
restore t@cond
|
||||
restore f@cond
|
||||
\}
|
||||
}
|
||||
|
||||
macro define_JNCONDEL
|
||||
{
|
||||
macro JNCONDEL label,cond
|
||||
\{
|
||||
\local COND
|
||||
match car=,cdr,:cond
|
||||
\\{
|
||||
define_JNCONDEXPR
|
||||
define_JCONDEXPR
|
||||
define_JCONDEL
|
||||
define_JNCONDEL
|
||||
JNCONDEXPR label,cond
|
||||
purge JNCONDEXPR,JCONDEXPR,JCONDEL,JNCONDEL
|
||||
define COND
|
||||
\\}
|
||||
match c,cond ; replace gt and lt
|
||||
\\{
|
||||
match =COND =signed v1>==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jl label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1<==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jg label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1>==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jb label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
ja label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jne label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
je label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jle label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1<v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jge label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jbe label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jae label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =ZERO?, COND c
|
||||
\\\{
|
||||
jnz label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =CARRY?, COND c
|
||||
\\\{
|
||||
jnc label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =OVERFLOW?, COND c
|
||||
\\\{
|
||||
jno label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =SIGN?, COND c
|
||||
\\\{
|
||||
jns label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =PARITY?, COND c
|
||||
\\\{
|
||||
jnp label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v, COND c
|
||||
\\\{
|
||||
if v eqtype 0
|
||||
if ~ v
|
||||
jmp label
|
||||
end if
|
||||
else if v eqtype eax
|
||||
test v,v
|
||||
jz label
|
||||
else
|
||||
cmp v,0
|
||||
je label
|
||||
end if
|
||||
\\\}
|
||||
\\}
|
||||
\}
|
||||
}
|
||||
|
||||
macro define_JCONDEL
|
||||
{
|
||||
macro JCONDEL label,cond
|
||||
\{
|
||||
\local COND
|
||||
match car=,cdr,:cond
|
||||
\\{
|
||||
define_JNCONDEXPR
|
||||
define_JCONDEXPR
|
||||
define_JCONDEL
|
||||
define_JNCONDEL
|
||||
JCONDEXPR label,cond
|
||||
purge JNCONDEXPR,JCONDEXPR,JCONDEL,JNCONDEL
|
||||
define COND
|
||||
\\}
|
||||
match c,cond ; replace gt and lt
|
||||
\\{
|
||||
match =COND =signed v1>==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jge label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1<==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jle label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1>==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jae label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jbe label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1==v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
je label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jne label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jg label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =signed v1<v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jl label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1>v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
ja label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v1<v2, COND c
|
||||
\\\{
|
||||
cmp v1,v2
|
||||
jb label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =ZERO?, COND c
|
||||
\\\{
|
||||
jz label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =CARRY?, COND c
|
||||
\\\{
|
||||
jc label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =OVERFLOW?, COND c
|
||||
\\\{
|
||||
jo label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =SIGN?, COND c
|
||||
\\\{
|
||||
js label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND =PARITY?, COND c
|
||||
\\\{
|
||||
jp label
|
||||
define COND
|
||||
\\\}
|
||||
match =COND v, COND c
|
||||
\\\{
|
||||
if v eqtype 0
|
||||
if v
|
||||
jmp label
|
||||
end if
|
||||
else if v eqtype eax
|
||||
test v,v
|
||||
jnz label
|
||||
else
|
||||
cmp v,0
|
||||
jne label
|
||||
end if
|
||||
\\\}
|
||||
\\}
|
||||
\}
|
||||
}
|
||||
|
||||
define_JNCONDEXPR
|
||||
define_JCONDEXPR
|
||||
define_JNCONDEL
|
||||
define_JCONDEL
|
@@ -1,2 +0,0 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("charset_checker.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "charchck")
|
17
programs/system/dbgboard/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
## DBGBOARD - a console-based debug board
|
||||
Main advantages over the old board:
|
||||
* Bigger font
|
||||
* Scrolling (like in other console apps)
|
||||
* Messages highligting
|
||||
* K : - kernel messages (K: also supported because some code in kernel prints such)
|
||||
* L: - launcher messages
|
||||
* I: - information
|
||||
* W: - warning
|
||||
* E: - error
|
||||
* S: - success
|
||||
* Three display modes (You can switch modes using `Tab` key)
|
||||
* User messages
|
||||
* Kernel messages
|
||||
* Both kernel and user messages
|
||||
|
||||
Also, like the old board it writes log to /tmp0/1/boardlog.txt (or you can pass another path in args like `/sys/develop/dbgboard /tmp0/1/hgfdhgfh.txt`), you can view log file in cedit by hitting `F2` key
|
2
programs/system/dbgboard/Tupfile.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("dbgboard.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "dbgboard")
|
463
programs/system/dbgboard/dbgboard.asm
Normal file
@@ -0,0 +1,463 @@
|
||||
; SPDX-License-Identifier: GPL-2.0
|
||||
; DBGBOARD - a console-based debug board
|
||||
; Copyright (C) 2025 KolibriOS team
|
||||
|
||||
|
||||
format binary as ""
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ; signature
|
||||
dd 1 ; header version
|
||||
dd start ; entry point
|
||||
dd _image_end ; end of image
|
||||
dd _memory ; required memory size
|
||||
dd _stacktop ; address of stack top
|
||||
dd _cmdline ; buffer for command line arguments
|
||||
dd 0 ; buffer for path
|
||||
|
||||
; __DEBUG__ = 1
|
||||
; __DEBUG_LEVEL__ = DBG_ALL
|
||||
; DBG_ALL = 0 ; all messages
|
||||
; DBG_INFO = 1 ; info and errors
|
||||
; DBG_ERR = 2 ; only errors
|
||||
|
||||
include '../../macros.inc'
|
||||
purge mov,add,sub
|
||||
include '../../KOSfuncs.inc'
|
||||
; include '../../debug-fdo.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../struct.inc'
|
||||
include '../../dll.inc'
|
||||
include '../../if.inc'
|
||||
include '../../string.inc'
|
||||
|
||||
CON_WINDOW_CLOSED = 0x200
|
||||
|
||||
TEXT_COLOR_LIGHTGRAY = 7
|
||||
TEXT_COLOR_LIGHTBLUE = 9
|
||||
TEXT_COLOR_LIGHTGREEN = 10
|
||||
TEXT_COLOR_LIGHTCYAN = 11
|
||||
TEXT_COLOR_LIGHTRED = 12
|
||||
TEXT_COLOR_LIGHTMAGENTA = 13
|
||||
TEXT_COLOR_YELLOW = 14
|
||||
TEXT_COLOR_WHITE = 15
|
||||
|
||||
RB_CAPACITY = 4096*6
|
||||
|
||||
MODES_COUNT = 3
|
||||
MODE_USER = 0
|
||||
MODE_KERNEL = 1
|
||||
MODE_BOTH = 2
|
||||
|
||||
struct RING_BUFFER
|
||||
buffer dd ?
|
||||
capacity dd ?
|
||||
pos dd ?
|
||||
bytes_filled dd ?
|
||||
ends
|
||||
|
||||
proc set_text_color stdcall uses eax ecx edx, _color
|
||||
and [_color], 0x0F
|
||||
invoke con_get_flags
|
||||
and eax, 0x3F0
|
||||
or eax, [_color]
|
||||
invoke con_set_flags, eax
|
||||
ret
|
||||
endp
|
||||
|
||||
; returns eax = 0 or fs error code
|
||||
proc get_file_attrib stdcall uses ebx, _path, _buf
|
||||
push [_path]
|
||||
dec esp
|
||||
mov byte[esp], 0
|
||||
push [_buf] ; 40 bytes buf
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push SSF_GET_INFO
|
||||
mov ebx, esp
|
||||
mcall SF_FILE
|
||||
add esp, 25
|
||||
ret
|
||||
endp
|
||||
|
||||
; returns eax = 0 or fs error code
|
||||
proc create_file stdcall uses ebx, _path
|
||||
push [_path]
|
||||
dec esp
|
||||
mov byte[esp], 0
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push 0
|
||||
push SSF_CREATE_FILE
|
||||
mov ebx, esp
|
||||
mcall SF_FILE
|
||||
add esp, 25
|
||||
ret
|
||||
endp
|
||||
|
||||
; returns eax = 0 or fs error code
|
||||
proc write_file stdcall uses ebx, _path, _buf, _count, _pos_lo, _pos_hi, _out_bytes_written
|
||||
push [_path]
|
||||
dec esp
|
||||
mov byte[esp], 0
|
||||
push [_buf]
|
||||
push [_count]
|
||||
push [_pos_hi]
|
||||
push [_pos_lo]
|
||||
push SSF_WRITE_FILE
|
||||
mov ebx, esp
|
||||
mcall SF_FILE
|
||||
add esp, 25
|
||||
mov ecx, [_out_bytes_written]
|
||||
mov [ecx], ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
proc ring_buffer_push_byte stdcall uses eax edx esi edi, _rb, _byte
|
||||
mov esi, [_rb]
|
||||
mov eax, [esi + RING_BUFFER.bytes_filled]
|
||||
.if eax < [esi + RING_BUFFER.capacity]
|
||||
inc [esi + RING_BUFFER.bytes_filled]
|
||||
.endif
|
||||
|
||||
mov edi, [esi + RING_BUFFER.buffer]
|
||||
add edi, [esi + RING_BUFFER.pos]
|
||||
mov eax, [_byte]
|
||||
mov byte [edi], al
|
||||
|
||||
mov eax, [esi + RING_BUFFER.pos]
|
||||
inc eax
|
||||
xor edx, edx
|
||||
div [esi + RING_BUFFER.capacity]
|
||||
mov [esi + RING_BUFFER.pos], edx ; put remainder
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
proc print_ring_buffer stdcall uses eax ebx ecx edx esi, _rb
|
||||
mov esi, [_rb]
|
||||
mov eax, [esi + RING_BUFFER.capacity]
|
||||
xor ebx, ebx
|
||||
.if eax = [esi + RING_BUFFER.bytes_filled]
|
||||
mov ebx, [esi + RING_BUFFER.pos]
|
||||
.endif
|
||||
xor ecx, ecx
|
||||
.while ecx < [esi + RING_BUFFER.bytes_filled]
|
||||
mov eax, ebx
|
||||
add eax, ecx
|
||||
xor edx, edx
|
||||
div [esi + RING_BUFFER.capacity]
|
||||
mov eax, [esi + RING_BUFFER.buffer]
|
||||
add eax, edx
|
||||
mov eax, [eax]
|
||||
mov byte [chr], al
|
||||
stdcall print_next_char, chr
|
||||
inc ecx
|
||||
.endw
|
||||
ret
|
||||
endp
|
||||
|
||||
; in - __chr
|
||||
proc push_to_buffers_next_char uses ebx
|
||||
.if [__is_start_line] = 1
|
||||
mov eax, __prefix
|
||||
add eax, [__prefix_index]
|
||||
mov bl, byte [__chr]
|
||||
mov [eax], bl
|
||||
.if [__prefix_index] = 2
|
||||
.if dword [__prefix] = 'K :'
|
||||
mov [current_rb], rb_kernel
|
||||
.elseif dword [__prefix] = 'K: '
|
||||
mov [current_rb], rb_kernel
|
||||
.else
|
||||
mov [current_rb], rb_user
|
||||
.endif
|
||||
mov [__is_start_line], 0
|
||||
mov [__prefix_index], 0
|
||||
movzx eax, byte [__prefix]
|
||||
stdcall ring_buffer_push_byte, [current_rb], eax
|
||||
movzx eax, byte [__prefix + 1]
|
||||
stdcall ring_buffer_push_byte, [current_rb], eax
|
||||
movzx eax, byte [__prefix + 2]
|
||||
stdcall ring_buffer_push_byte, [current_rb], eax
|
||||
mov dword [__prefix], 0
|
||||
.else
|
||||
inc [__prefix_index]
|
||||
.endif
|
||||
.else
|
||||
movzx eax, byte [__chr]
|
||||
stdcall ring_buffer_push_byte, [current_rb], eax
|
||||
.if byte [__chr] = 10
|
||||
mov [__is_start_line], 1
|
||||
mov [current_rb], rb_user
|
||||
.endif
|
||||
.endif
|
||||
ret
|
||||
endp
|
||||
|
||||
; in - chr
|
||||
proc print_next_char uses ebx
|
||||
.if [is_start_line] = 1
|
||||
mov eax, prefix
|
||||
add eax, [prefix_index]
|
||||
mov bl, byte [chr]
|
||||
mov [eax], bl
|
||||
.if [prefix_index] = 2
|
||||
.if dword [prefix] = 'K :'
|
||||
stdcall set_text_color, TEXT_COLOR_YELLOW
|
||||
mov [is_kernel_printing], 1
|
||||
.elseif dword [prefix] = 'K: '
|
||||
stdcall set_text_color, TEXT_COLOR_YELLOW
|
||||
mov [is_kernel_printing], 1
|
||||
.elseif dword [prefix] = 'L: '
|
||||
stdcall set_text_color, TEXT_COLOR_WHITE
|
||||
mov [is_kernel_printing], 0
|
||||
.elseif dword [prefix] = 'I: '
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTCYAN
|
||||
mov [is_kernel_printing], 0
|
||||
.elseif dword [prefix] = 'W: '
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTMAGENTA
|
||||
mov [is_kernel_printing], 0
|
||||
.elseif dword [prefix] = 'E: '
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTRED
|
||||
mov [is_kernel_printing], 0
|
||||
.elseif dword [prefix] = 'S: '
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTGREEN
|
||||
mov [is_kernel_printing], 0
|
||||
.else
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
|
||||
mov [is_kernel_printing], 0
|
||||
.endif
|
||||
.if [is_kernel_printing]
|
||||
.if [current_mode] = MODE_KERNEL | [current_mode] = MODE_BOTH
|
||||
invoke con_write_asciiz, prefix
|
||||
.endif
|
||||
.else
|
||||
.if [current_mode] = MODE_USER | [current_mode] = MODE_BOTH
|
||||
invoke con_write_asciiz, prefix
|
||||
.endif
|
||||
.endif
|
||||
|
||||
mov [is_start_line], 0
|
||||
mov [prefix_index], 0
|
||||
mov dword [prefix], 0
|
||||
.else
|
||||
inc [prefix_index]
|
||||
.endif
|
||||
.else
|
||||
.if [is_kernel_printing]
|
||||
.if [current_mode] = MODE_KERNEL | [current_mode] = MODE_BOTH
|
||||
invoke con_write_asciiz, chr
|
||||
.endif
|
||||
.else
|
||||
.if [current_mode] = MODE_USER | [current_mode] = MODE_BOTH
|
||||
invoke con_write_asciiz, chr
|
||||
.endif
|
||||
.endif
|
||||
.if byte [chr] = 10
|
||||
mov [is_start_line], 1
|
||||
stdcall set_text_color, TEXT_COLOR_LIGHTGRAY
|
||||
.endif
|
||||
.endif
|
||||
ret
|
||||
endp
|
||||
|
||||
start:
|
||||
;; if there is a second instance of dbgboard is running then exit
|
||||
mcall SF_THREAD_INFO, thread_info, -1
|
||||
stdcall string.copy, thread_info + process_information.process_name, thread_name
|
||||
stdcall string.to_lower_case, thread_name
|
||||
xor edx, edx ; dbgboard instance count
|
||||
xor esi, esi
|
||||
.while esi < 256 ; NOTE: add to macros.inc MAX_THREAD_COUNT = 256
|
||||
mcall SF_THREAD_INFO, thread_info, esi
|
||||
.if [thread_info + process_information.slot_state] <> TSTATE_FREE
|
||||
stdcall string.to_lower_case, thread_info + process_information.process_name
|
||||
stdcall string.cmp, thread_info + process_information.process_name, thread_name, -1
|
||||
.if eax = 0
|
||||
inc edx
|
||||
.if edx >= 2
|
||||
jmp .raw_exit
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
inc esi
|
||||
.endw
|
||||
|
||||
stdcall dll.Load, @IMPORT
|
||||
test eax, eax
|
||||
jnz .exit
|
||||
|
||||
invoke con_start, 1
|
||||
mov eax, [current_mode]
|
||||
shl eax, 2 ; *4
|
||||
add eax, title_base
|
||||
invoke con_init, 80, 32, -1, -1, [eax]
|
||||
|
||||
.if byte [_cmdline] <> 0
|
||||
mov [log_file_path], _cmdline
|
||||
.endif
|
||||
|
||||
.main_loop:
|
||||
invoke con_kbhit
|
||||
.if eax = 1
|
||||
invoke con_getch2
|
||||
.if ah = 60 ; F2
|
||||
mov eax, [log_file_path]
|
||||
mov [struct_open_in_notepad.filename], eax
|
||||
mcall SF_FILE, struct_open_in_notepad
|
||||
.endif
|
||||
.if ah = 0x0F ; Tab
|
||||
mov eax, [current_mode]
|
||||
inc eax
|
||||
.if eax >= MODES_COUNT
|
||||
xor eax, eax
|
||||
.endif
|
||||
mov [current_mode], eax
|
||||
shl eax, BSF sizeof.RING_BUFFER ; assert on sizeof, must be power of two
|
||||
add eax, rb_base
|
||||
mov [current_rb], eax
|
||||
mov eax, [current_mode]
|
||||
shl eax, 2 ; *4
|
||||
add eax, title_base
|
||||
invoke con_set_title, [eax]
|
||||
invoke con_cls
|
||||
|
||||
; clear the printer context before printing the ring buffer
|
||||
mov dword [chr], 0
|
||||
mov dword [prefix], 0
|
||||
mov [prefix_index], 0
|
||||
mov [is_start_line], 1
|
||||
mov [is_kernel_printing], 0 ;;
|
||||
stdcall print_ring_buffer, [current_rb]
|
||||
.endif
|
||||
.endif
|
||||
|
||||
mcall SF_BOARD, SSF_DEBUG_READ
|
||||
.if ebx = 0
|
||||
mcall SF_SLEEP, 50
|
||||
jz .main_loop_cond
|
||||
.endif
|
||||
mov [chr], al
|
||||
mov [__chr], al
|
||||
|
||||
stdcall ring_buffer_push_byte, rb_both, eax ; we always push to "both" buffer
|
||||
stdcall push_to_buffers_next_char ; push byte to user or kernel messages ring buffer depending on current state
|
||||
|
||||
stdcall print_next_char
|
||||
|
||||
; append char to logfile, if no logfile then create it
|
||||
stdcall get_file_attrib, [log_file_path], file_info_buf
|
||||
.if eax = 5 ; file not found
|
||||
stdcall create_file, [log_file_path]
|
||||
.endif
|
||||
stdcall write_file, [log_file_path], chr, 1, dword [file_info_buf + 32], dword [file_info_buf + 32 + 4], bytes_written
|
||||
|
||||
.main_loop_cond:
|
||||
invoke con_get_flags
|
||||
and eax, CON_WINDOW_CLOSED
|
||||
test eax, eax
|
||||
jz .main_loop
|
||||
|
||||
.exit:
|
||||
invoke con_exit, 0
|
||||
.raw_exit:
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
|
||||
; data:
|
||||
title_base:
|
||||
dd title_mode_user
|
||||
dd title_mode_kernel
|
||||
dd title_mode_both
|
||||
title_mode_user db 'Debug board - [Tab] switches mode: USER_kernel_both [F2] opens log file',0
|
||||
title_mode_kernel db 'Debug board - [Tab] switches mode: user_KERNEL_both [F2] opens log file',0
|
||||
title_mode_both db 'Debug board - [Tab] switches mode: user_kernel_BOTH [F2] opens log file',0
|
||||
|
||||
log_file_path dd default_log_file_path
|
||||
default_log_file_path db '/tmp0/1/BOARDLOG.TXT',0
|
||||
|
||||
; to use only in print_next_char
|
||||
chr db 0, 0, 0, 0
|
||||
prefix db 0,0,0,0
|
||||
prefix_index dd 0
|
||||
is_start_line dd 1
|
||||
is_kernel_printing dd 0 ; 1 if kernel is now printing (after K:), else 0
|
||||
|
||||
; to use only in push_to_buffers_next_char
|
||||
__chr db 0, 0, 0, 0
|
||||
__prefix db 0,0,0,0
|
||||
__prefix_index dd 0
|
||||
__is_start_line dd 1
|
||||
|
||||
current_mode dd MODE_BOTH
|
||||
current_rb dd 0
|
||||
|
||||
bytes_written dd 0
|
||||
|
||||
struct_open_in_notepad:
|
||||
dd SSF_START_APP
|
||||
dd 0
|
||||
.filename dd ?
|
||||
dd 0
|
||||
dd 0
|
||||
db '/sys/develop/cedit', 0
|
||||
|
||||
rb_base:
|
||||
rb_user:
|
||||
dd rb_user_buf
|
||||
dd RB_CAPACITY
|
||||
dd 0
|
||||
dd 0
|
||||
rb_kernel:
|
||||
dd rb_kernel_buf
|
||||
dd RB_CAPACITY
|
||||
dd 0
|
||||
dd 0
|
||||
rb_both:
|
||||
dd rb_both_buf
|
||||
dd RB_CAPACITY
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
|
||||
; include_debug_strings
|
||||
|
||||
align 4
|
||||
@IMPORT:
|
||||
library console, 'console.obj'
|
||||
import console, \
|
||||
con_start, 'START', \
|
||||
con_init, 'con_init', \
|
||||
con_write_asciiz, 'con_write_asciiz', \
|
||||
con_exit, 'con_exit', \
|
||||
con_kbhit, 'con_kbhit', \
|
||||
con_getch2, 'con_getch2', \
|
||||
con_set_flags, 'con_set_flags', \
|
||||
con_get_flags, 'con_get_flags', \
|
||||
con_set_title, 'con_set_title',\
|
||||
con_cls, 'con_cls'
|
||||
|
||||
align 16
|
||||
_image_end:
|
||||
|
||||
file_info_buf rb 40
|
||||
|
||||
align 4
|
||||
_cmdline rb 256
|
||||
|
||||
thread_info process_information
|
||||
thread_name rb 16
|
||||
|
||||
rb_user_buf rb RB_CAPACITY
|
||||
rb_kernel_buf rb RB_CAPACITY
|
||||
rb_both_buf rb RB_CAPACITY
|
||||
|
||||
; reserve for stack:
|
||||
rb 4096
|
||||
align 16
|
||||
_stacktop:
|
||||
_memory:
|
@@ -118,8 +118,8 @@ ico=8
|
||||
x=-67
|
||||
y=68
|
||||
[10]
|
||||
name=BOARD
|
||||
path=/SYS/DEVELOP/BOARD
|
||||
name=DBGBOARD
|
||||
path=/SYS/DEVELOP/DBGBOARD
|
||||
param=
|
||||
ico=19
|
||||
x=-135
|
||||
|