Compare commits

...

71 Commits

Author SHA1 Message Date
32466e31f4 programs/shell: Show new fields of the sf18.13 struct
Kfetch command now reports
 - kernel ABI,
 - git hash (aka commit id),
 - release offset,
 - debug tag.

No svn revision anymore.
2025-03-17 23:22:45 +01:00
63cd6f0ac8 Movback: Added support window resizing 2025-03-17 22:31:37 +01:00
4fcc17675c Movback: Deleted trunk dir. Files moved 2025-03-17 22:31:37 +01:00
4e903ce12b kiv: show image bpp in win header 2025-03-17 22:24:04 +01:00
bfdb42c91f Tube: fix crash at some window sizes, remove outdated code with palette 2025-03-17 22:07:11 +02:00
55d641b0da kernel: Clean up svn-related code and data
* Rearrange sf18.13 version structure to
  + mention git hash and release offset,
  + separate OS release and kernel ABI numbers,
  + include an optional debug tag.
* Update the boot log and the blue screen to print the new fields.
* Update docs.
* No breaking changes.

Resolves #99.
2025-03-17 20:07:46 +01:00
0e7cff0715 ci: setup environment variables
ref: #146
Toolchain container was updated and fasm now in /home/autobuild/...
folder
2025-03-17 19:10:23 +01:00
4d30fd7a2b Eolite 5.29: Fixed bug in "Apply to all files?" dialog
- line height can no longer be smaller than icon size;
- fixed bug with edit box activation under "Apply to all files?" dialog;
- updated dates;
- fixed kfont initialization.
2025-03-17 18:22:15 +03:00
292bd1d739 webview 3.85: fix a specific case when col width was calculated wrong 2025-03-17 11:50:17 +01:00
1a756358f5 webview 3.84
- tagicon support
- draw_buf => BufIsInvalid() add check
2025-03-17 11:50:17 +01:00
009c0d0519 webview-3.83
- fixed collection.h that caused webview crash
- fix rolled-up bug
- add special symbol from builds.kolibrios.org/status.html
2025-03-17 11:50:17 +01:00
bab6267412 Boxlib: fix write null pointer in editbox 2025-03-17 10:55:32 +01:00
72196f42de Palitra(branch): UI and code refactoring. Fix a lot of issues (#154)
- Fixed the ID of the buttons, made the window always on top;
- Removed the visible rectangle when clicking on the palette;
- Fixed the position of the picker and palette buttons.

Reviewed-on: KolibriOS/kolibrios#154
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-17 10:54:19 +01:00
f1e958af41 Firework: fix and optimize window resizing 2025-03-17 01:09:45 +03:00
rgimad
78de535233 Apps/dbgboard: fix critical bug with stack overflow 2025-03-16 19:50:12 +01:00
e353771faa Pipet: Rewrite from C-- to FASM
- Rewritten from C-- to FASM
- Function to select not a single pixel, but a 7*7 rect from screen;
- Function to select each pixel from selected rect;
- Updated UX/UI.

Co-authored-by: leency <lipatov.kiril@gmail.com>
2025-03-16 13:17:33 +02:00
714cc0a65c cmm menu: fix marker 2025-03-15 23:28:13 +01:00
9357a21169 Plasma: Fix code style and added support for window resizing 2025-03-15 23:02:16 +01:00
75e732a437 Apps/plasma: Deleted trunk dir. Files moved 2025-03-15 23:02:16 +01:00
afd07534ab Apps/fire: Improved code style and readability 2025-03-15 22:31:23 +01:00
20aba254bc Apps/firework: Added support for window resizing 2025-03-15 22:35:09 +02:00
fbd99c82a4 Apps/firework: Improved code style and readability 2025-03-15 19:48:49 +02:00
784b02b4a4 3dcube: get rid of unnecessary files, refined build.bat and tupfile 2025-03-15 14:54:46 +01:00
rgimad
7a2e48bed2 Flip the bird in kfetch command (#144)
Co-authored-by:  Burer <taldariner@gmail.com>
Reviewed-on: KolibriOS/kolibrios#144
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: rgimad <33692565+rgimad@users.noreply.github.com>
Co-committed-by: rgimad <33692565+rgimad@users.noreply.github.com>
2025-03-14 23:44:53 +01:00
31ca1c76bb Apps/unvwater: Added support for window resizing 2025-03-15 00:56:49 +03:00
99ddd88ff8 Apps/unvwater: Improved code style and readability 2025-03-14 22:41:51 +01:00
4f1a8ef9a1 kf_font_viewer gets to be a part of syspanel
Syspanel gets bigger in less than 1 sector and we still have kf viewer in the IMG
2025-03-14 21:31:22 +01:00
93f12c7673 allow applications to work nicely without .kf files 2025-03-14 21:10:49 +01:00
Burer
3eb02af5fd [Other/Data] Optimized all .png images in repo using optipng -o7 2025-03-14 20:46:32 +01:00
rgimad
83d8146ad1 Apps/dbgboard: fix comments 2025-03-13 21:31:10 +03:00
rgimad
1974f45c50 Apps/dbgboard: add display modes and more highlighting 2025-03-13 17:24:09 +03:00
36ce6f0b74 Eolite 5.28
- deny renaming folder '..'
- 'show status bar' option removed
- add option 'bold font'
- Quark view changed to HEX View
2025-03-12 12:27:18 +01:00
4701a15222 Apps/tube: Added support for window resizing 2025-03-12 12:08:40 +03:00
61277f8822 Apps/tube: Improved code style and readability
- Magic numbers are replaced with constants;
- Added copyrights and source to the original;
- Removed unnecessary *.bat files.

Co-authored-by: Max Logaev <maxlogaev@proton.me>
2025-03-12 11:03:37 +03:00
abb7442055 Apps/tube: Deleted trunk dir. Files moved
The trunk directory is no longer required. This is a rudiment of SVN
2025-03-12 02:50:40 +03:00
81b15607dc Apps/barcfg: Added bars_8b.raw
Co-authored-by: Max Logaev <maxlogaev@proton.me
2025-03-10 23:11:33 +01:00
30d8d45326 Data: Move kf_font_viewer to ISO
- Added testcon2_eng to IMG;
- use_mb was removed from IMG because it was not used.

Co-authored-by: Max Logaev <maxlogaev@proton.me
2025-03-10 23:11:33 +01:00
9a23c001e1 Data: Added hotkeys for change sound volume and mute/unmute sound
- Added Ctrl + Alt + Left / Right - change sound volume;
- Added Ctrl + Alt + Up / Down - mute and unmute sound;
- Corrected description.

Co-authored-by: Max Logaev <maxlogaev@proton.me
2025-03-10 23:11:33 +01:00
64b7372624 Apps/eolite: Version 5.27
- Choose first file on ctrl selection.
- Set static position for maximized window:
  https://github.com/KolibriOS/kolibrios/issues/9
2025-03-10 22:28:44 +01:00
d04420295a CI: Add hash for toolchain 2025-03-10 21:31:00 +01:00
2935b29fd8 CI: Cache 2025-03-10 21:31:00 +01:00
505f741fbd CI/CD: Used kolibri-toolchain and fuse. Added es_ES build
- Used  tup with fuse to speed up build;
- Used kolibri-toolchain to speed up the build, that is,
  do not waste time installing dependencies;
- Added build of the Spanish version (es_ES).

Signed-off-by: Max Logaev <maxlogaev@proton.me>
2025-03-10 21:31:00 +01:00
5a852ebdfb Apps/webview: Version 3.82. Fixed text rendering, speedup (#130)
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2025-03-10 20:28:52 +01:00
026d2aba40 Libs/console_coff: Translate comments to English and convert to UTF-8 (#128)
Translated remaining non-English comments to English and convert to UTF-8

Co-authored-by: rgimad <33692565+rgimad@users.noreply.github.com>
Reviewed-on: KolibriOS/kolibrios#128
Reviewed-by: Max Logaev <mxlgv@noreply.localhost>
Co-authored-by: rgimad <rgimad@noreply.localhost>
Co-committed-by: rgimad <rgimad@noreply.localhost>
2025-03-10 20:04:26 +01:00
Taldariner
9b08b20cc3 Charsets Checker 0.3.2
- Renamed to Charsets Viewer/Charsets
- Fixed rolled-up bug
- Tweaked UI a little bit
- Renamed files in autobuild
- Moved charsets to programs/develop
- Added credits in charsets.asm
- Moved charsets dev history to separate file
2025-03-07 23:25:15 +03:00
38fdd13e0c Added charset_checker app to IMG instead of asciivju and keyascii 2025-03-07 23:25:14 +03:00
d9679f5f81 Add new debug board - dbgboard based on console.obj (#119)
Main advantages:
- Bigger font
- Scrolling (like in other console apps)
- K : and L: messages highligting

Also, like the old board it writes log to /tmp0/1/boardlog.txt (or you can pass another path in args), can view it on F2

Co-authored-by: rgimad <33692565+rgimad@users.noreply.github.com>
Reviewed-on: KolibriOS/kolibrios#119
Reviewed-by: Max Logaev <maxlogaev@proton.me>
Co-authored-by: rgimad <rgimad@noreply.localhost>
Co-committed-by: rgimad <rgimad@noreply.localhost>
2025-03-07 23:24:48 +03:00
92ea2a97eb Data: Dino has been moved to the TCC category.
Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
2025-03-07 10:48:09 +01:00
98cccc438c Apps/aclock: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
79d9f42085 Apps/genfiles: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
b39150ecea Apps/lod: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
1a40899780 Apps/FillScr: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
25b79ca6d1 Apps/Timer: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
2e3548d92a Apps/tinfo: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
ed8e4ecf33 Apps/mstate: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
6a9608c7a4 Apps/C4: Rewrite from nasm to fasm 2025-03-07 01:10:44 +01:00
d8c6274d19 Libs/iconv: Fixed convert BEL and UKR i/I to CP866
Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
2025-03-07 01:05:42 +01:00
1df7b2fd4c Apps/webview: Version 3.8. Fixed <p>, new h3 style
- `cmm/lib/collection.h`: fixed memory leak, more safe, optimizations;
- webview: mostly fix <p>, new h3 style, some other updates.

Reviewed-on: KolibriOS/kolibrios#115
2025-03-07 03:00:49 +03:00
9001dbc1b4 CI/CD: Added CI, without MSVC (en_US and ru_RU)
- Added `install_kgcc` script;
- Added `checker.pl` script to check the kernel codestyle;
- Added build of en_US and ru_RU versions of images.
Known problem: projects that require the proprietary MSVC compiler are
not built.

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
2025-03-04 20:09:10 +01:00
c11c7922bd Libs/mbedtls: Use strip instead of kos32-strip
`kos32-strip`` contains a bug:
When trying to strip a large object file builded by `clink`,
a segfault occurs. This bug is not reproduced on the newer `strip`.

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
2025-03-04 20:09:10 +01:00
739facfeca CI/CD: Init building workflow 2025-03-04 20:09:10 +01:00
8c9a971e2c Libs/cmm: Fixed return type for GetProcessInfo() 2025-03-02 12:10:08 +01:00
5aa17d5823 Apps/webview: Fixed parse tag param and use Bing search
- Fixed parse case of tag param like "attr = value";
- Use the default Bing search as it only supports HTTP.
2025-03-02 12:10:08 +01:00
4d6ef342e1 Apps/webview: Fixed issue #100 2025-03-02 12:10:08 +01:00
8e5b315fd4 Apps: Fix webview and downloader issue #22
- Fix #22 in both webview and downloader;
- Get rid of app mode in webview;
- Fix update link for webview.
2025-03-02 12:10:08 +01:00
1525cb7e37 Apps/cedit: Improved tab visuals
- Improved tab visuals;
- Fixed scroll.ob07 file name;
- Updated binary (27-feb-2025).

Co-authored-by: Max Logaev <maxlogaev@proton.me>
2025-02-28 14:27:08 +01:00
bad1a3c3ca Data: Replace Testris icon from NintendoDS by a taldariner's 2025-02-27 01:31:53 +01:00
b1d8436000 Data: By default use CodeEdit instead of Tinypad 2025-02-27 01:31:53 +01:00
3da226faf6 Data: Fixed issue #24 2025-02-27 01:31:53 +01:00
70297cd8f4 Libs/cmm: Use the actual number of processes instead of the max 2025-02-27 01:03:29 +01:00
bf9f7d2a19 Apps/downloader: Improved UI
Fixed an issue in the UI: The user does not realize that the file
has already been downloaded and may want to click "Download" again.
2025-02-27 02:22:53 +03:00
206 changed files with 5756 additions and 6107 deletions

220
.gitea/workflows/build.yaml Normal file
View File

@@ -0,0 +1,220 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: 2025 KolibriOS team
name: 'Build system'
on:
pull_request:
branches:
- 'main'
jobs:
codestyle:
name: "Check kernel codestyle"
runs-on: kolibri-toolchain
steps:
- name: Checkout
uses: actions/checkout@v4
- 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: kolibri-toolchain
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get describe
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT
- name: Get toolchain hash
id: toolchain-hash
run: |
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: 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
chmod +x c--
mv c-- /home/autobuild/tools/win32/bin/c--
cp ${{ gitea.workspace }}/programs/cmm/c--/c--.ini /home/autobuild/tools/win32/bin/c--.ini
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: 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: Build and install kerpack
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
cd ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/
make
chmod +x kerpack
mv kerpack /home/autobuild/tools/win32/bin/.
- name: Build and install kpack
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
cd ${{ gitea.workspace }}/programs/other/kpack/linux/
bash build.sh
chmod +x kpack
mv kpack /home/autobuild/tools/win32/bin/.
- name: Build and install clink
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
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 }}
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
# 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: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
source kos32-export-env-vars ${{ gitea.workspace }}
tup build-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: build-en_US/data/kolibri.img
- name: (en_US) Upload CD image
uses: actions/upload-artifact@v3
with:
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.iso
path: build-en_US/data/kolibri.iso
- name: (en_US) Upload raw image
uses: actions/upload-artifact@v3
with:
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.raw
path: build-en_US/data/kolibri.raw
# -------------------------- Build ru_RU ------------------------- #
- name: (ru_RU) Build KolibriOS
run: |
export PATH=/home/autobuild/tools/win32/bin:$PATH
source kos32-export-env-vars ${{ gitea.workspace }}
tup build-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: build-ru_RU/data/kolibri.img
- name: (ru_RU) Upload CD image
uses: actions/upload-artifact@v3
with:
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.iso
path: build-ru_RU/data/kolibri.iso
- name: (ru_RU) Upload raw image
uses: actions/upload-artifact@v3
with:
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.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
source kos32-export-env-vars ${{ gitea.workspace }}
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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,82 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: 2025 KolibriOS Team
# Written by mxlgv (Maxim Logaev)
# Installation steps described by maxcodehack (Maxim Kuzmitsky)
set -e
print_msg(){
echo -e "\e[34m$1\e[0m"
}
print_ok(){
echo -e "\e[32m$1\e[0m"
}
print_err(){
echo -e "\e[31m$1\e[0m"
exit
}
check_utils(){
printf "%s: " $1
if command -v $1 &> /dev/null
then
print_ok "ok\r"
else
print_err "no\r"
fi
}
print_msg "Checking utilities..."
check_utils wget
check_utils 7z
print_msg "Create the /home/autobuild folder..."
sudo rm -rf ~/autobuild /home/autobuild
mkdir -p ~/autobuild/tools
sudo ln -sf ~/autobuild /home/autobuild
print_ok "Successfully!"
print_msg "Download the kos32-gcc toolchain..."
wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/x86_64-linux-kos32-5.4.0.7z -O ~/autobuild/tools/kos32-toolchain.7z
print_ok "Successfully!"
print_msg "Extracting files ..."
cd ~/autobuild/tools/
7z x -y kos32-toolchain.7z
rm -rf kos32-toolchain.7z
print_ok "Successfully!"
print_msg "Downloading libisl..."
cd /tmp
sudo wget http://board.kolibrios.org/download/file.php?id=8301libisl.so.10.2.2.7z -O /tmp/libisl.so.10.2.2.7z
sudo 7z x -y libisl.so.10.2.2.7z
if ! [ -d /usr/lib/x86_64-linux-gnu/ ]; then
sudo mkdir -p /usr/lib/x86_64-linux-gnu/
fi
print_msg "Fixing libisl..."
sudo mv /tmp/libisl.so.10.2.2 /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2
sudo ln -sf /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2 /usr/lib/x86_64-linux-gnu/libisl.so.10
sudo ln -sf /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2 /usr/lib/libisl.so.10
sudo chmod go-w /usr/lib/x86_64-linux-gnu/libisl.so.10
sudo chmod go-w /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2
print_ok "Successfully!"
print_msg "Fixing libmpfr..."
sudo ln -sf /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
sudo ln -sf /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4
print_ok "Successfully!"
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then
export PATH=$PATH:/home/autobuild/tools/win32/bin
print_msg "Adding '/home/autobuild/tools/win32/bin' to '~/.bashrc'"
echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc
fi
print_ok "Installation was successful!"

View File

@@ -407,6 +407,7 @@ tup.append_table(img_files, {
{"@SS", VAR_PROGS .. "/system/scrsaver/scrsaver"},
{"@VOLUME", VAR_PROGS .. "/media/volume/volume"},
{"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"},
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
{"APM", VAR_PROGS .. "/system/apm/apm"},
{"CALC", VAR_PROGS .. "/other/calc/trunk/calc"},
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
@@ -441,6 +442,8 @@ tup.append_table(img_files, {
{"TERMINAL", VAR_PROGS .. "/system/terminal/terminal"},
{"TEST", VAR_PROGS .. "/testing/protection/trunk/test"},
{"TINYPAD", VAR_PROGS .. "/develop/tinypad/trunk/tinypad"},
{"TINFO", VAR_PROGS .. "/system/tinfo/tinfo"},
{"TIMER", VAR_PROGS .. "/other/Timer/Timer"},
{"UNZ", VAR_PROGS .. "/fs/unz/unz"},
{"ZKEY", VAR_PROGS .. "/system/zkey/trunk/ZKEY"},
{"3D/3DWAV", VAR_PROGS .. "/demos/3dwav/trunk/3dwav"},
@@ -453,37 +456,39 @@ tup.append_table(img_files, {
{"DEMOS/BCDCLK", VAR_PROGS .. "/demos/bcdclk/trunk/bcdclk"},
{"DEMOS/BUDHBROT", VAR_PROGS .. "/demos/buddhabrot/trunk/buddhabrot"},
{"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"},
{"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/trunk/firework"},
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/trunk/movback"},
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/trunk/plasma"},
{"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/firework"},
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/movback"},
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"},
{"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/UNVWATER", VAR_PROGS .. "/demos/unvwater/trunk/unvwater"},
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"},
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/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/PIPET", VAR_PROGS .. "/other/pipet/pipet"},
{"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"},
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/trunk/circle"},
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/trunk/colorref"},
{"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"},
{"GAMES/15", VAR_PROGS .. "/games/15/15"},
{"GAMES/DINO", VAR_PROGS .. "/games/dino/dino"},
{"GAMES/FREECELL", VAR_PROGS .. "/games/freecell/freecell"},
{"GAMES/GOMOKU", VAR_PROGS .. "/games/gomoku/gomoku"},
{"GAMES/LIGHTS", VAR_PROGS .. "/games/sq_game/SQ_GAME"},
@@ -498,6 +503,7 @@ tup.append_table(img_files, {
{"GAMES/SW", VAR_PROGS .. "/games/sw/sw"},
{"GAMES/TANKS", VAR_PROGS .. "/games/tanks/tanks"},
{"GAMES/TETRIS", VAR_PROGS .. "/games/tetris/tetris"},
{"GAMES/C4", VAR_PROGS .. "/games/c4/c4"},
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
{"LIB/BOX_LIB.OBJ", VAR_PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
{"LIB/BUF2D.OBJ", VAR_PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
@@ -517,6 +523,7 @@ tup.append_table(img_files, {
{"LIB/SORT.OBJ", VAR_PROGS .. "/develop/libraries/sorter/sort.obj"},
{"LIB/TINYGL.OBJ", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"},
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/trunk/animage"},
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/trunk/kiv"},
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/trunk/listplay"},
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"},
@@ -599,7 +606,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"},
@@ -630,7 +636,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, {
@@ -639,22 +645,6 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
end -- tup.getconfig('NO_FASM') ~= 'full'
-- Programs that require NASM to compile.
if tup.getconfig('NO_NASM') ~= 'full' then
tup.append_table(img_files, {
{"ACLOCK", VAR_PROGS .. "/demos/aclock/trunk/aclock"},
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
{"TIMER", VAR_PROGS .. "/other/Timer/timer"},
{"TINFO", VAR_PROGS .. "/system/tinfo/tinfo"},
{"DEVELOP/MSTATE", VAR_PROGS .. "/develop/mstate/mstate"},
{"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"},
{"GAMES/C4", VAR_PROGS .. "/games/c4/c4"},
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
})
tup.append_table(extra_files, {
})
end -- tup.getconfig('NO_NASM') ~= 'full'
-- Programs that require JWASM to compile.
if tup.getconfig('NO_JWASM') ~= 'full' then
tup.append_table(img_files, {
@@ -680,10 +670,8 @@ tup.append_table(img_files, {
{"TMPDISK", VAR_PROGS .. "/cmm/tmpdisk/tmpdisk.com"},
{"DEVELOP/CLIPVIEW", VAR_PROGS .. "/cmm/clipview/clipview.com"},
{"DEVELOP/MENU", VAR_PROGS .. "/cmm/menu/menu.com"},
{"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"},
@@ -730,6 +718,7 @@ if tup.getconfig('NO_TCC') ~= 'full' then
tup.append_table(img_files, {
{"NETWORK/WHOIS", VAR_PROGS .. "/network/whois/whois"},
{"SHELL", VAR_PROGS .. "/system/shell/shell"},
{"GAMES/DINO", VAR_PROGS .. "/games/dino/dino"},
})
tup.append_table(extra_files, {
{"kolibrios/utils/thashview", VAR_PROGS .. "/other/TinyHashView/thashview"},
@@ -901,10 +890,6 @@ for i,v in ipairs(img_files) do
str = string.gsub(str, "%%", "%%%%") -- escape % as %%
cmd += " && str=" .. str
cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc'
str2='$(get-current-cmtid|grep -oE "\\+[0-9]+")'
str2 = string.gsub(str2, "%$", "\\$") -- escape $ as \$
cmd += " && str2=" .. str2
cmd += ' && echo -n $str2 | dd status=none of=%o bs=1 seek=216 conv=notrunc'
end
local_file = VAR_KERNEL .. "/.kernel.mnt"
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -79,7 +79,7 @@ next=$TextEditor
[Assoc]
/=/sys/file managers/eolite
kf=/sys/KF_VIEW
kf=/sys/syspanel
txt=$CodeEdit
log=$CodeEdit
@@ -94,11 +94,11 @@ lua=$CodeEdit
ob07=$CodeEdit
json=$CodeEdit
asm=$TinyPad
inc=$TinyPad
mac=$TinyPad
inf=$TinyPad
conf=$TinyPad
asm=$CodeEdit
inc=$CodeEdit
mac=$CodeEdit
inf=$CodeEdit
conf=$CodeEdit
ini=$TextEditor

View File

@@ -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

View File

@@ -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

View File

@@ -49,7 +49,7 @@
11 Fplay Video * |/kolibrios/media/fplay
#5 **** DEV
54 Flat Assembler |develop/fasm
27 Example.asm |example.asm
27 Example.asm |/sys/example.asm
49 Debugger mtdbg |develop/mtdbg
49 Debugger koldbg * |/kolibrios/develop/koldbg
13 Debug Board |develop/board
@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -4,7 +4,7 @@
00 3D Demos > |@2
00 Gr<47>ficos > |@3
00 Multimedia > |@4
00 Emulators > |@18
00 Emulators > |@6
00 Desarrollo > |@5
00 Sistema > |@7
00 Proceso de datos > |@11
@@ -45,26 +45,27 @@
#4 **** MULTIMEDIA
16 Pixie Audioplayer |media/pixie
16 AC97SND Audioplayer |media/ac97snd
16 Fplay - video |/kolibrios/media/fplay
16 Fplay - video * |/kolibrios/media/fplay
16 MidAMP |media/midamp
#5 **** DESARROLLO
00 Ejemplos > |@6
16 Archiver KPack |kpack
27 Example.asm |/sys/example.asm
16 Flat Assembler |develop/fasm
16 Archiver KPack |kpack
16 Diff Tool |develop/diff
16 Debug Board |develop/board
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 **** EJEMPLOS
16 Threads |develop/thread
16 Selector de color |demos/cslide
16 Ejemplo de consola 1 |develop/testcon2
16 Ejemplo de consola 2 |develop/test_gets
16 Ejemplo de Messages |demos/use_mb
#6 **** EMULATORS
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
16 e80 (ZX Spectrum) * |/kolibrios/emul/e80/e80
23 FCE Ultra (NES) * |/kolibrios/emul/fceu/fceu
23 DGEN (Sega) * |/kolibrios/emul/dgen/dgen
23 Gameboy Color * |/kolibrios/emul/gameboy
23 ZSNES * |/kolibrios/emul/zsnes/zsnes
16 ScummVM * |/kolibrios/emul/scummvm
#7 **** SISTEMA
00 Archivos > |@10
00 Accesibilidad > |@17
@@ -132,12 +133,4 @@
#17 **** ACCESIBILIDAD
16 Ampliaci<63>n de pantalla|magnify
16 Teclado en pantalla |zkey
#18 **** EMULATORS
24 DOSBox * |/kolibrios/emul/DosBox/dosbox
16 e80 (ZX Spectrum) * |/kolibrios/emul/e80/e80
23 FCE Ultra (NES) * |/kolibrios/emul/fceu/fceu
23 DGEN (Sega) * |/kolibrios/emul/dgen/dgen
23 Gameboy Color * |/kolibrios/emul/gameboy
23 ZSNES * |/kolibrios/emul/zsnes/zsnes
16 ScummVM * |/kolibrios/emul/scummvm
##

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -49,7 +49,7 @@
11 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Fplay * |/kolibrios/media/fplay
#5 **** <20><><EFBFBD><EFBFBD>
54 Flat Assembler |develop/fasm
27 Example.asm |example.asm
27 Example.asm |/sys/example.asm
09 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>騪 KPack |kpack
49 <20><EFBFBD>稪 mtdbg |develop/mtdbg
49 <20><EFBFBD>稪 koldbg * |/kolibrios/develop/koldbg
@@ -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

View File

@@ -3,10 +3,25 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../programs" or tup.getco
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
-- environment variables
tup.import("KOLIBRIOS_BUILD_OFFSET") -- 1234
tup.import("KOLIBRIOS_BUILD_CMTID") -- 0xaabbccdd
tup.import("KOLIBRIOS_BUILD_DBGTAG") -- 0x61 for 'a', etc
str_build = ""
if KOLIBRIOS_BUILD_OFFSET then
str_build += " -dBUILD_OFFSET=" .. KOLIBRIOS_BUILD_OFFSET
end
if KOLIBRIOS_BUILD_CMTID then
str_build += " -dBUILD_CMTID=" .. KOLIBRIOS_BUILD_CMTID
end
if KOLIBRIOS_BUILD_DBGTAG then
str_build += " -dBUILD_DBGTAG=" .. KOLIBRIOS_BUILD_DBGTAG
end
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. tup.getconfig("KERPACK_CMD"), "kernel.mnt")
--tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -s %o.fas" .. tup.getconfig("KERPACK_CMD"), {"kernel.mnt", extra_outputs = {"kernel.mnt.fas"}})
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -s %o.fas" .. str_build .. tup.getconfig("KERPACK_CMD"), {"kernel.mnt", extra_outputs = {"kernel.mnt.fas"}})
--tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "symbols %f %o", "kernel.mnt.sym")
--tup.rule({"kernel.mnt.fas", extra_inputs = {"kernel.mnt"}}, "listing %f %o", "kernel.mnt.lst")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -dextended_primary_loader=1" .. tup.getconfig("KERPACK_CMD"), "kernel.mnt.ext_loader")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o -dpretest_build=1 -ddebug_com_base=0xe9", "kernel.mnt.pretest")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. str_build .. " -dextended_primary_loader=1 " .. tup.getconfig("KERPACK_CMD"), "kernel.mnt.ext_loader")
tup.rule({"kernel.asm", extra_inputs = {"lang.inc"}}, FASM .. " -m 262144 %f %o " .. str_build .. " -dpretest_build=1 -ddebug_com_base=0xe9", "kernel.mnt.pretest")

View File

@@ -29,35 +29,41 @@ macro line_space {
}
d80x25_top:
line_full_top
if __REV__ > 0
; draw seven digits of the git hash
__x = BUILD_CMTID
if __x > 0
__x = __x SHR 4
cur_line_pos = 75
store byte ' ' at d80x25_top+cur_line_pos+1
rev_var = __REV__
while rev_var > 0
store byte rev_var mod 10 + '0' at d80x25_top+cur_line_pos
repeat 7
digit = __x AND 0xf
if digit > 9
digit = digit - 10 + 'a'
else
digit = digit + '0'
end if
store byte digit at d80x25_top+cur_line_pos
cur_line_pos = cur_line_pos - 1
rev_var = rev_var / 10
end while
__x = __x SHR 4
end repeat
store byte ' ' at d80x25_top+cur_line_pos
store dword ' SVN' at d80x25_top+cur_line_pos-4
store dword ' GIT' at d80x25_top+cur_line_pos-4
end if
space_msg:
line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
db 186,32
repeat 78
load a byte from kernel_header.signature+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
end repeat
db 32,186
line_half
d80x25_top_num = 4

View File

@@ -24,9 +24,38 @@ org 0
; struct kernel_header
jmp start_of_code ; jump
db 'KolibriOS ' ; signature
db 'v0.7.7.0 ',13,10,13,10,0 ; FIXME: get distribution version from git tag
db 'v0.7.7.0' ; FIXME: get distribution version from git tag?
.offset db ' ',13,10,0
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
cur_line_pos = 0
offset_len = 0
__x = BUILD_OFFSET
if __x > 0
store byte '+' at .offset+cur_line_pos
if __x < 10
offset_len = 2 ; '+' and a digit
else if __x < 100
offset_len = 3
else if __x < 1000
offset_len = 4
else if __x < 10000
offset_len = 5
else
offset_len = 6
end if
cur_line_pos = cur_line_pos + offset_len - 1
while __x > 0
store byte __x mod 10 + '0' at .offset+cur_line_pos
cur_line_pos = cur_line_pos - 1
__x = __x / 10
end while
end if
if BUILD_DBGTAG > 0
store byte '-' at .offset+offset_len
store byte BUILD_DBGTAG at .offset+offset_len+1
end if
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"

View File

@@ -227,6 +227,33 @@ struct kernel_header
; KERNEL.MNT file can be booted on BIOS as well as on UEFI.
ends
struct kernel_version
; OS release number, e.g. 0,7,7,0. Distro-specific.
osrel rb 4
; A single char like 'a' to append to the version, or 0 to omit it.
; 0 means 0.7.7.0+1234, 'a' means 0.7.7.0+1234-a, etc.
; This allows developers to determine the debug build by its log.
; Unfortunately, users sometimes mess things and test not the build they
; were asked to test.
dbgtag db ?
; The kernel itself doesn't have any version other than its ABI version.
; The minor and major parts were meant to mean significant compatible
; and incompatible changes correspondingly. It is for a developer to
; decide on what is a significant change.
abimin db ?
; The major ABI version must be at least 0x28 for backward compatibility
; with the old revision number: 0x2800 = 10240 > the last SVN revision.
abimaj dw ?
; In binary, e.g. a short git hash. A single dword is 8 digits which
; should be enough for the foreseeable future. We always can get space
; for four more digits from the two reserved bytes below if needed.
cmtid dd ?
reserved dw ?
; The number of commits from the last release.
offset dw ?
ends
assert sizeof.kernel_version = 16
DRIVE_DATA_SIZE = 16
OS_BASE = 0x80000000

View File

@@ -970,13 +970,21 @@ picture rb Xsize*Ysize*4 ; 32 бита
размером 16 байт для будущей совместимости, в будущем могут быть
добавлены некоторые поля.
Структура буфера:
db a,b,c,d для версии a.b.c.d
db 0: зарезервировано
dd REV - номер svn-ревизии ядра
Для ядра Kolibri 0.7.7.0+:
db a,b,c,d для версии ОС a.b.c.d
db отладочная метка, для релиза всегда 0, иначе любой символ ASCII
db младшая часть ABI ядра
dw старшая часть ABI ядра
dd идентификатор коммита, например краткий git-хэш в бинарном виде
dw зарезервировано
dw количество коммитов с момента последнего релиза
Пример структуры для ядра Kolibri 0.7.7.0+:
db 0,7,7,0
db 0
dd 1675
db 0
dw 40
dd 0xf26d5b28
dw 0
dw 1675
---------------------- Константы для регистров: ----------------------
eax - SF_SYSTEM (18)

View File

@@ -962,13 +962,21 @@ Remarks:
16 byte buffer for the future compatibility, in the future
some fields can be added.
Structure of the buffer:
db a,b,c,d for version a.b.c.d
db 0: reserved
dd REV - kernel SVN revision number
For Kolibri 0.7.7.0+ kernel:
db a,b,c,d for os version a.b.c.d
db debug tag, 0 for release, any ASCII char otherwise
db kernel ABI minor
dw kernel ABI major
dd commit id, e.g. short git hash in binary
dw reserved
dw the number of commits since the latest release
For Kolibri 0.7.7.0+ the structure is like this:
db 0,7,7,0
db 0
dd 1675
db 0
dw 40
dd 0xf26d5b28
dw 0
dw 1675
---------------------- Constants for registers: ----------------------
eax - SF_SYSTEM (18)

View File

@@ -30,6 +30,8 @@ format binary as "mnt"
include 'macros.inc'
include 'struct.inc'
ABI_MAJOR = 0x28
ABI_MINOR = 0
USE_COM_IRQ = 1 ; make irq 3 and irq 4 available for PCI devices
VESA_1_2_VIDEO = 0 ; enable vesa 1.2 bank switch functions
@@ -711,10 +713,33 @@ end if
;-----------------------------------------------------------------------------
; show SVN version of kernel on the message board
; show OS version, offset, debug tag and commit id on the message board
;-----------------------------------------------------------------------------
mov eax, [version_inf.rev]
DEBUGF 1, "K : kernel SVN r%d\n", eax
mov eax, version_inf.osrel
DEBUGF 1, "K : OS version: %u.%u.%u.%u", [eax+0]:1, [eax+1]:1, \
[eax+2]:1, [eax+3]:1, ecx
movzx ecx, [version_inf.offset]
jecxz @f
DEBUGF 1, "+%u", ecx
@@:
movzx ecx, [version_inf.dbgtag]
jecxz @f
push ecx
mov ecx, esp
DEBUGF 1, "-%s", ecx
pop ecx
@@:
DEBUGF 1, "\n"
mov ecx, [version_inf.cmtid]
jecxz @f
DEBUGF 1, "K : Commit ID: %x\n", ecx
@@:
;-----------------------------------------------------------------------------
; show kernel ABI
;-----------------------------------------------------------------------------
movzx eax, [version_inf.abimaj]
movzx ecx, [version_inf.abimin]
DEBUGF 1, "K : Kernel ABI: %u.%u\n", eax, ecx
;-----------------------------------------------------------------------------
; show CPU count on the message board
;-----------------------------------------------------------------------------
@@ -2102,12 +2127,12 @@ sysfn_getdiskinfo: ; 18.11 = get disk info table
;------------------------------------------------------------------------------
sysfn_getversion: ; 18.13 = get kernel ID and version
; if given memory address belongs to kernel then error
stdcall is_region_userspace, ecx, version_inf.size
stdcall is_region_userspace, ecx, sizeof.kernel_version
jnz .addr_error
mov edi, ecx
mov esi, version_inf
mov ecx, version_inf.size
mov ecx, sizeof.kernel_version
rep movsb
ret
.addr_error: ; if given memory address is illegal
@@ -2287,11 +2312,18 @@ sound_flag db 0
endg
iglobal
version_inf:
db 0,7,7,0 ; FIXME: Get distribution version from git tag
db 0
.rev dd __REV__
.size = $ - version_inf
if ~ definite BUILD_DBGTAG
BUILD_DBGTAG = 0
end if
if ~ definite BUILD_CMTID
BUILD_CMTID = 0
end if
if ~ definite BUILD_OFFSET
BUILD_OFFSET = 0
end if
align 4
version_inf kernel_version <0,7,7,0>, BUILD_DBGTAG, ABI_MINOR, ABI_MAJOR, \
BUILD_CMTID, 0, BUILD_OFFSET
endg
;------------------------------------------------------------------------------
align 4
@@ -4457,8 +4489,6 @@ end if
include "data32.inc"
__REV__ = __REV
if ~ lang eq es_ES
diff16 "end of kernel code",0,$
end if

View File

@@ -5,16 +5,6 @@
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
__REV = 0
macro $Revision a {
match =: Num =$,a \{
if __REV < Num
__REV = Num
end if
\}
}
;// mike.dld, 2006-29-01 [
; macros definition

Binary file not shown.

View 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()

View File

@@ -68,6 +68,7 @@ struct TWebBrowser {
void tag_a();
void tag_p();
void tag_img();
void tag_kosicon();
void tag_div();
void tag_h1234_caption();
void tag_ol_ul_dt();
@@ -101,13 +102,16 @@ void TWebBrowser::SetPageDefaults()
img_url.drop();
text_colors.drop();
text_colors.add(0);
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);
canvas.Fill(0, 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);
@@ -133,8 +137,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 {
@@ -153,7 +155,6 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
}
}
table.cols.drop();
secondrun = false;
@@ -176,7 +177,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
}
}
if (ESBYTE[bufpos] == '&') {
bufpos = GetUnicodeSymbol(#linebuf, sizeof(TWebBrowser.linebuf), bufpos+1, bufpointer+bufsize);
bufpos = GetUnicodeSymbol(#linebuf, sizeof(TWebBrowser.linebuf)-1, bufpos+1, bufpointer+bufsize);
continue;
}
if (ESBYTE[bufpos] == '<') && (is_html) {
@@ -216,19 +217,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);

View File

@@ -45,9 +45,10 @@ void PAGE_LINKS::clear()
w.drop();
h.drop();
underline_h.drop();
id.drop();
element_links.drop();
unic_links.drop();
id.drop();
active = -1;
active_url = 0;

View File

@@ -67,7 +67,7 @@ bool _tag::parse(dword _bufpos, bufend)
if (!whitepos) || (whitepos > closepos) {
//no param
strncpy(#name, bufpos, math.min(closepos - bufpos, sizeof(tag.name)));
strncpy(#name, bufpos, math.min(closepos - bufpos, sizeof(tag.name)-1));
bufpos = closepos;
} else {
//we have param
@@ -76,7 +76,7 @@ bool _tag::parse(dword _bufpos, bufend)
if (openpos < strchr(closepos+1, '>')) break;
if (!closepos = EAX) {closepos = bufend;break;}
}
strncpy(#name, bufpos, math.min(whitepos - bufpos, sizeof(tag.name)));
strncpy(#name, bufpos, math.min(whitepos - bufpos, sizeof(tag.name)-1));
bufpos = closepos;
params = malloc(closepos - whitepos + 1);
@@ -112,6 +112,7 @@ dword _tag::get_next_param(dword ps, pe)
// "pe" - param end
// "q" - quote char
char q = NULL;
dword initial_pe = pe;
dword fixeq;
dword val;
dword attr;
@@ -145,6 +146,14 @@ dword _tag::get_next_param(dword ps, pe)
//already have ATTR end
}
if (pe > ps) pe--;
//Fix case: "src ="
while (pe>ps) && (__isWhite(ESBYTE[pe])) {
ESBYTE[pe] = '\0';
pe--;
}
//find ATTR start and copy
while (pe>ps) && (!__isWhite(ESBYTE[pe])) pe--;
attr = pe + 1;
@@ -161,6 +170,8 @@ dword _tag::get_next_param(dword ps, pe)
}
strlwr(attr);
strrtrim(val);
//Fix case: " img.png"
while(__isWhite(ESBYTE[val])) && (val<initial_pe) val++;
attributes.add(attr);
values.add(val);

View File

@@ -10,11 +10,9 @@ void TWebBrowser::RenderLine(dword _line)
if (style.title)
{
strncpy(#header, _line, sizeof(TWebBrowser.header)-1);
if (!application_mode) {
strncat(#header, " - ", sizeof(TWebBrowser.header)-1);
strncat(#header, #version, sizeof(TWebBrowser.header)-1);
}
}
else if (t_html) && (!t_body) {
//
}
@@ -24,9 +22,8 @@ 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) {
@@ -85,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--;
@@ -98,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) {
@@ -124,7 +131,11 @@ void TWebBrowser::NewLine()
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;
}
@@ -140,7 +151,7 @@ bool TWebBrowser::RenderImage(dword cur_img)
int img_x, img_y, img_w, img_h;
dword imgbuf[44];
if (!cur_img) return false;
if (!cur_img) || (!buf_data) return false;
img_h = ESDWORD[cur_img+8];
img_w = ESDWORD[cur_img+4];

View File

@@ -10,6 +10,7 @@ void TWebBrowser::SetStyle()
if (tag.is("a")) { tag_a(); return; }
if (tag.is("p")) { tag_p(); return; }
if (tag.is("img")) { tag_img(); return; }
if (tag.is("kosicon")) { tag_kosicon(); return; }
if (tag.is("div")) { tag_div(); return; }
if (tag.is("br")) { /*draw_x++;*/NewLine(); return; }
if (tag.is("nav")) { style.nav = tag.opened; return; }
@@ -56,15 +57,12 @@ void TWebBrowser::SetStyle()
if (tag.is("tr")) { tag_table(); return; }
if (tag.is("th")) { tag_table(); return; }
if (tag.is("td")) { tag_table(); return; }
if (application_mode) {
if (tag.is("exit")) { ExitProcess(); return; }
}
}
void TWebBrowser::tag_p()
{
IF (tag.prior[0] == 'h') || (streq(#tag.prior,"td")) || (streq(#tag.prior,"p")) return;
IF (tag.prior[0] == 'h') || (streq(#tag.prior,"td")) return;
IF (!tag.opened) && (streq(#tag.prior,"p")) return;
NewLine();
}
@@ -122,6 +120,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:"))
@@ -136,6 +135,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"))
{
@@ -148,22 +148,6 @@ void TWebBrowser::tag_meta_xml()
if (streq(tag.get_value_of("http-equiv"), "refresh")) && (tag.get_value_of("content")) {
if (tag.value = strstri(tag.value, "url")) strcpy(#redirect, tag.value);
}
if (streq(tag.get_value_of("name"), "application")) {
if (application_mode) {
if (tag.get_number_of("left")) {
MoveSize(tag.number,-1,-1,-1);
}
if (tag.get_number_of("top")) {
MoveSize(-1,tag.number,-1,-1);
}
if (tag.get_number_of("width")) {
MoveSize(-1,-1,tag.number,-1);
}
if (tag.get_number_of("height")) {
MoveSize(-1,-1,-1,tag.number);
}
}
}
}
signed int get_encoding_type_by_name(dword name)
@@ -206,7 +190,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();
@@ -238,10 +222,7 @@ void TWebBrowser::tag_body()
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("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);
@@ -264,11 +245,19 @@ void TWebBrowser::tag_h1234_caption()
} else {
style.h = tag.opened;
if (tag.opened) {
if (!style.pre) NewLine();
draw_y += 10;
list.SetFont(BASIC_CHAR_W*2, 14*2, 10011001b);
list.item_h = BASIC_LINE_H * 2 - 2;
if (tag.is("h1")) style.b = true;
if (!style.pre) {
NewLine();
NewLine();
}
if (tag.is("h1")) {
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
style.b = true;
} else if (tag.is("h2")) {
list.SetFont(BASIC_CHAR_W*2, 14+14, 10011001b);
} else {
list.SetFont(6*2, 9+7, 10001001b);
}
style.cur_line_h = list.item_h = list.font_h + 2;
} else {
if (tag.is("h1")) style.b = false;
NewLine();
@@ -278,6 +267,17 @@ void TWebBrowser::tag_h1234_caption()
}
}
void TWebBrowser::tag_kosicon()
{
dword imgbuf[44];
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
if (shared_i18) && (tag.get_number_of("n")) {
if (draw_x + 18 > canvas.bufw) NewLine();
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
draw_x += 22;
}
}
void TWebBrowser::tag_img()
{
@@ -305,7 +305,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)) {
@@ -317,7 +317,7 @@ void TWebBrowser::tag_img()
img_decode stdcall (cache.current_buf, cache.current_size, 0);
if (EAX) goto IMGOK; else goto NOIMG;
} else {
img_url.add(#img_path);
if (img_url.get_pos_by_name(#img_path)==-1) img_url.add(#img_path);
goto NOIMG;
}
@@ -342,31 +342,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()
@@ -380,15 +377,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 {
@@ -447,26 +444,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, tallest_cell_in_row);
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) {
@@ -477,20 +465,19 @@ 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 * tag.number / 100; //
}
if (tag.number < draw_w) draw_w = tag.number;
if (tag.number < list.w - table.margin - left_gap) 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) {
@@ -498,11 +485,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");
//}
}

View File

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

View File

@@ -1,4 +1,4 @@
//Copyright 2007-2021 by Veliant & Leency
//Copyright 2007-2025 by Veliant & Leency
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
//BUGS
@@ -45,7 +45,6 @@
bool debug_mode = false;
bool show_images = true;
bool source_mode = false;
bool application_mode = false;
_history history;
@@ -80,7 +79,7 @@ char default_dir[] = "/sys";
od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" };
char editURL[URL_SIZE+1];
edit_box omnibox_edit = {, 0, 0, 0xffffff,
edit_box omnibox_edit = {250, 0, 0, 0xffffff,
0x94AECE, 0xffffff, 0xffffff,0x10000000,URL_SIZE-2,#editURL,0,,19,19};
//===================================================//
@@ -110,9 +109,6 @@ void HandleParam()
history.add(#param + 8);
} else if (!strncmp(#param, "-new ", 5)) {
history.add(#param + 5);
} else if (!strncmp(#param, "-app ", 5)) {
history.add(#param + 5);
application_mode = true;
} else {
if (GetProcessesCount("WEBVIEW") == 1) {
history.add(#param);
@@ -136,14 +132,6 @@ void main()
LoadLibraries();
HandleParam();
if (application_mode) {
TOOLBAR_H = 0;
PADDING = 0;
TSZE = 0;
STATUSBAR_H = 0;
TAB_H = 0;
}
omnibox_edit.left = PADDING+TSZE*2+PADDING+6;
omnibox_edit.top = PADDING+3;
@@ -211,7 +199,7 @@ void main()
GetProcessInfo(#Form, SelfInfo);
ProcessMenuClick();
sc.get();
if (Form.status_window>2) break;
if (Form.status_window & ROLLED_UP) break;
if (Form.height<120) { MoveSize(OLD,OLD,OLD,120); break; }
if (Form.width<280) { MoveSize(OLD,OLD,280,OLD); break; }
draw_window();
@@ -221,15 +209,6 @@ void main()
if (http.transfer <= 0) break;
http.receive();
if (http_get_type==PAGE) {
CheckContentType();
prbar.max = http.content_length;
if (prbar.value != http.content_received) {
prbar.value = http.content_received;
DrawProgress();
}
}
if (http.receive_result != 0) break;
if (debug_mode) {
EAX = http.transfer;
@@ -248,6 +227,15 @@ void main()
notify("'Too many redirects.' -E");
}
} else {
if (http_get_type==PAGE) {
CheckContentType();
prbar.max = http.content_length;
if (prbar.value != http.content_received) {
prbar.value = http.content_received;
DrawProgress();
}
}
// Loading the page is complete, free resources
redirect_count = 0;
if (http_get_type==PAGE) {
@@ -270,6 +258,7 @@ void main()
free(http.content_pointer);
GetImg(false);
}
debugln("end evNetwork");
}
break;
default:
@@ -324,7 +313,7 @@ void ProcessKeyEvent()
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT)
{
if (key_scancode == SCAN_CODE_TAB) {EventActivatePreviousTab();return;}
if (key_scancode == SCAN_CODE_KEY_T) {EventOpenNewTab(URL_SERVICE_TEST);return;}
if (key_scancode == SCAN_CODE_BS) {EventOpenNewTab(URL_SERVICE_TEST);return;}
}
if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) switch(key_scancode)
@@ -349,6 +338,7 @@ void ProcessKeyEvent()
{
case SCAN_CODE_UP: EventScrollUpAndDown(SCAN_CODE_UP); return;
case SCAN_CODE_DOWN: EventScrollUpAndDown(SCAN_CODE_DOWN); return;
case SCAN_CODE_F2: EventEditSource(); return;
case SCAN_CODE_F6: {omnibox_edit.flags=ed_focus; DrawOmnibox();} return;
case SCAN_CODE_F5: EventRefreshPage(); return;
case SCAN_CODE_ENTER: if (omnibox_edit.flags & ed_focus) EventSubmitOmnibox(); return;
@@ -382,7 +372,6 @@ void draw_window()
SetElementSizes();
if (!application_mode) {
DrawBar(0,0, Form.cwidth,PADDING, sc.work);
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.dark, sc.work, 180));
@@ -398,7 +387,6 @@ void draw_window()
DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x,
WB1.list.h-1, scroll_wv.bckg_col);
}
if (!canvas.bufw) {
EventOpenFirstPage();
@@ -406,12 +394,9 @@ void draw_window()
WB1.DrawPage();
DrawOmnibox();
}
if (!application_mode) {
DrawProgress();
DrawStatusBar(NULL);
DrawTabsBar();
}
}
void EventOpenFirstPage()
@@ -532,7 +517,6 @@ bool GetLocalFileData(dword _path)
bool GetUrl(dword _http_url)
{
char new_url_full[URL_SIZE+1];
if (!strncmp(_http_url,"http:",5)) {
http.get(_http_url);
return true;
@@ -587,11 +571,10 @@ void OpenPage(dword _open_URL)
//INTERNAL PAGE
history.add(#new_url);
WB1.custom_encoding = -1;
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home));
else if (streq(#new_url, URL_SERVICE_HELP)) LoadInternalPage(#buildin_page_help, sizeof(buildin_page_help));
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test));
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)-1);
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test)-1);
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
//WEB PAGE
@@ -606,7 +589,7 @@ void OpenPage(dword _open_URL)
if (!http.transfer) {
history.add(#new_url);
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
}
} else {
//LOCAL PAGE
@@ -619,7 +602,7 @@ void OpenPage(dword _open_URL)
strcpy(#new_url, "/tmp0/1/temp/word/document.xml");
}
if (!GetLocalFileData(#new_url)) {
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
}
}
}
@@ -729,7 +712,7 @@ void EventSubmitOmnibox()
void LoadInternalPage(dword _bufdata, _in_bufsize){
if (!_bufdata) || (!_in_bufsize) {
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
} else {
WB1.list.first = 0; //scroll page to the top
DrawOmnibox();
@@ -757,7 +740,12 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){
WB1.DrawPage();
}
http.hfree();
if (WB1.img_url.count) { GetImg(true); DrawOmnibox(); }
if (WB1.img_url.count) {
GetImg(true);
DrawOmnibox();
} else {
PageLoaded();
}
}
}
@@ -770,7 +758,6 @@ bool UrlExtIs(dword base, ext)
void DrawProgress()
{
dword pct;
if (application_mode) return;
if (!http.transfer) return;
if (http_get_type==PAGE) && (prbar.max) pct = prbar.value*30/prbar.max; else pct = 10;
if (http_get_type==IMG) pct = prbar.value * 70 / prbar.max + 30;
@@ -779,21 +766,18 @@ void DrawProgress()
void EventShowPageMenu()
{
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #rmb_menu);
menu_id = VIEW_SOURCE;
menu_id = BACK_BUTTON;
}
void EventShowLinkMenu()
{
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #link_menu);
menu_id = IN_NEW_TAB;
}
void EventShowMainMenu()
{
if (application_mode) return;
open_lmenu(Form.cwidth - PADDING -4, PADDING + TSZE + 3,
MENU_TOP_RIGHT, NULL, #main_menu);
menu_id = OPEN_FILE;
@@ -801,7 +785,6 @@ void EventShowMainMenu()
void EventShowEncodingsList()
{
if (application_mode) return;
open_lmenu(Form.cwidth-4, Form.cheight - STATUSBAR_H + 12,
MENU_BOT_RIGHT, WB1.cur_encoding + 1,
"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866");
@@ -824,7 +807,8 @@ void EventSeachWeb()
{
char new_url[URL_SIZE+1];
replace_char(#editURL, ' ', '+', URL_SIZE);
strcpy(#new_url, "https://www.google.com/search?q=");
//strcpy(#new_url, "https://html.duckduckgo.com/html/?q=");
strcpy(#new_url, "http://bing.com/search?q=");
strncat(#new_url, #editURL, URL_SIZE);
OpenPage(#new_url);
}
@@ -886,8 +870,7 @@ void DrawStatusBar(dword _msg)
{
dword status_y = Form.cheight - STATUSBAR_H + 4;
dword status_w = Form.cwidth - 90;
if (application_mode) return;
if (Form.status_window>2) return;
if (Form.status_window & ROLLED_UP) return;
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_msg) {
ESI = math.min(status_w/6, strlen(_msg));
@@ -900,7 +883,6 @@ void DrawStatusBar(dword _msg)
void DrawOmnibox()
{
int imgxoff;
if (application_mode) return;
DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+18, 24, sc.line,
sc.line, sc.line, sc.dark);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+18, 1, 0xD8DCD8);
@@ -919,7 +901,6 @@ void DrawOmnibox()
void SetOmniboxText(dword _text)
{
if (application_mode) return;
edit_box_set_text stdcall (#omnibox_edit, _text);
omnibox_edit.pos = omnibox_edit.flags = 0;
DrawOmnibox();
@@ -939,7 +920,7 @@ dword GetAbsoluteActiveURL()
void CheckContentType()
{
char content_type[64];
if (http.header_field("content-type", #content_type, sizeof(content_type))) // application || image
if (http.header_field("content-type", #content_type, sizeof(content_type)-1)) // application || image
if (content_type[0] == 'i') {
EventDownloadAndOpenImage(http.cur_url);
@@ -987,12 +968,14 @@ dword GetImg(bool _new)
for (i = 0; i < WB1.img_url.count; i++)
{
cur_img_url = WB1.img_url.get(i);
if (debug_mode)
{debug("get img: ");debugln(cur_img_url);}
if (cache.has(cur_img_url)==false) {
prbar.max = WB1.img_url.count;
prbar.value = i;
if (GetUrl(cur_img_url)) {DrawStatusBar(cur_img_url); DrawProgress(); return;}
if (GetUrl(cur_img_url)) {
DrawStatusBar(cur_img_url);
DrawProgress();
return;
}
}
}
if (_new) return;
@@ -1000,8 +983,13 @@ dword GetImg(bool _new)
DrawStatusBar(T_RENDERING);
WB1.Reparse();
WB1.DrawPage();
debugln(sprintf(#param, T_DONE_IN_SEC, GetStartTime()-render_start_time/100));
DrawStatusBar(NULL);
PageLoaded();
}
void PageLoaded()
{
DrawStatusBar(sprintf(#param, T_DONE_IN_SEC, GetStartTime()-render_start_time/100,
GetStartTime()-render_start_time*10));
}
stop:

View File

@@ -16,7 +16,7 @@ struct _cache
void add();
bool has();
void clear();
} cache=0;
} cache;
void _cache::add(dword _url, _data, _size, _type, _charset)
{
@@ -37,6 +37,7 @@ void _cache::add(dword _url, _data, _size, _type, _charset)
bool _cache::has(dword _link)
{
int pos;
if (!url.count) return false;
pos = url.get_pos_by_name(_link);
if (pos != -1) {
current_buf = data.get(pos);

View File

@@ -9,8 +9,11 @@ char buildin_page_home[] = FROM "res/homepage_ru.htm";
char buildin_page_help[] = FROM "res/help_ru.htm";
char accept_language[]= "Accept-Language: ru\n";
char rmb_menu[] =
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E5AEA4><EFBFBD>|Ctrl+U
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
"Back|Ctrl+<
Forward|Ctrl+>
-
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+U
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|F2";
char main_menu[] =
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>...|Ctrl+O
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Ctrl+N
@@ -27,14 +30,14 @@ char link_menu[] =
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>";
char loading_text[] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...";
char update_param[] = "-e http://builds.kolibrios.org/rus/data/programs/cmm/browser/WebView.com";
char update_param[] = "-e http://builds.kolibrios.org/ru_RU/data/programs/cmm/browser/WebView.com";
char update_download_error[] = "'WebView\n<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!' -tE";
char update_ok[] = "'WebView\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20>ᯥ譮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!' -tO";
char update_is_current[] = "'WebView\n<EFBFBD><EFBFBD><20><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.' -tI";
char update_can_not_copy[] = "'WebView\n<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> Downloads <20><> Ramdisk. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>.' -tE";
char clear_cache_ok[] = "'WebView\n<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>饭.' -tI";
#define T_RENDERING "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AD><EFBFBD>..."
#define T_DONE_IN_SEC "<22><><EFBFBD>: %i ᥪ"
#define T_DONE_IN_SEC "<22><><EFBFBD>: %i ᥪ (%i <20><><EFBFBD><EFBFBD>ᥪ)"
#else
//===================================================//
// //
@@ -46,8 +49,11 @@ char buildin_page_home[] = FROM "res/homepage_en.htm";
char buildin_page_help[] = FROM "res/help_en.htm";
char accept_language[]= "Accept-Language: en\n";
char rmb_menu[] =
"View source|Ctrl+U
Edit source";
"Back|Ctrl+<
Forward|Ctrl+>
-
View source|Ctrl+U
Edit source|F2";
char main_menu[] =
"Open local file...|Ctrl+O
New window|Ctrl+N
@@ -63,14 +69,14 @@ Open in new window
Copy link
Download link contents";
char loading_text[] = "Loading...";
char update_param[] = "-e http://builds.kolibrios.org/eng/data/programs/cmm/browser/WebView.com";
char update_param[] = "-e http://builds.kolibrios.org/en_US/data/programs/cmm/browser/WebView.com";
char update_download_error[] = "'WebView\nError receiving an up to date information!' -tE";
char update_ok[] = "'WebView\nThe browser has been updated!' -tO";
char update_is_current[] = "'WebView\nThe browser is up to date.' -tI";
char update_can_not_copy[] = "'WebView\nError copying a new version from Downloads folder!\nProbably too litle space on Ramdisk.' -tE";
char clear_cache_ok[] = "'WebView\nThe cache has been cleared.' -tI";
#define T_RENDERING "Rendering..."
#define T_DONE_IN_SEC "Done in %i sec"
#define T_DONE_IN_SEC "Done in %i sec (%i milisec)"
#endif
//===================================================//
@@ -83,7 +89,6 @@ char buildin_page_test[] = FROM "res/test.htm";
#define URL_SERVICE_HISTORY "WebView:history"
#define URL_SERVICE_HOMEPAGE "WebView:home"
#define URL_SERVICE_HELP "WebView:help"
#define URL_SERVICE_TEST "WebView:test"
char webview_shared[] = "WEBVIEW";
@@ -91,12 +96,12 @@ char webview_shared[] = "WEBVIEW";
enum {
NEW_TAB=600,
ENCODINGS=700,
BACK_BUTTON=800,
FORWARD_BUTTON, REFRESH_BUTTON, GOTOURL_BUTTON, CHANGE_ENCODING,
SANDWICH_BUTTON, VIEW_SOURCE, EDIT_SOURCE, OPEN_FILE,
NEW_WINDOW, VIEW_HISTORY, DOWNLOAD_MANAGER, CLEAR_CACHE,
UPDATE_BROWSER, IN_NEW_TAB, IN_NEW_WINDOW, COPY_LINK_URL,
DOWNLOAD_LINK_CT, TAB_ID,
BACK_BUTTON=800, FORWARD_BUTTON, VIEW_SOURCE, EDIT_SOURCE,
REFRESH_BUTTON, GOTOURL_BUTTON, CHANGE_ENCODING,
SANDWICH_BUTTON,
OPEN_FILE, NEW_WINDOW, VIEW_HISTORY, DOWNLOAD_MANAGER,
CLEAR_CACHE, UPDATE_BROWSER, IN_NEW_TAB, IN_NEW_WINDOW,
COPY_LINK_URL, DOWNLOAD_LINK_CT, TAB_ID,
TAB_CLOSE_ID = 900
};
@@ -107,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
char version[]="WebView 3.66-3";
char version[]="WebView 3.85";

View File

@@ -2,15 +2,16 @@
<head>
<title>Homepage</title>
</head>
<body><pre>Bookmarks:
1. <a href=//kolibrios.org>KolibriOS homepage</a>
2. <a href=//kolibri-n.org>KolibriN homepage</a>
3. <a href="//builds.kolibrios.org">Night-builds</a>
4. <a href="//store.kolibri-n.org">Kolibri Stuff</a>
<body><pre>Welcome to WebView a Text-Based Browser.
KolibriOS Bookmarks:
1. <a href=//kolibrios.org>Homepage</a>
2. <a href="//builds.kolibrios.org">Night-builds</a>
3. <a href="//ftp.kolibrios.org">FTP Server</a>
<font bg=#F8F15B>By the way,</font>
<font color="#555555">&bull; You can check for browser updates from the main menu.
&bull; To run a web search, type a text in the adress box and press Ctrl+Enter.
&bull; You can also use other <a href=WebView:help><font color=555555>Hotkeys</font></a>.
&bull; Pressing F6 moves a text cursor to the omnibox.
&bull; Click on a label in the bottom right corner to change the encoding of a page.
</font>

View File

@@ -1,17 +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> <20><><EFBFBD><E0A0AD><EFBFBD> KolibriOS</a>
2. <a href=//kolibri-n.org>KolibriN10</a>
3. <a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
4. <a href="//store.kolibri-n.org">Kolibri Store</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">&bull; <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>
&bull; <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
&bull; <20><><EFBFBD><EFBFBD><><E2A0AA> <20><><EFBFBD> <a href=WebView:help><font color=555555><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></font></a>.
&bull; <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>.
&bull; <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>

View File

@@ -2,40 +2,38 @@
<title>TEST</title>
<style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style>
<body>
<pre>
<a href=//kolibrios.org>KolibriOS</a>
<a href=//kolibri-n.org>KolibriN10</a>
<a href=//store.kolibri-n.org>Kolibri Store</a>
<table><tr><td>Simplest:
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
<pre><h2>HTTP</h2>
<a href=//th99.infania.net>Total Hardware 1999</a>
<a href=//wiby.org>wiby.org</a>
<a href=//menuetos.net>menuetos.net</a>
<a href=//macintosh.garden/>Macintosh Garden</a>
<a href=//pci-ids.ucw.cz>pci.ids</a>
<a href=//toastytech.com/guis/index.html>GUI Gallery</a>
<a href=//www.weitek.com/textual/support/driver.html>weitek</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
<a href=//neonfloppy.sytes.net/articles/win3-usb/>neonfloppy</a>
<a href=//www.win31.de/eindex.htm>win31.de</a>
<h3>VPN-only</h3>
<a href=//dgmag.in>dgmag.in</a>
<a href=//bash.im>bash.im</a>
<a href=//opennet.ru>opennet</a>
<a href=//linux.org.ru>LOR</a>
<a href=//baravy.by/me/b.html>baravy.by/me/b.html</a>
<a href=//samlib.ru/b>samlib.ru/b</a>
<a href=//fdd5-25.pdp-11.ru>fdd5-25</a>
<a href=//old-dos.ru>old-dos.ru</a>
<a href=//artcon.ru>artcon.ru</a>
<a href=//nubo.ru>nubo.ru</a>
<a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
<td>Simple:
<a href=//lionovsky.us>lionovsky.us</a>
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
<h2>HTTPS :(</h2>
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a>
<a href=//mestack.narod.ru/index.html>mestack.narod.ru</a>
<a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
<a href=//vetusware.com>vetusware.com</a>
<a href=//th99.infania.net>Total Hardware 1999</a>
<a href=//toastytech.com/guis/index.html>GUI Gallery</a>
<a href=//menuetos.net>menuetos.net</a>
<tr><td>
Moderate:
<a href=//fdd5-25.pdp-11.ru>fdd5-25</a>
<a href=//lionovsky.us>lionovsky.us</a>
<a href=//acmp.ru/index.asp?main=tasks>acmp.ru</a>
<a href=//old-dos.ru>old-dos.ru</a>
<a href=//www.weitek.com/textual/support/driver.html>weitek</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
<td>Complex:
<a href=//artcon.ru>artcon.ru</a>
<a href=//nubo.ru>nubo.ru</a>
<a href=//salinc.ru>salinc.ru</a>
<a href=//xn--80abh7bk0c.xn--p1ai>bashorg</a>
<a href=//opennet.ru>opennet</a>
<a href=//linux.org.ru>LOR</a>
<a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a>
<a href=//samlib.ru/b>samlib.ru/b</a>
<a href=//vetusware.com>vetusware.com</a>
<a href=//electromyne.de>electromyne.de</a>
<a href=//www.thg.ru/graphic/25year_ati_history>tom's hardware</a>

View File

@@ -7,8 +7,8 @@
#define TABS_MAX 5
TWebBrowser tabdata[TABS_MAX+1]=0;
_history tabstory[TABS_MAX+1]=0;
TWebBrowser tabdata[TABS_MAX+1];
_history tabstory[TABS_MAX+1];
struct TAB
{

View File

@@ -6,12 +6,22 @@
#define T_CANCEL "<22><EFBFBD><E2ACA5>"
#define T_OPEN_DIR "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>"
#define T_RUN "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>"
#define T_SPEED_TEST "<22><><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define FILE_SAVED_AS "'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD> %s' -Dt"
#define FILE_NOT_SAVED "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><EFBFBD><E8A8A1>! <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD>\n%s' -Et"
#define KB_RECEIVED "<22><><EFBFBD><EFBFBD> ᪠稢<E1AAA0><E7A8A2><EFBFBD><EFBFBD>: %i.%i M<> <20><><EFBFBD><EFBFBD><EFBFBD> (%i K<>/<EFBFBD>) "
#define T_NEW "<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#define T_SAVE_TO "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>:"
#define T_AUTOCLOSE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8A5AD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#define T_STATUS_READY "<22><><20> <20><><EFBFBD><EFBFBD><EFBFBD> ^_^ "
#define T_STATUS_DOWNLOADING "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>... %i.%i M<> <20><><EFBFBD><EFBFBD><EFBFBD> (%i K<>/<EFBFBD>) "
#define T_STATUS_COMPLETE "<22><><EFBFBD><EFBFBD><EFBFBD> <20>ᯥ譮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. "
#define T_STATUS_DL_P1 "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><><E4A0A9>... "
#define T_STATUS_DL_P2 " M<> <20><><EFBFBD><EFBFBD><EFBFBD> ("
#define T_STATUS_DL_P3 " K<>/<EFBFBD>) "
#define T_ERROR_TOO_MANY_REDIRECTS "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><>४⮢ (HTTP 3XX)' -Et"
#define T_FILE_SAVED_AS "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD> %s' -Dt"
#define T_FILE_NOT_SAVED "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><EFBFBD><E8A8A1>! <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E0A0AD> <20><><EFBFBD>\n%s' -Et"
#define T_ERROR_STARTING_DOWNLOAD "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪠稢<E1AAA0><E7A8A2><EFBFBD><EFBFBD>.\n<><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><E1AEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>୥⮬.' -E"
#define T_AUTOCLOSE "<22><><EFBFBD><E2AEA7><EFBFBD><EFBFBD>⨥"
char accept_language[]= "Accept-Language: ru\n";
#else
#define DL_WINDOW_HEADER "Download Manager"
@@ -19,20 +29,33 @@
#define T_CANCEL "Cancel"
#define T_OPEN_DIR " Show in folder "
#define T_RUN "Open file"
#define T_SPEED_TEST "Speed test"
#define FILE_SAVED_AS "'Download manager\nFile saved as %s' -Dt"
#define FILE_NOT_SAVED "'Download manager\nError! Can\96t save file as %s' -Et"
#define KB_RECEIVED "Downloading: %i.%i MB received (%i KB/s) "
#define T_NEW "New download"
#define T_SAVE_TO "Download to:"
#define T_AUTOCLOSE "Close this window when download completes"
#define T_STATUS_READY "Ready to download ^_^ "
#define T_STATUS_DOWNLOADING "Downloading... %i.%i MB received (%i KB/s) "
#define T_STATUS_COMPLETE "Download completed succesfully. "
#define T_STATUS_DL_P1 "Downloading... "
#define T_STATUS_DL_P2 " MB received ("
#define T_STATUS_DL_P3 " KB/s) "
#define T_ERROR_TOO_MANY_REDIRECTS "'Download manager\nToo many redirects' -Et"
#define T_FILE_SAVED_AS "'Download manager\nFile saved as %s' -Dt"
#define T_FILE_NOT_SAVED "'Download manager\nError! Can\96t save file as %s' -Et"
#define T_ERROR_STARTING_DOWNLOAD "'Error while starting download process.\nCheck entered path and Internet connection.' -E"
#define T_AUTOCLOSE "Autoclose"
char accept_language[]= "Accept-Language: en\n";
#endif
#define GAPX 15
#define WIN_W 540
#define WIN_H 100
#define WIN_W 526
#define WIN_H 195
#define GAPX 15
#define BUT_W 148
#define DEFAULT_SAVE_DIR "/tmp0/1/Downloads"
char save_dir[] = "/tmp0/1/Downloads";
char dl_shared[] = "DL";
#define URL_SPEED_TEST "http://speedtest.tele2.net/100MB.zip"
@@ -43,4 +66,9 @@ enum {
BTN_STOP,
BTN_DIR,
BTN_RUN,
BTN_NEW
};
#define PB_COL_ERROR 0xF55353
#define PB_COL_PROGRESS 0x297FFD
#define PB_COL_COMPLETE 0x74DA00

View File

@@ -7,21 +7,26 @@
#include "const.h"
bool exit_param = false;
bool open_file = false;
dword speed;
int redirect_count;
_http http;
checkbox autoclose = { T_AUTOCLOSE, false };
char uEdit[URL_SIZE];
char filepath[URL_SIZE+96];
char filepath[4096];
char save_dir[4096];
char* active_status;
progress_bar pb = {0, GAPX, 58, 380, 17, 0, NULL, NULL, 0xFFFfff, 0x74DA00, NULL};
edit_box ed = {WIN_W-GAPX-GAPX,GAPX,20,0xffffff,0x94AECE,0xffffff,0xffffff,
0x10000000, sizeof(uEdit)-2,#uEdit,0,ed_focus,19,19};
0x10000000, sizeof(uEdit)-2, #uEdit, 0, ed_focus + ed_always_focus, 19, 19};
progress_bar pb = {0, GAPX, 52, WIN_W - GAPX - GAPX, 17, 0, NULL, NULL,
0xFFFfff, 0, NULL};
void main()
@@ -30,16 +35,19 @@ void main()
load_dll(boxlib, #box_lib_init,0);
load_dll(libHTTP, #http_lib_init,1);
strcpy(#save_dir, DEFAULT_SAVE_DIR);
if (!dir_exists(#save_dir)) CreateDir(#save_dir);
SetCurDir(#save_dir);
sc.get();
InitDownload();
if (param) {
if (streqrp(#param, "-e ")) {
exit_param = true;
autoclose.checked = true;
param += 3;
}
if (streqrp(#param, "-eo ")) {
exit_param = true;
autoclose.checked = true;
open_file = true;
param += 4;
}
@@ -65,7 +73,7 @@ void main()
case evMouse: edit_box_mouse stdcall (#ed); break;
case evButton: ProcessButtonClick(@GetButtonID()); break;
case evKey: ProcessKeyPress(); break;
case evReDraw: DrawWindow(); break;
case evReDraw: DefineWindow(); break;
default: MonitorProgress();
}
}
@@ -73,11 +81,30 @@ void main()
void ProcessButtonClick(int id)
{
autoclose.click(id);
if (id==BTN_EXIT) { StopDownloading(); ExitProcess(); }
if (id==BTN_START) StartDownloading();
if (id==BTN_STOP) StopDownloading();
if (id==BTN_DIR) { RunProgram("/sys/File managers/Eolite", #filepath); ExitProcess(); }
if (id==BTN_RUN) { RunProgram("/sys/@open", #filepath); ExitProcess(); }
switch (id) {
case BTN_EXIT:
StopDownloading();
ExitProcess();
case BTN_START:
StartDownloading();
break;
case BTN_STOP:
StopDownloading();
InitDownload();
DrawWindow();
break;
case BTN_NEW:
InitDownload();
EditBox_UpdateText(#ed, ed_focus + ed_always_focus);
DrawWindow();
break;
case BTN_DIR:
RunProgram("/sys/File managers/Eolite", #filepath);
break;
case BTN_RUN:
RunProgram("/sys/@open", #filepath);
break;
}
}
void ProcessKeyPress()
@@ -85,33 +112,53 @@ void ProcessKeyPress()
@GetKey();
edit_box_key stdcall(#ed);
EAX >>= 16;
if (AL == SCAN_CODE_ENTER) StartDownloading();
if (AL == SCAN_CODE_ESC) StopDownloading();
if (AL == SCAN_CODE_ENTER) ProcessButtonClick(BTN_START);
if (AL == SCAN_CODE_ESC) ProcessButtonClick(BTN_STOP);
}
void DrawDlButton(int x, id, t)
{
DrawCaptButton(x, 102, BUT_W, 24, id, sc.button, sc.button_text, t);
}
void DefineWindow()
{
sc.get();
pb.frame_color = ed.border_color = ed.focus_border_color = sc.line;
DefineAndDrawWindow(110 + random(300), 100 + random(300), WIN_W+9,
WIN_H + 5 + skin_h, 0x34, sc.work, DL_WINDOW_HEADER, 0);
DrawWindow();
}
void DrawWindow()
{
sc.get();
pb.frame_color = sc.dark;
DefineAndDrawWindow(110 + random(300), 100 + random(300), WIN_W+9,
WIN_H + 5 + skin_h, 0x34, sc.work, DL_WINDOW_HEADER, 0);
#define BUT_Y 58;
//autoclose.draw(WIN_W-135, BUT_Y+6);
if (!http.transfer)
{
DrawStandartCaptButton(GAPX, BUT_Y, BTN_START, T_DOWNLOAD);
if (filepath)
{
DrawStandartCaptButton(GAPX+102, BUT_Y, BTN_DIR, T_OPEN_DIR);
DrawStandartCaptButton(GAPX+276, BUT_Y, BTN_RUN, T_RUN);
}
} else {
DrawStandartCaptButton(WIN_W - 120, BUT_Y, BTN_STOP, T_CANCEL);
if (!http.transfer) && (!filepath) {
DrawBar(GAPX, 102, WIN_W - GAPX - GAPX+1, 24+1, sc.work);
DeleteButton(BTN_DIR);
DeleteButton(BTN_NEW);
DrawDlButton(WIN_W-BUT_W/2, BTN_START, T_DOWNLOAD);
autoclose.disabled = false;
} else if (http.transfer) {
DrawDlButton(WIN_W-BUT_W/2, BTN_STOP, T_CANCEL);
DrawDownloadingProgress();
} else if (!http.transfer) && (filepath) {
autoclose.disabled = true;
DrawDlButton(GAPX, BTN_RUN, T_RUN);
DrawDlButton(WIN_W-BUT_W/2, BTN_DIR, T_OPEN_DIR);
DrawDlButton(WIN_W-BUT_W-GAPX, BTN_NEW, T_NEW);
}
//ed.offset=0; //DEL?
DrawEditBox(#ed);
WriteTextWithBg(GAPX, pb.top + 22, 0xD0, sc.work_text, active_status, sc.work);
DrawBar(GAPX, WIN_H - 58, WIN_W - GAPX - GAPX, 1, sc.light);
DrawBar(GAPX, WIN_H - 58 + 1, WIN_W - GAPX - GAPX, 1, sc.dark);
WriteText(GAPX, WIN_H - 48, 0x90, sc.work_text, T_SAVE_TO);
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #save_dir, sc.light);
edit_box_draw stdcall (#ed);
progressbar_draw stdcall(#pb);
autoclose.draw(GAPX, WIN_H - 24);
}
void StartDownloading()
@@ -119,34 +166,31 @@ void StartDownloading()
char get_url[URL_SIZE+33];
if (http.transfer > 0) return;
ResetDownloadSpeed();
filepath = '\0';
pb.back_color = 0xFFFfff;
if (!strncmp(#uEdit,"https:",6)) {
miniprintf(#get_url, "http://gate.aspero.pro/?site=%s", #uEdit);
//notify("'HTTPS for download is not supported, trying to download the file via HTTP' -W");
//miniprintf(#http_url, "http://%s", #uEdit+8);
//if (!downloader.Start(#http_url)) {
// notify("'Download failed.' -E");
// StopDownloading();
//}
} else {
strcpy(#get_url, #uEdit);
//miniprintf(#get_url, "http://gate.aspero.pro/?site=%s", #uEdit);
notify("'HTTPS for download temporary is not supported,\ntrying to download the file via HTTP' -W");
miniprintf(#uEdit, "http://%s", #uEdit+8);
}
strcpy(#get_url, #uEdit);
if (http.get(#get_url)) {
ed.border_color = 0xCACACA;
EditBox_UpdateText(#ed, ed_disabled);
pb.value = 0;
pb.progress_color = PB_COL_PROGRESS;
EditBox_UpdateText(#ed, ed_disabled);
DrawWindow();
} else {
pb.progress_color = PB_COL_ERROR;
notify(T_ERROR_STARTING_DOWNLOAD);
StopDownloading();
if (exit_param) ExitProcess();
EditBox_UpdateText(#ed, ed_focus + ed_always_focus);
DrawWindow();
}
}
void DrawDownloadingProgress()
{
char bytes_received[70];
char received_status[70];
dword gotkb = http.content_received/1024;
EDI = http.content_received / 100;
@@ -156,8 +200,20 @@ void DrawDownloadingProgress()
pb.max = http.content_length / 100;
progressbar_draw stdcall(#pb);
CalculateDownloadSpeed();
sprintf(#bytes_received, KB_RECEIVED, gotkb/1024, gotkb%1024/103, speed);
WriteTextWithBg(GAPX, pb.top + 22, 0xD0, sc.work_text, #bytes_received, sc.work);
//sprintf gets too much space
//sprintf(#received_status, T_STATUS_DOWNLOADING, gotkb/1024, gotkb%1024/103, speed);
strcpy(#received_status, T_STATUS_DL_P1);
strcat(#received_status, itoa(gotkb/1024));
strcat(#received_status, ".");
strcat(#received_status, itoa(gotkb%1024/103));
strcat(#received_status, T_STATUS_DL_P2);
strcat(#received_status, itoa(speed));
strcat(#received_status, T_STATUS_DL_P3);
active_status = #received_status;
WriteTextWithBg(GAPX, pb.top + 22, 0xD0, sc.work_text, active_status, sc.work);
}
void StopDownloading()
@@ -165,10 +221,16 @@ void StopDownloading()
http.stop();
if (http.content_pointer) http.content_pointer = free(http.content_pointer);
http.content_received = http.content_length = 0;
}
ed.border_color = 0xFFFfff;
EditBox_UpdateText(#ed, ed_focus);
DrawWindow();
void InitDownload()
{
pb.value = 0;
pb.back_color = sc.light;
pb.progress_color = PB_COL_PROGRESS;
filepath = '\0';
active_status = T_STATUS_READY;
redirect_count = 0;
}
void MonitorProgress()
@@ -182,18 +244,34 @@ void MonitorProgress()
DrawDownloadingProgress();
} else {
if (http.status_code >= 300) && (http.status_code < 400) {
redirect_count++;
if (redirect_count >= 5) {
notify(T_ERROR_TOO_MANY_REDIRECTS);
ProcessButtonClick(BTN_STOP);
EditBox_UpdateText(#ed, ed_focus + ed_always_focus);
return;
}
http.header_field("location", #redirect_url, URL_SIZE);
get_absolute_url(#redirect_url, #uEdit);
edit_box_set_text stdcall (#ed, #redirect_url);
StopDownloading();
StartDownloading();
return;
} else {
CompleteDownload();
}
}
}
void CompleteDownload()
{
SaveFile(0);
if (exit_param) ExitProcess();
if (autoclose.checked) ExitProcess();
pb.value = pb.max;
pb.progress_color = PB_COL_COMPLETE;
StopDownloading();
active_status = T_STATUS_COMPLETE;
DrawWindow();
}
}
void SaveFile(int attempt)
@@ -202,8 +280,9 @@ void SaveFile(int attempt)
char notify_message[4296];
char file_name[URL_SIZE+96];
strcpy(#filepath, #save_dir);
chrcat(#filepath, '/');
chrcat(#filepath, '/'); ///need to check the last symbol
if (attempt > 9) {
notify("'Too many saving attempts' -E");
@@ -238,12 +317,13 @@ void SaveFile(int attempt)
}
if (CreateFile(http.content_received, http.content_pointer, #filepath)==0) {
miniprintf(#notify_message, FILE_SAVED_AS, #filepath);
miniprintf(#notify_message, T_FILE_SAVED_AS, #filepath);
} else {
miniprintf(#notify_message, FILE_NOT_SAVED, #filepath);
miniprintf(#notify_message, T_FILE_NOT_SAVED, #filepath);
}
if (!exit_param) notify(#notify_message);
if (!autoclose.checked) notify(#notify_message);
if (!strcmpi(#filepath+strlen(#filepath)-4, ".zip"))
|| (!strcmpi(#filepath+strlen(#filepath)-3, ".7z")) {
@@ -257,11 +337,12 @@ void SaveFile(int attempt)
void Unarchive(dword _arc)
{
char folder_name[4096];
strcpy(#folder_name, "/tmp0/1/Downloads/");
strcpy(#folder_name, #save_dir);
strcpy(#folder_name, #filepath+strrchr(#filepath, '/'));
folder_name[strlen(#folder_name)-4] = '\0';
CreateDir(#folder_name);
//miniprintf2(#param, "-o \"%s\" -h \"%s", #folder_name, #filepath);
strcpy(#param, "-o \"");
strcat(#param, #folder_name);
strcat(#param, "\" -h \"");

View File

@@ -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.29"
#define TITLE_EOLITE "Eolite File Manager 5.29"
#define TITLE_KFM "Kolibri File Manager 2.29";
#define MEMSIZE 1024 * 250
#include "../lib/clipboard.h"
@@ -195,6 +195,8 @@ void main()
handle_param();
kfont.init(DEFAULT_FONT);
SystemDiscs.Get();
OpenDir(ONLY_OPEN);
llist_copy(#files_inactive, #files);
@@ -239,6 +241,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 +542,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);
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 +596,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 +651,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 +1111,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 +1125,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 +1183,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);

View File

@@ -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

View File

@@ -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"

View File

@@ -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;
}

View File

@@ -175,8 +175,10 @@ void properties_dialog()
break;
case evMouse:
if (!apply_question_active) {
edit_box_mouse stdcall (#file_name_ed);
edit_box_mouse stdcall (#path_to_file_ed);
}
break;
case evKey:

View File

@@ -7,11 +7,11 @@ edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x100000
#path_start,0, 100000000000010b,0,0};
more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL };
more_less_box line_height = { NULL, 16, 64, LIST_LINE_HEIGHT };
more_less_box line_height = { NULL, 18, 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);
@@ -132,7 +134,6 @@ void LoadIniSettings()
Form.height = ini.GetInt("WinH", efm*100+517);
ini.GetString("DefaultPath", #path_start, 4096, "/sys");
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
kfont.init(DEFAULT_FONT);
ini_get_str stdcall ("/sys/SETTINGS/SYSTEM.INI", "system", "font smoothing",#temp,4096,"on");
if(streq(#temp,"off")) kfont.smooth = false; else kfont.smooth = true;
}
@@ -141,7 +142,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);

View File

@@ -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")

View File

@@ -1,4 +0,0 @@
@del kf_view
@C-- font_viewer.c
@rename font_viewer.com kf_view
if not exist kf_view ( @pause )

View File

@@ -13,7 +13,6 @@ struct collection_int
dword buf;
dword buf_size;
unsigned count;
void alloc();
void add();
dword get();
dword set();
@@ -22,34 +21,29 @@ struct collection_int
dword get_last();
void pop();
void drop();
#define DWSIZE4 4
};
:void collection_int::alloc() {
if (!buf) {
buf_size = 4096;
buf = malloc(4096);
} else {
buf_size += 4096;
:void collection_int::add(dword _in) {
unsigned i;
if (!buf) || (count + 1 * DWSIZE4 >= buf_size) {
buf_size += 4096 * 5;
buf = realloc(buf, buf_size);
}
}
:void collection_int::add(dword _in) {
if (!buf) || (count * sizeof(dword) >= buf_size) alloc();
EAX = count * sizeof(dword) + buf;
ESDWORD[EAX] = _in;
i = count * DWSIZE4 + buf;
ESDWORD[i] = _in;
count++;
}
:dword collection_int::get(dword pos) {
if (pos<0) || (pos>=count) return 0;
return ESDWORD[pos * sizeof(dword) + buf];
if (!buf) || (pos<0) || (pos>=count) return 0;
return ESDWORD[pos * DWSIZE4 + buf];
}
:dword collection_int::set(dword pos, _in) {
while (pos >= count) add(0);
EAX = pos * sizeof(dword) + buf;
EAX = pos * DWSIZE4 + buf;
ESDWORD[EAX] = _in;
return ESDWORD[EAX];
}
@@ -57,8 +51,8 @@ struct collection_int
:void collection_int::swap(dword pos1, pos2) {
while (pos1 >= count) add(0);
while (pos2 >= count) add(0);
EAX = pos1 * sizeof(dword) + buf;
EBX = pos2 * sizeof(dword) + buf;
EAX = pos1 * DWSIZE4 + buf;
EBX = pos2 * DWSIZE4 + buf;
ESDWORD[EAX] >< ESDWORD[EBX];
}
@@ -77,6 +71,8 @@ struct collection_int
:void collection_int::drop() {
count = 0;
//if (buf) buf = free(buf);
//buf_size = 0;
}
/*========================================================
@@ -87,46 +83,38 @@ struct collection_int
struct collection
{
int realloc_size, count;
unsigned int realloc_size, count;
dword data_start;
dword data_size;
collection_int offset;
int add();
int addn();
dword add();
dword get(); //get_name_by_pos
dword get_pos_by_name();
void drop();
void increase_data_size();
dword get_last();
bool pop();
};
:void collection::increase_data_size() {
if (realloc_size<4096) realloc_size = 4096;
if (!data_size) {
data_size = realloc_size;
data_start = malloc(realloc_size);
:dword collection::add(dword in) {
dword len = strlen(in);
unsigned cur_buf_size;
if (!count) {
cur_buf_size = 0;
} else {
cur_buf_size = offset.get(count);
}
else {
data_size = data_size + realloc_size;
if (realloc_size<4096) realloc_size = 4096;
while (cur_buf_size + len + 4 > data_size) {
data_size += realloc_size;
data_start = realloc(data_start, data_size);
}
}
:int collection::add(dword in) {
return addn(in, strlen(in));
}
:int collection::addn(dword in, len) {
if (offset.get(count)+len+2 > data_size) {
increase_data_size();
addn(in, len);
return 1;
}
strncpy(data_start+offset.get(count), in, len);
strncpy(data_start+cur_buf_size, in, len);
count++;
offset.set(count, offset.get(count-1) + len + 1);
return 1;
offset.set(count, cur_buf_size + len + 1);
return data_start + cur_buf_size;
}
:dword collection::get(dword pos) {
@@ -141,7 +129,9 @@ struct collection
:dword collection::get_pos_by_name(dword name) {
dword i;
for (i=0; i<count; i++) {
if (strcmp(data_start + offset.get(i), name)==0) return i;
if (streq(data_start + offset.get(i), name)) {
return i;
}
}
return -1;
}

View File

@@ -17,17 +17,25 @@ struct CANVAS {
void Show();
void Fill();
void DrawBar();
void DrawImage();
void WriteText();
void PutPixel();
void AlignCenter();
void AlignRight();
void IncreaseBufSize();
bool BufIsInvalid();
};
char draw_buf_not_enaught_ram[] =
"'CANVAS requested %i MB more memory than the system has.
Application could be unstable.' -E";
bool CANVAS::BufIsInvalid()
{
if (!buf_data) || (!bufw) return true;
return false;
}
bool CANVAS::Init(dword i_bufx, i_bufy, i_bufw, i_bufh)
{
bufx = i_bufx;
@@ -45,6 +53,7 @@ bool CANVAS::Init(dword i_bufx, i_bufy, i_bufw, i_bufh)
void CANVAS::Fill(dword start_pointer, i_fill_color)
{
dword max_i = bufw * bufh * 4 - start_pointer/4;
if (BufIsInvalid()) return;
fill_color = i_fill_color | 0xFF000000; //set background color non-transparent
@MEMSETD(buf_data+start_pointer+8, max_i, fill_color);
}
@@ -52,6 +61,7 @@ void CANVAS::Fill(dword start_pointer, i_fill_color)
void CANVAS::DrawBar(dword x, y, w, h, color)
{
dword i, j;
if (BufIsInvalid()) return;
if (y + h >= bufh) IncreaseBufSize();
for (j=0; j<h; j++) {
for (i = y+j*bufw+x<<2+8+buf_data; i<y+j*bufw+x+w<<2+8+buf_data; i+=4) {
@@ -60,12 +70,30 @@ void CANVAS::DrawBar(dword x, y, w, h, color)
}
}
void CANVAS::DrawImage(dword x, y, w, h, img)
{
dword i, j, p=0;
dword ystart;
if (BufIsInvalid()) return;
if (y < 0) y = 0;
if (x < 0) x = 0;
while (y + h >= bufh) IncreaseBufSize(); //WHY NOT WORKING?
for (j=0; j<h; j++) {
ystart = y + j * bufw + x;
for (i = ystart<<2+8+buf_data; i<ystart+w<<2+8+buf_data; i+=4) {
ESDWORD[i] = ESDWORD[img+p];
p+=4;
}
}
}
void CANVAS::WriteText(dword x, y, byte fontType, dword color, str_offset, strlen)
{
#define BUGFIX_32000 32000
dword ydiv=0;
dword reserve_data_1, reserve_data_2;
dword new_buf_offset;
if (BufIsInvalid()) return;
if (y + 30 >= bufh) IncreaseBufSize();
if (y < BUGFIX_32000) {
ESI = strlen;
@@ -92,6 +120,7 @@ void CANVAS::WriteText(dword x, y, byte fontType, dword color, str_offset, strle
void CANVAS::PutPixel(dword x, y, color)
{
dword pos = y*bufw+x*4+8+buf_data;
if (BufIsInvalid()) return;
ESDWORD[pos] = color;
}
@@ -99,6 +128,7 @@ void CANVAS::AlignRight(dword x,y,w,h, content_width)
{
dword i, j, l;
dword content_left = w - content_width / 2;
if (BufIsInvalid()) return;
for (j=0; j<h; j++)
{
for (i=j*w+w-x*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
@@ -112,6 +142,7 @@ void CANVAS::AlignCenter(dword x,y,w,h, content_width)
{
dword i, j, l;
dword content_left = w - content_width / 2;
if (BufIsInvalid()) return;
for (j=0; j<h; j++)
{
for (i=j*w+content_width+content_left*4, l=j*w+content_width+x*4; (i>=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
@@ -123,6 +154,7 @@ void CANVAS::AlignCenter(dword x,y,w,h, content_width)
void CANVAS::Show(dword _y_offset, _h)
{
if (BufIsInvalid()) return;
PutPaletteImage(_y_offset * bufw * 4 + buf_data+8, bufw, _h, bufx, bufy, 32, 0);
}
@@ -133,6 +165,8 @@ void CANVAS::IncreaseBufSize()
dword free_ram_size;
char error_str[256];
if (!bufw) return;
if (!buf_data) {
alloc_size = bufh * bufw * 4 + 8;
buf_data = malloc(alloc_size);

View File

@@ -57,8 +57,8 @@ inline fastcall void utf8rutodos( ESI)
while (BL=ESBYTE[ESI])
{
if (BL == 0xD0) || (BL == 0xD1) EDI--;
else if (BL == 0x81) && (ESBYTE[ESI-1]==0xD0) ESBYTE[EDI] = 0xF0; //<EFBFBD>
else if (BL == 0x91) && (ESBYTE[ESI-1]==0xD1) ESBYTE[EDI] = 0xF1; //<EFBFBD>
else if (BL == 0x81) && (ESBYTE[ESI-1]==0xD0) ESBYTE[EDI] = 0xF0; //I urk
else if (BL == 0x91) && (ESBYTE[ESI-1]==0xD1) ESBYTE[EDI] = 0xF1; //i urk
//0xE2 0x80 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if (BL == 0xE2) && (ESBYTE[ESI+1]==0x80)
switch (ESBYTE[ESI+2])

View File

@@ -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);

View File

@@ -202,7 +202,7 @@ struct proc_info
byte reserved[1024-71];
};
:void GetProcessInfo(dword _process_struct_pointer, _process_id)
:int GetProcessInfo(dword _process_struct_pointer, _process_id)
{
EAX = 9;
EBX = _process_struct_pointer;

View File

@@ -70,17 +70,17 @@ char aURIunescape[] = "unescape";
#define FLAG_TRANSFER_FAILED 1 << 20
struct http_msg{
dword socket;
dword flags;
dword write_ptr;
dword buffer_length;
dword chunk_ptr;
dword timestamp;
dword status;
dword header_length;
dword content_ptr;
dword content_length;
dword content_received;
dword socket; //socket on which the actual transfer happens
dword flags; //flags, reflects status of the transfer using bitflags
dword write_ptr; //internal use only (where to write new data in buffer)
dword buffer_length; //internal use only (number of available bytes in buffer)
dword chunk_ptr; //internal use only (where the next chunk begins)
dword timestamp; //internal use only (when last data was received)
dword status; //HTTP status
dword header_length; //length of HTTP header
dword content_ptr; //ptr to content
dword content_length; //total length of HTTP content
dword content_received; //number of currently received content bytes
char http_header;
};

View File

@@ -30,7 +30,7 @@ enum {
proc_info Process;
for (i=0; i<MAX_PROCESS_COUNT; i++)
{
GetProcessInfo(#Process, i);
if (i > GetProcessInfo(#Process, i)) break;
if (Process.status_slot != TSTATE_FREE)
&& (strcmpi(#Process.name, proc_name)==0)
{
@@ -45,7 +45,7 @@ enum {
proc_info Process;
for (i=0; i<MAX_PROCESS_COUNT; i++)
{
GetProcessInfo(#Process, i);
if (i > GetProcessInfo(#Process, i)) break;
if (Process.status_slot != TSTATE_FREE)
&& (strcmpi(#Process.name, proc_name)==0)
count++;
@@ -64,9 +64,8 @@ enum {
GetProcessInfo(#Self, -1);
for (i=0; i<MAX_PROCESS_COUNT; i++)
{
GetProcessInfo(#Process, i);
if (i > GetProcessInfo(#Process, i)) break;
if (Process.name)
&& (!streq(#Process.name, "OS"))
&& (Process.ID != Self.ID)
KillProcess(Process.ID);
}

View File

@@ -273,7 +273,7 @@ void draw_list()
}
init = false;
if (selected) WriteText(5, selected-1*ITEM_H + menu1.y + menu1.text_y, TEXT_FONT_TYPE, 0xEE0000, "\x10"); // ?
if (selected) WriteText(5, selected-1*ITEM_H + menu1.y + menu1.text_y +3, 0x80, 0xEE0000, "\x10"); // ?
}
void click()

View File

@@ -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:

View File

@@ -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,11 +53,10 @@ 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/");
@@ -69,6 +64,11 @@ void main()
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;
list.y = 32;
@@ -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);
@@ -114,37 +114,14 @@ void main()
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);
}
}

View File

@@ -23,11 +23,8 @@ MAX_TRIANGLES equ 12
SCREEN_X equ 320
SCREEN_Y equ 200
include 'lang.inc'
include '..\..\..\macros.inc'
;purge mov
include 'ascl.inc'
include 'ascgl.inc'
START:
init_sin_cos:
@@ -65,7 +62,47 @@ still:
; cmp eax,3 ; button in buffer ?
jz button
fps 220,8,cl_White,cl_Black
; FPS - Set Frame Per Second Display
fps_show_frequency=40
macro fps x,y,color,delcolor
{
local spdat,savetime,new_time,fps,fps_cntr,out_fps,new_time,ttt
local no_out_fps
jmp spdat
savetime dd 0
fps_cntr dd 0
fps dd 0
ttt dd 0
spdat:
get_time:
mov eax,3
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
cmp dword [ttt],0
je out_fps
dec dword [ttt]
jmp no_out_fps
new_time:
mov [savetime],eax
mov ebx,[fps_cntr]
mov [fps],ebx
mov [fps_cntr],0
out_fps:
mov dword [ttt],fps_show_frequency
mov eax,47
mov ebx,5*65536
mov edx,(x+1)*65536+y
mov esi,color+0xD0000000
mov edi,delcolor
mov ecx,[fps]
mcall
no_out_fps:
}
fps 220,5,0x00FFFfff,0x00000000
main_loop:
@@ -114,8 +151,8 @@ draw_window:
mcall 48, 4
lea ecx, [100*65536+SCREEN_Y+4+eax]; [y start] *65536 + [y size] + [skin_height]
xor eax, eax ;Draw window
lea ecx,[100*65536+SCREEN_Y+4+eax]; [y start] *65536 + [y size] + [skin_height]
xor eax,eax ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov edx,0x54000000 ;0x03 use skinned window
mov edi,title

View File

@@ -3,5 +3,4 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DCUBE2.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")
tup.rule({"3DCUBE2.ASM"}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")

View File

@@ -1,624 +0,0 @@
lang equ ru_RU
;
; Assembler
; SMALL
; CODE
; Graphics
; Libary
;
; Ver 0.10 By Pavlushin Evgeni (RUSSIA)
; www.waptap@mail.ru
;InfoList
;0.01 LoadImage
;0.02 SetBmp
;0.03 Bmptoimg, Setimg ~01.03.2004
;0.04 Bug deleted, copyimg ~03.05.2004
;0.05 fullimg, collimg ~05.05.2004
;0.06 getimg ~09.05.2004
;0.07 convbmp ~13.05.2004
;0.08 fps ~14.05.2004
;0.09 drawfbox ~03.06.2004
;0.10 all macros optimized by halyavin, add at ~07.06.2004
;DrawBox
macro drawfbox x,y,xs,ys,color
{
mov ecx,y
mov ebx,x
shl ebx,16
add ebx,xs
shl ecx,16
add ecx,ys
mov edx,color
mov eax,13
mcall
}
; FPS - Set Frame Per Second Display
fps_show_frequency=40
macro fps x,y,color,delcolor
{
local spdat,savetime,new_time,fps,fps_cntr,out_fps,new_time,ttt
local no_out_fps
jmp spdat
savetime dd 0
fps_cntr dd 0
fps dd 0
ttt dd 0
spdat:
get_time:
mov eax,3
mcall
cmp eax,[savetime]
jne new_time
inc [fps_cntr]
cmp dword [ttt],0
je out_fps
dec dword [ttt]
jmp no_out_fps
new_time:
mov [savetime],eax
mov ebx,[fps_cntr]
mov [fps],ebx
mov [fps_cntr],0
out_fps:
if ~(delcolor eq )
mov ebx,x*65536+30
mov ecx,y*65536+7
mov edx,delcolor
mov eax,13
mcall
end if
mov dword [ttt],fps_show_frequency
mov eax,47
mov ebx,5*65536
; mov bl,0
mov edx,x*65536+y
mov esi,color
mov ecx,[fps]
mcall
no_out_fps:
}
; COLLIMG - Collusion image's
_ldbounce_count=0;
macro collimg img1_off,x1,y1,img2_off,x2,y2,otv
{
local bounce,exit,_1dbounce,anot,bc,nbc
mov esi,[img1_off] ;xs1
mov edi,[img2_off] ;ys2
mov eax,x1 ;
mov ebx,x2 ;
call _1dbounce
mov edx,ecx
mov esi,[img1_off+4] ;ys1
mov edi,[img2_off+4] ;ys2
mov eax,y1 ;
mov ebx,y2 ;
call _1dbounce
add edx,ecx
cmp edx,2
je bounce
mov otv,0
jmp exit
_ldbounce_count=_ldbounce_count+1
if (_ldbounce_count = 1)
_1dbounce:
cmp ebx,eax
jnae anot
add eax,esi
cmp eax,ebx
jna nbc
jmp bc
anot:
add ebx,edi
cmp ebx,eax
jna nbc
bc:
mov ecx,1
ret
nbc:
mov ecx,0
ret
end if
bounce:
mov otv,1
exit:
}
; SETBMP - Set bmp to window
; (SYNTAX) SETBMP dd xstart ,dd ystart ,BMP_offset,dd soi
; (SAMPLE) SETBMP dword [xt],dword [yt],I_END,dword [tsoi]
; SETBMP 15,10,I_END,dword [tsoi]
; ( NOTE ) SOI - Start of image
macro setbmp arg1,arg2,arg3,arg4
{
local nodi
cmp word [arg3],word 'BM'
jne nodi
mov eax,7
mov ebx,arg4 ;[soi]
mov ecx,dword [arg3+18]
shl ecx,16
add ecx,dword [arg3+22]
if (arg1 eqtype 0) & (arg2 eqtype 0)
mov edx,arg1*65536+arg2
else
mov edx,arg1
shl edx,16
add edx,arg2
end if
mcall
nodi:
}
macro setimg arg1,arg2,arg3
{
local nodi
mov eax,7
mov ebx,arg3
add ebx,8
mov ecx,dword [arg3]
shl ecx,16
add ecx,dword [arg3+4]
if (arg1 eqtype 0) & (arg2 eqtype 0)
mov edx,arg1*65536+arg2
else
mov edx,arg1
shl edx,16
add edx,arg2
end if
mcall
}
;Not optimiz
macro getimg imgsrc,x,y,xs,ys,imgdest
{
local cyc
mov eax,xs
mov dword [imgdest],eax
mov eax,ys
mov dword [imgdest+4],eax
mov eax,dword [imgsrc] ;getx size
mov edi,eax
mov ebx,y
mul ebx
add eax,x
mov ebx,3
mul ebx ;eax=offset on imsrc
mov ecx,0
mov ebx,0
mov ebp,eax
mov esi,0
add esi,8
add ebp,8
cyc:
mov al,byte [imgsrc+ebp]
mov [imgdest+esi],al
mov al,byte [imgsrc+ebp+1]
mov [imgdest+esi+1],al
mov al,byte [imgsrc+ebp+2]
mov [imgdest+esi+2],al
add esi,3
add ebp,3
inc ecx
cmp ecx,xs
jne cyc
add ebp,edi
add ebp,edi
add ebp,edi
sub ebp,xs
sub ebp,xs
sub ebp,xs
mov ecx,0
inc ebx
cmp ebx,ys
jne cyc
}
;
macro bmptoimg bmp_off,soi,img_off
{
local nodix,conv
cmp word [bmp_off],word 'BM'
jne nodix
mov eax,dword [bmp_off+18]
mov ebx,dword [bmp_off+22]
mov dword [img_off],eax
mov dword [img_off+4],ebx
mul ebx
lea ecx,[eax+2*eax]
lea edi,[img_off+8]
mov esi,dword [soi]
cld
rep movsb
nodix:
}
macro copyimg img2_off,img1_off
{
local cop
mov eax,dword [img1_off]
mov ebx,dword [img1_off+4]
mul ebx
lea ecx,[eax+2*eax]
lea esi,[img1_off+8]
lea edi,[img2_off+8]
cld
rep movsb
}
macro fullimg img_off,xs,ys,color
{
local cop
mov eax,xs
mov ebx,ys
mov dword [img_off],eax
mov dword [img_off+4],ebx
mul ebx
lea ebp,[eax+2*eax]
mov esi,color
if color eqtype 0
mov ecx,color/65536
else
mov ecx,esi
shr ecx,16
end if
xor edi,edi
cop:
mov word [img_off+8+edi],si
add edi,2
mov byte [img_off+8+edi],cl
inc edi
cmp edi,ebp
jne cop
}
macro convbmp bmp_load_area,bmp_soi
{
local status,bps,dwps,soi,sop,eop,eos,process,fileinfo,string,end_bmp
local converttable,noaddelem,nextbit,convert1bpp,convert4bpp,convert2
local nextelem,convertno32,nomorestring,convert1,nextstring,yespicsize
local noaddword
;local qwe,bmpfn
; convert:
movzx eax,word [bmp_load_area+28]
mul dword [bmp_load_area+18]
mov ebx,32
div ebx
test edx,edx
je noaddword
inc eax
noaddword:
mov dword [dwps],eax ;dwps-doublewords per string
shl eax,2
mov dword [bps],eax ;bps-bytes per string
cmp dword [bmp_load_area+34],0
jne yespicsize ;if picture size is defined
mul dword [bmp_load_area+22]
mov dword [bmp_load_area+34],eax
yespicsize:
mov eax,bmp_load_area
mov ebx,eax
add ebx, [bmp_load_area+2];file size
inc ebx
mov dword [bmp_soi],ebx ;soi-start of image area for drawing
add eax, [bmp_load_area+10]
mov dword [sop],eax ;sop-start of picture in file
add eax, [bmp_load_area+34]
mov dword [eop],eax ;eop-end of picture in file
mov eax, [bmp_load_area+18]
lea eax,[eax+2*eax] ;3x pixels in eax
mov edi,dword [bmp_soi] ;initializing
mov esi,dword [eop]
sub esi,dword [bps]
nextstring:
push edi
cmp word [bmp_load_area+28],24
jne convertno32
mov ecx,[dwps]
cld
rep movsd
convert1:
pop edi
sub esi,dword [bps]
sub esi,dword [bps]
cmp esi,dword [sop]
jb end_bmp;nomorestring
add edi,eax
jmp nextstring
; nomorestring:
; jmp end_bmp
convertno32:
mov ebx,bmp_load_area
add ebx, [bmp_load_area+14]
add ebx,14 ;start of color table
push esi
add esi,dword [bps]
mov dword [eos],esi
pop esi
nextelem:
push eax
movzx eax,byte [esi]
cmp word [bmp_load_area+28],4
je convert4bpp
cmp word [bmp_load_area+28],1
je convert1bpp
call converttable
convert2:
pop eax
inc esi
cmp esi,dword [eos]
jae convert1
add edi,3
jmp nextelem
convert4bpp:
shl ax,4
shr al,4
push ax
movzx eax,ah
call converttable
add edi,3
pop ax
movzx eax,al
call converttable
jmp convert2
convert1bpp:
mov ecx,eax
mov edx,7
nextbit:
xor eax,eax
bt ecx,edx
jnc noaddelem
inc eax
noaddelem:
push edx
call converttable
pop edx
dec edx
cmp edx,0xffffffff
je convert2
add edi,3
jmp nextbit
converttable:
shl eax,2
add eax,ebx
mov edx, dword [eax]
mov dword [edi],edx
ret
; DATA AREA
;status dd 0 ;bit0=1 if file thread is created
bps dd 0
dwps dd 0
;soi dd 0
sop dd 0
eop dd 0
eos dd 0
;process dd 0
end_bmp:
; mov eax,dword [soi]
; mov dword [bmp_soi],eax
}
; LOADBMP - Load bmp image from file
; (SYNTAX) LOADBMP 'file_path',temp_area(rb 0x10000),load_area,dd soi
; (SAMPLE) LOADBMP '/sys/menuet.bmp',temp_area,I_END,tsoi
; ( NOTE ) Macros create on Base of
; Picture browser by lisovin@26.ru & Ivan Poddubny
; SOI - Start of image
macro loadbmp bmp_file_name,bmp_temp_area,bmp_load_area,bmp_soi
{
local status,bps,dwps,soi,sop,eop,eos,process,fileinfo,string,end_bmp
local converttable,noaddelem,nextbit,convert1bpp,convert4bpp,convert2
local nextelem,convertno32,nomorestring,convert1,nextstring,yespicsize
local noaddword
;local qwe,bmpfn
mov dword [fileinfo+8],1 ; how many blocks to read (1)
mov eax,58
mov ebx,fileinfo
mcall
mov eax,[bmp_load_area+2]
shr eax,9 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 512 <20> <20><EFBFBD><E0A8A1><EFBFBD><EFBFBD> 1 - <20><><EFBFBD><EFBFBD><20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
inc eax
mov dword [fileinfo+8],eax
mov eax,58
mov ebx,fileinfo
mcall
; jmp qwe
;bmpfn db bmp_file_name
;qwe:
; mov eax,6
; mov ebx,bmpfn
; mov ecx,0
; mov edx,0xFFFFFF
; mov esi,bmp_load_area
; mov edi,0
; mcall
; convert:
movzx eax,word [bmp_load_area+28]
mul dword [bmp_load_area+18]
mov ebx,32
div ebx
test edx,edx
je noaddword
inc eax
noaddword:
mov dword [dwps],eax ;dwps-doublewords per string
shl eax,2
mov dword [bps],eax ;bps-bytes per string
cmp dword [bmp_load_area+34],0
jne yespicsize ;if picture size is defined
mul dword [bmp_load_area+22]
mov dword [bmp_load_area+34],eax
yespicsize:
mov eax,bmp_load_area
push eax
add eax, [bmp_load_area+2];file size
inc eax
mov dword [soi],eax ;soi-start of image area for drawing
pop eax
add eax, [bmp_load_area+10]
mov dword [sop],eax ;sop-start of picture in file
add eax, [bmp_load_area+34]
mov dword [eop],eax ;eop-end of picture in file
mov eax, [bmp_load_area+18]
mov ebx,3
mul ebx ;3x pixels in eax
mov edi,dword [soi] ;initializing
mov esi,dword [eop]
sub esi,dword [bps]
nextstring:
push edi
cmp word [bmp_load_area+28],24
jne convertno32
mov ecx,[dwps]
cld
rep movsd
convert1:
pop edi
sub esi,dword [bps]
sub esi,dword [bps]
cmp esi,dword [sop]
jb nomorestring
add edi,eax
jmp nextstring
nomorestring:
jmp end_bmp
convertno32:
mov ebx,bmp_load_area
add ebx, [bmp_load_area+14]
add ebx,14 ;start of color table
push esi
add esi,dword [bps]
mov dword [eos],esi
pop esi
nextelem:
push eax
movzx eax,byte [esi]
cmp word [bmp_load_area+28],4
je convert4bpp
cmp word [bmp_load_area+28],1
je convert1bpp
call converttable
convert2:
pop eax
inc esi
cmp esi,dword [eos]
jae convert1
add edi,3
jmp nextelem
convert4bpp:
shl ax,4
shr al,4
push ax
movzx eax,ah
call converttable
add edi,3
pop ax
movzx eax,al
call converttable
jmp convert2
convert1bpp:
mov ecx,eax
mov edx,7
nextbit:
xor eax,eax
bt ecx,edx
jnc noaddelem
inc eax
noaddelem:
push edx
call converttable
pop edx
dec edx
cmp edx,0xffffffff
je convert2
add edi,3
jmp nextbit
converttable:
shl eax,2
add eax,ebx
mov edx, dword [eax]
mov dword [edi],edx
ret
; DATA AREA
;status dd 0 ;bit0=1 if file thread is created
bps dd 0
dwps dd 0
soi dd 0
sop dd 0
eop dd 0
eos dd 0
;process dd 0
; DATA AREA
fileinfo:
dd 0
dd 0
dd 1 ;number of blocks of 512 bytes
dd bmp_load_area
dd bmp_temp_area
string:
db bmp_file_name,0
db ' '
db ' '
db ' '
db ' ',0
end_bmp:
mov eax,dword [soi]
mov dword [bmp_soi],eax
}

View File

@@ -1,499 +0,0 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler
; SMALL
; CODE
; Libary
;
; Ver 0.09 By Pavlushin Evgeni (RUSSIA)
; www.waptap@mail.ru
;InfoList
;0.01 scank,putpix,puttxt
;0.02 label,random,colors
;0.03 window,startwd,endwd,attributes
;0.04 close,delay,scevent ~30.04.2004
;0.05 small random, ~04.05.2004
;0.06 wtevent ~09.05.2004
;0.07 timeevent ~23.05.2004
;0.08 txtput ~14.06.2004
;0.09 opendialog,savedialog ~20.06.2004
macro opendialog redproc,openoff,erroff,path,testtime
{
local still, dlg_file, clip_file, redwait
local button, key, red, zzz, still, zzz2, incf, file_is_open, zzz3
mov ecx,200
zzz3:
mov byte [path+ecx-1],0
loop zzz3
dec byte [clip_file+7]
incf:
inc byte [clip_file+7]
mov eax,6
mov ebx,clip_file
mov ecx,0
or edx,-1
mov esi,path
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
jne incf
mov ecx,200
zzz2:
mov byte [path+ecx],0
loop zzz2
mov ebx,clip_file
mov ecx,path
mov edx,100
mov esi,0
mov eax,33
mcall
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
mcall
still:
scevent red,key,button
cmp byte [path],0
jne file_is_open
cmp dword [redwait],testtime ;20
jnae zzz
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
zzz:
delay 5
inc dword [redwait]
jmp still
file_is_open:
mov eax,32
mov ebx,clip_file
mcall
jmp openoff
key: ; key
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
mcall
red:
call redproc
jmp still
dlg_file db 'SYSXTREE '
clip_file db 'OPENCLPACLP'
db 'O' ;Dialog type O-open S-save
db 0 ;Marker
redwait dd 0
}
macro savedialog redproc,openoff,erroff,path,testtime
{
local still, dlg_file, clip_file, redwait, zzz3
local button, key, red, zzz, still, zzz2, incf, file_is_open
mov ecx,200
zzz3:
mov byte [path+ecx-1],0
loop zzz3
dec byte [clip_file+7]
incf:
inc byte [clip_file+7]
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp byte [clip_file+7],'Z'
je erroff
cmp eax,0xffffffff
jne incf
mov ecx,200
zzz2:
mov byte [path+ecx],0
loop zzz2
mov ebx,clip_file
mov ecx,path
mov edx,100
mov esi,0
mov eax,33
mcall
mov ebx,dlg_file
mov ecx,clip_file
mov eax,19
mcall
still:
scevent red,key,button
cmp byte [path],0
jne file_is_open
cmp dword [redwait],testtime ;20
jnae zzz
mov eax,6
mov ebx,clip_file
mov ecx,0
mov edx,-1
mov esi,path
mcall
cmp eax,0xffffffff
je erroff ;errexit
mov dword [redwait],0
zzz:
delay 5
inc dword [redwait]
jmp still
file_is_open:
mov eax,32
mov ebx,clip_file
mcall
jmp openoff
key: ; key
mcall ; read (eax=2)
jmp still
button: ; button
mov eax,17 ; get id
mcall
cmp ah,1 ; button id=1 ?
jne still
mov eax,-1 ; close this program
mcall
red:
call redproc
jmp still
dlg_file db 'SYSXTREE '
clip_file db 'SAVECLPACLP'
db 'S' ;Dialog type O-open S-save
db 0 ;Marker
redwait dd 0
}
; RANDOM - generate random count (small)
; (SYNTAX) RANDOM MaxCount,OutArgument
; (SAMPLE) RANDOM 10000,eax
; ( NOTE ) Maxint<65536 ; use random 65536,eax for more combinations
randomuse = 0
macro random arg1,arg2
{
local rxproc
randomuse = randomuse + 1
jmp rxproc
if defined randomuse & randomuse = 1
randomproc:
jmp rnj
rsx1 dw 0x4321
rsx2 dw 0x1234
rnj:
; mov eax,arg1
push bx
push cx
push dx
push si
push di
mov cx,ax
mov ax,word ptr rsx1
mov bx,word ptr rsx2
mov si,ax
mov di,bx
mov dl,ah
mov ah,al
mov al,bh
mov bh,bl
xor bl,bl
rcr dl,1
rcr ax,1
rcr bx,1
add bx,di
adc ax,si
add bx,0x62e9
adc ax,0x3619
mov word ptr rsx1,bx
mov word ptr rsx2,ax
xor dx,dx
cmp ax,0
je nodiv
cmp cx,0
je nodiv
div cx
nodiv:
mov ax,dx
pop di
pop si
pop dx
pop cx
pop bx
; mov arg2,0
; mov arg2,eax
ret
end if
rxproc:
mov eax,arg1
call randomproc
mov arg2,0
mov arg2,eax
}
macro scank
{
mov eax,10
mcall
}
macro putpix x,y,color
{
mov ebx,x
mov ecx,y
mov edx,color
mov eax,1
mcall
}
macro puttxt x,y,offs,size,color
{
mov ebx,x
shl ebx,16
add ebx,y
mov ecx,color
mov edx,offs
mov esi,size
mov eax,4
mcall
}
;_ equ '____'
;macro libtest x,y,color
;{
;if x = as dword
; mov ebx,x
;end if
; mov ecx,y
; mov edx,color
; mov eax,1
; mcall
;}
macro outcount data, x, y, color, numtype
{
mov ecx,data
mov ebx,numtype
mov bl,0
mov edx,x*65536+y
mov esi,color
mov eax,47
mcall
}
; SCEVENT - Scan event
macro scevent red,key,but
{
mov eax,11
mcall
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; WTEVENT - Wait event
macro wtevent red,key,but
{
mov eax,10
mcall
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; TIMEEVENT - Wite for event with timeout
macro timeevent xfps,noevent,red,key,but
{
mov eax,23
mov ebx,xfps
mcall
cmp eax,0
je noevent
dec eax
jz red
dec eax
jz key
dec eax
jz but
}
; CLOSE - Close program
macro close
{
mov eax,-1
mcall
}
; DELAY - Create delay 1/100 sec
; (SYNTAX) Delay time
; (SAMPLE) Delay 100 ;delay 2 sec 1/100*200=2 sec
macro delay arg1
{
mov eax,5
mov ebx,arg1
mcall
}
; WINDOW - Draw window
; (SYNTAX) WINDOW Xstart,Ystart,'Text',Color
; (SAMPLE) WINDOW 10,10,640+8,480+24,window_Skinned
macro window arg1,arg2,arg3,arg4,arg5
{
mov ebx,arg1*65536+arg3
mov ecx,arg2*65536+arg4
mov edx,arg5
mov eax,0
mcall
}
macro colorwindow arg1,arg2,arg3,arg4,arg5,arg6,arg7
{
mov ebx,arg1*65536+arg3
mov ecx,arg2*65536+arg4
mov edx,arg5
mov esi,arg6
mov edi,arg7
mov eax,0
mcall
}
; STARTWD - Start of window draw
macro startwd
{
mov eax,12
mov ebx,1
mcall
}
; ENDWD - End window draw
macro endwd
{
mov eax,12
mov ebx,2
mcall
}
; LABEL - Put text to frame
; (SYNTAX) LABEL Xstart,Ystart,'Text',Color
; (SAMPLE) LABEL 10,12,'Hello World!',cl_Green+font_Big
macro label arg1,arg2,arg3,arg4
{
local asd,lab
jmp asd
lab db arg3 ;arg label
asd:
mov ebx,arg1 ;arg1=y arg2=x
shl ebx,16
add ebx,arg2
mov ecx,arg4 ;arg4 color
mov edx,lab
mov esi,asd-lab ;calc size
mov eax,4
mcall
}
;Key's
key_Up equ 178
key_Down equ 177
key_Right equ 179
key_Left equ 176
key_Esc equ 27
key_Space equ 32
key_Enter equ 13
key_Bspace equ 8
key_F1 equ 50
key_F2 equ 51
key_F3 equ 52
key_F4 equ 53
key_F5 equ 54
key_F6 equ 55
key_F7 equ 56
key_F8 equ 57
key_F9 equ 48
key_F10 equ 49
key_F11 equ 68
key_F12 equ 255
key_Home equ 180
key_End equ 181
key_PgUp equ 184
key_PgDown equ 183
;Attributes
;Window Attributes
window_Skinned equ 0x03000000
window_Type2 equ 0x02000000
window_Type1 equ 0x00000000
window_Reserve equ 0x01000000
;Font Attributes
font_Big equ 0x10000000
;Colors
cl_White equ 0x00ffffff
cl_Black equ 0x00000000
cl_Grey equ 0x00888888
cl_Red equ 0x00ff0000
cl_Lime equ 0x0000ff00
cl_Green equ 0x0000af00
cl_Blue equ 0x000000ff
cl_Purple equ 0x008080ff
cl_Violet equ 0x008040ff
cl_Cyan equ 0x0040e0ff

View File

@@ -0,0 +1,3 @@
@fasm 3dcube2.asm 3dcube2
@kpack 3dcube2
if not exist 3dcube2 ( @pause )

View File

@@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause

View File

@@ -1,6 +0,0 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause

View File

@@ -0,0 +1,2 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("aclock.asm", "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "aclock")

View File

@@ -16,44 +16,42 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bits 32
%include 'mos.inc'
section .text
use32
org 0
db 'MENUET01'
dd 1,main,image_end,memory_end,stacktop,cmdLine,0
include '../../macros.inc'
include '../../proc32.inc'
include '../../KOSfuncs.inc'
;********************************************************************
; configuration stuff
;********************************************************************
%define APPNAME "Clock"
%define STACKSIZE 1024
; skinned window borders
MOS_WND_SKIN_BORDER_LEFT = 5
MOS_WND_SKIN_BORDER_RIGHT = 5
MOS_WND_SKIN_BORDER_BOTTOM = 5
; default window position/dimensions (work area)
%define DEFAULT_XPOS -20
%define DEFAULT_YPOS 20
%define DEFAULT_WIDTH 110
%define DEFAULT_HEIGHT 110
DEFAULT_XPOS =-20
DEFAULT_YPOS =20
DEFAULT_WIDTH =110
DEFAULT_HEIGHT =110
; minimal size (horizontal and vertical) of work area
%define MIN_WIDTH 100
%define MIN_HEIGHT 100
MIN_WIDTH =100
MIN_HEIGHT =100
;********************************************************************
; header
;********************************************************************
MOS_HEADER01 main,image_end,memory_end,stacktop-4,cmdLine,0
; these includes introduce code and thus mustn't stand
; before the menuet header =)
%include 'dbgboard.inc'
%include 'strlen.inc'
%include 'str2dwrd.inc'
%include 'strtok.inc'
%include 'cmdline.inc'
%include 'adjstwnd.inc'
%include 'draw.inc'
include 'dbgboard.inc'
include 'strfunct.inc'
include 'cmdline.inc'
include 'adjstwnd.inc'
include 'draw.inc'
;********************************************************************
; main program
@@ -89,20 +87,18 @@ main:
; call drawClock
; wait up to a second for next event
mov eax,MOS_SC_WAITEVENTTIMEOUT
mov ebx,100
int 0x40
mcall SF_WAIT_EVENT_TIMEOUT,100
test eax,eax
jne .event_occured
call drawClock
.event_occured:
cmp eax,MOS_EVT_REDRAW
cmp eax,EV_REDRAW
je .redraw
cmp eax,MOS_EVT_KEY
cmp eax,EV_KEY
je .key
cmp eax,MOS_EVT_BUTTON
cmp eax,EV_BUTTON
je .button
jmp .msgpump
@@ -110,12 +106,10 @@ main:
call drawWindow
jmp .msgpump
.key:
mov eax,MOS_SC_GETKEY
int 0x40
mcall SF_GET_KEY
jmp .msgpump
.button:
mov eax,MOS_SC_EXIT
int 0x40
mcall SF_TERMINATE_PROCESS
jmp .msgpump
@@ -128,11 +122,7 @@ main:
getDefaultWindowColors:
pushad
pushfd
mov eax,MOS_SC_WINDOWPROPERTIES
mov ebx,3
mov ecx,wndColors
mov edx,MOS_WNDCOLORS_size
int 0x40
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,wndColors,sizeof.system_colors
popfd
popad
ret
@@ -149,29 +139,24 @@ drawWindow:
pusha
; start window redraw
mov eax,MOS_SC_REDRAWSTATUS
mov ebx,1
int 0x40
mcall SF_REDRAW,SSF_BEGIN_DRAW
; create window
mov eax,MOS_SC_DEFINEWINDOW
mov ebx,[wndXPos]
shl ebx,16
or ebx,[wndWidth]
mov ecx,[wndYPos]
shl ecx,16
or ecx,[wndHeight]
mov edx,[wndColors+MOS_WNDCOLORS.work]
mov edx,[wndColors.work]
or edx,0x53000000
mov edi,label
int 0x40
mov edi,w_label
mcall SF_CREATE_WINDOW
call drawClock
; end window redraw
mov eax,MOS_SC_REDRAWSTATUS
mov ebx,2
int 0x40
mcall SF_REDRAW,SSF_END_DRAW
popa
ret
@@ -188,32 +173,29 @@ wndWidth dd DEFAULT_WIDTH
wndHeight dd DEFAULT_HEIGHT
; window label
label db APPNAME,0
LABEL_LEN equ ($-label-1)
w_label: db "Clock",0
.end:
LABEL_LEN equ (w_label.end-w_label-1)
; token delimiter list for command line
delimiters db 9,10,11,12,13,32,0
; don't insert anything after this label
image_end:
;********************************************************************
; uninitialized data
;********************************************************************
section .bss align=4
wndColors resb MOS_WNDCOLORS_size
procInfo resb MOS_PROCESSINFO_size
align 4
wndColors system_colors
procInfo process_information
; space for command line. at the end we have an additional
; byte for a terminating zero, just to be sure...
cmdLine resb 257
cmdLine rb 257
alignb 4
stack resb STACKSIZE
align 4
rb 1024
stacktop:
; don't insert anything after this label
memory_end:

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -20,8 +20,6 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
%ifndef _ADJSTWND_INC
%define _ADJSTWND_INC
;window types
@@ -72,8 +70,7 @@ adjustWindowDimensions:
; clamp window dimensions
.clamp:
mov eax,MOS_SC_GETSCREENMAX ; get screen dimensions
int 0x40
mcall SF_GET_SCREEN_SIZE ; get screen dimensions
mov edi,eax ; edi = screen width
shr edi,16
mov ebp,eax ; ebp = screen height
@@ -136,12 +133,10 @@ adjustWindowDimensions:
add edx,MOS_WND_SKIN_BORDER_LEFT+MOS_WND_SKIN_BORDER_RIGHT
; adjust height (esi). we need the skin height to do this.
push ebx
mov eax,MOS_SC_WINDOWPROPERTIES
mov ebx,4
int 0x40
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
lea esi,[esi+eax+MOS_WND_SKIN_BORDER_BOTTOM]
pop ebx
jmp .clamp
%endif

Some files were not shown because too many files have changed in this diff Show More