9 Commits

Author SHA1 Message Date
49399adda6 improvement(docs): add branch style 2025-03-15 17:43:53 +03:00
59685a6ac5 refactor(docs): limit line length by 80 2025-03-15 17:39:48 +03:00
b72d3f1035 improvement(docs): change commit title style 2025-03-15 17:39:48 +03:00
59bb13d6de Revert "CONTRIBUTING.md: removed commit categories section"
This reverts commit 46739aa601.
2025-03-15 16:31:15 +03:00
Burer
82e2b25a9e CONTIBUTING.md - Fixed broken anchor link 2025-03-14 10:03:49 +02:00
Burer
46739aa601 CONTRIBUTING.md: removed commit categories section 2025-03-13 20:40:31 +02:00
Burer
c1704a1c43 Fixed some language mistakes in CONTRIBUTING.md 2025-03-12 10:36:48 +02:00
63264c83a3 Docs: Added GNU GPL v2.0
Source: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Signed-off-by: Max Logaev <maxlogaev@proton.me>
2025-03-12 01:10:12 +03:00
3cc3fa6689 Docs: Added README and contributing guide
Co-authored-by: Burer
Signed-off-by: Max Logaev <maxlogaev@proton.me>
2025-03-12 00:29:48 +03:00
172 changed files with 5961 additions and 4254 deletions

View File

@@ -1,213 +0,0 @@
# 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
- 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: |
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: |
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
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
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
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

@@ -1,82 +0,0 @@
#!/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!"

118
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,118 @@
# Contributing guide
## Type of contributing
There are two main types of contributions accepted in KolibriOS:
- Submitting issues about problems in the project
- Submitting code to the project via pull requests
Each of these types is described in detail below.
## Issues
You can help us by submitting issues about problems found in the system.
Currently, there are two main ways of submitting an issue in the project:
**Bug Reports** and **Feature Requests**:
- Bug Reports are suitable if you find a **bug** (crash, error, unexpected
behavior) in some part of the system (kernel, drivers, apps, etc.) and want to
report it
- Feature Request are used, when you want to propose some **improvement** to
the system (missing features, improved user experience, etc.)
## Pull requests
You can also help us by submitting code via pull requests. The process of
submitting a pull request consists of the following steps:
1. Find what you want to implement or improve
2. Make a fork of kolibrios (or other needed) repository
3. Create a branch with a name that matches [the style](#branch-style)
4. Implement and test the changes
5. Create commits according to the [accepted style](#commit-style)
6. Create and submit a pull request into `main` branch
7. Wait for CI/CD pipelines and code review to pass
When a pull request is submitted, at least two project participants must conduct
a code review, after which the proposed changes can be corrected (if it's
necessary) and merged into the project.
## Branch style
1. Your branch name should be as short as possible, but describes your changes
2. Words should be divided by minus sign (`-`)
3. Optionally, might starts with general [type](#types) of your future PR
with slash (`/`): `refactor/nasm-to-fasm`, `update/demos`, `fix/cp866-charset`
## Commit style
### Pattern
The commit message should look like this:
```
type(scope): commit message header
Commit message body, if needed
```
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- When only changing documentation, include [ci skip] in the commit title
- Commit message header and body should reflect changes made in commit
### Types
| Type | Description |
| :--------------: | :------------------------------------------------ |
| `feat / feature` | for new feature implementing commit |
| `update` | for update commit |
| `bug` | for bug fix commit |
| `security` | for security issue fix commit |
| `performance` | for performance issue fix commit |
| `improvement` | for backwards-compatible enhancement commit |
| `breaking` | for backwards-incompatible enhancement commit |
| `deprecated` | for deprecated feature commit |
| `i18n` | for i18n (internationalization) commit |
| `a11y` | for a11y (accessibility) commit |
| `refactor` | for refactoring commit |
| `docs` | for documentation commit |
| `example` | for example code commit |
| `test` | for testing commit |
| `deps` | for dependencies upgrading or downgrading commit |
| `config` | for configuration commit |
| `build` | for packaging or bundling commit |
| `release` | for publishing commit |
| `wip` | for work in progress commit |
| `chore` | for other operations commit |
### Scopes
> [!NOTE]
> Scopes are optional
| Scope | Description |
| :----: | :------------------------------- |
| `krn` | kernel |
| `drv` | drivers |
| `lib` | libraries |
| `app` | userspace applications |
| `skin` | skins |
| `data` | images, configs, resources, etc. |
> [!NOTE]
> If changes are made to a specific component, the name of the component
> separated by `/` character needs to be specified. For example:
> `app/shell`, `lib/libimg`
## Merge commits
> [!WARNING]
> Merge commits are **prohibited** in the project
## Conclusion
We hope this small instructions will help you to get familiar with KolibriOS
contribution rules and inspire you to participate in the work of this project.

338
COPYING.TXT Normal file
View File

@@ -0,0 +1,338 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

28
README.md Normal file
View File

@@ -0,0 +1,28 @@
# KolibriOS
[![License](https://img.shields.io/badge/License-GPL%202.0-green)](./COPYING.TXT)
[![Build system](https://git.kolibrios.org/KolibriOS/kolibrios/actions/workflows/build.yaml/badge.svg)](https://git.kolibrios.org/KolibriOS/kolibrios/actions/workflows/build.yaml)
KolibriOS is a hobby operating system for x86-compatible computers, which is currently being developed by a small teem of enthusiasts.
It's kernel is written entirely in [FASM](https://flatassembler.net/) assembly language, making it very compact and lean on system resources.
Based on [MenuetOS](https://www.menuetos.net/), it uses its own standards and is NOT fully POSIX or UNIX compliant
## Contributing
We would appreciate any participation in the project and always welcome new users and contributors.
Detailed instructions for the contribution process can be found in the [contributing guide](./CONTRIBUTING.md).
Common list of tasks, issues and enhancement proposals can be found on [this page](https://git.kolibrios.org/KolibriOS/kolibrios/issues).
## Special thanks
The KolibriOS team expresses special thanks to the author of the 32-bit **MenuetOS**, [Ville Turjanmaa](https://www.menuetos.net/contact.htm). We also want to note that all **MenuetOS** copyrights have been preserved.
## License
Contents of this repository are licensed under the terms of **GNU GPL 2.0** unless otherwise specified.
See [this](./COPYING.TXT) file for details.

View File

@@ -407,7 +407,6 @@ tup.append_table(img_files, {
{"@SS", VAR_PROGS .. "/system/scrsaver/scrsaver"}, {"@SS", VAR_PROGS .. "/system/scrsaver/scrsaver"},
{"@VOLUME", VAR_PROGS .. "/media/volume/volume"}, {"@VOLUME", VAR_PROGS .. "/media/volume/volume"},
{"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"}, {"HACONFIG", VAR_PROGS .. "/other/ha/HACONFIG"},
{"ACLOCK", VAR_PROGS .. "/demos/aclock/aclock"},
{"APM", VAR_PROGS .. "/system/apm/apm"}, {"APM", VAR_PROGS .. "/system/apm/apm"},
{"CALC", VAR_PROGS .. "/other/calc/trunk/calc"}, {"CALC", VAR_PROGS .. "/other/calc/trunk/calc"},
{"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"}, {"CALENDAR", VAR_PROGS .. "/system/calendar/trunk/calendar"},
@@ -442,8 +441,6 @@ tup.append_table(img_files, {
{"TERMINAL", VAR_PROGS .. "/system/terminal/terminal"}, {"TERMINAL", VAR_PROGS .. "/system/terminal/terminal"},
{"TEST", VAR_PROGS .. "/testing/protection/trunk/test"}, {"TEST", VAR_PROGS .. "/testing/protection/trunk/test"},
{"TINYPAD", VAR_PROGS .. "/develop/tinypad/trunk/tinypad"}, {"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"}, {"UNZ", VAR_PROGS .. "/fs/unz/unz"},
{"ZKEY", VAR_PROGS .. "/system/zkey/trunk/ZKEY"}, {"ZKEY", VAR_PROGS .. "/system/zkey/trunk/ZKEY"},
{"3D/3DWAV", VAR_PROGS .. "/demos/3dwav/trunk/3dwav"}, {"3D/3DWAV", VAR_PROGS .. "/demos/3dwav/trunk/3dwav"},
@@ -458,36 +455,35 @@ tup.append_table(img_files, {
{"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"}, {"DEMOS/EYES", VAR_PROGS .. "/demos/eyes/trunk/eyes"},
{"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/trunk/firework"}, {"DEMOS/FIREWORK", VAR_PROGS .. "/demos/firework/trunk/firework"},
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/trunk/movback"}, {"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/trunk/movback"},
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"}, {"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/trunk/plasma"},
{"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"}, {"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"},
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"}, {"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"},
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"}, {"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"},
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"}, {"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/trunk/tube"},
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/unvwater"}, {"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/trunk/unvwater"},
{"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"}, {"DEMOS/WEB", VAR_PROGS .. "/demos/web/trunk/web"},
{"DEMOS/ZEROLINE", VAR_PROGS .. "/demos/zeroline/trunk/zeroline"}, {"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/BOARD", VAR_PROGS .. "/system/board/trunk/board"},
{"DEVELOP/DBGBOARD", VAR_PROGS .. "/system/dbgboard/dbgboard"},
{"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"}, {"DEVELOP/CEDIT", SRC_PROGS .. "/develop/cedit/CEDIT"},
{"DEVELOP/CHARSETS", VAR_PROGS .. "/develop/charsets/charsets"},
{"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"}, {"DEVELOP/COBJ", VAR_PROGS .. "/develop/cObj/trunk/cObj"},
{"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"}, {"DEVELOP/ENTROPYV", VAR_PROGS .. "/develop/entropyview/entropyview"},
{"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"}, {"DEVELOP/FASM", VAR_PROGS .. "/develop/fasm/1.73/fasm"},
{"DEVELOP/GENFILES", VAR_PROGS .. "/testing/genfiles/GenFiles"},
{"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"}, {"DEVELOP/H2D2B", VAR_PROGS .. "/develop/h2d2b/trunk/h2d2b"},
{"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"}, {"DEVELOP/HEED", VAR_PROGS .. "/develop/heed/trunk/heed"},
{"DEVELOP/KEYASCII", VAR_PROGS .. "/develop/keyascii/trunk/keyascii"},
{"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"}, {"DEVELOP/MTDBG", VAR_PROGS .. "/develop/mtdbg/mtdbg"},
{"DEVELOP/MSTATE", VAR_PROGS .. "/develop/mstate/mstate"},
{"DEVELOP/SCANCODE", VAR_PROGS .. "/develop/scancode/trunk/scancode"}, {"DEVELOP/SCANCODE", VAR_PROGS .. "/develop/scancode/trunk/scancode"},
{"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/trunk/circle"}, {"DEVELOP/EXAMPLES/CIRCLE", VAR_PROGS .. "/develop/examples/circle/trunk/circle"},
{"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/trunk/colorref"}, {"DEVELOP/EXAMPLES/COLORREF", VAR_PROGS .. "/demos/colorref/trunk/colorref"},
{"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"}, {"DEVELOP/EXAMPLES/CONGET", VAR_PROGS .. "/develop/libraries/console_coff/examples/test_gets"},
{"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/trunk/cslide"}, {"DEVELOP/EXAMPLES/CSLIDE", VAR_PROGS .. "/demos/cslide/trunk/cslide"},
{"DEVELOP/EXAMPLES/THREAD", VAR_PROGS .. "/develop/examples/thread/trunk/thread"}, {"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/KFAR", VAR_PROGS .. "/fs/kfar/trunk/kfar"},
{"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"}, {"File Managers/OPENDIAL", VAR_PROGS .. "/fs/opendial/opendial"},
{"LOD", VAR_PROGS .. "/fs/lod/lod"},
{"GAMES/15", VAR_PROGS .. "/games/15/15"}, {"GAMES/15", VAR_PROGS .. "/games/15/15"},
{"GAMES/DINO", VAR_PROGS .. "/games/dino/dino"},
{"GAMES/FREECELL", VAR_PROGS .. "/games/freecell/freecell"}, {"GAMES/FREECELL", VAR_PROGS .. "/games/freecell/freecell"},
{"GAMES/GOMOKU", VAR_PROGS .. "/games/gomoku/gomoku"}, {"GAMES/GOMOKU", VAR_PROGS .. "/games/gomoku/gomoku"},
{"GAMES/LIGHTS", VAR_PROGS .. "/games/sq_game/SQ_GAME"}, {"GAMES/LIGHTS", VAR_PROGS .. "/games/sq_game/SQ_GAME"},
@@ -502,7 +498,6 @@ tup.append_table(img_files, {
{"GAMES/SW", VAR_PROGS .. "/games/sw/sw"}, {"GAMES/SW", VAR_PROGS .. "/games/sw/sw"},
{"GAMES/TANKS", VAR_PROGS .. "/games/tanks/tanks"}, {"GAMES/TANKS", VAR_PROGS .. "/games/tanks/tanks"},
{"GAMES/TETRIS", VAR_PROGS .. "/games/tetris/tetris"}, {"GAMES/TETRIS", VAR_PROGS .. "/games/tetris/tetris"},
{"GAMES/C4", VAR_PROGS .. "/games/c4/c4"},
{"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"}, {"LIB/ARCHIVER.OBJ", VAR_PROGS .. "/fs/kfar/trunk/kfar_arc/kfar_arc.obj"},
{"LIB/BOX_LIB.OBJ", VAR_PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"}, {"LIB/BOX_LIB.OBJ", VAR_PROGS .. "/develop/libraries/box_lib/trunk/box_lib.obj"},
{"LIB/BUF2D.OBJ", VAR_PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"}, {"LIB/BUF2D.OBJ", VAR_PROGS .. "/develop/libraries/buf2d/trunk/buf2d.obj"},
@@ -522,7 +517,6 @@ tup.append_table(img_files, {
{"LIB/SORT.OBJ", VAR_PROGS .. "/develop/libraries/sorter/sort.obj"}, {"LIB/SORT.OBJ", VAR_PROGS .. "/develop/libraries/sorter/sort.obj"},
{"LIB/TINYGL.OBJ", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"}, {"LIB/TINYGL.OBJ", VAR_PROGS .. "/develop/libraries/TinyGL/asm_fork/tinygl.obj"},
{"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/trunk/animage"}, {"MEDIA/ANIMAGE", VAR_PROGS .. "/media/animage/trunk/animage"},
{"MEDIA/FILLSCR", VAR_PROGS .. "/media/FillScr/fillscr"},
{"MEDIA/KIV", VAR_PROGS .. "/media/kiv/trunk/kiv"}, {"MEDIA/KIV", VAR_PROGS .. "/media/kiv/trunk/kiv"},
{"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/trunk/listplay"}, {"MEDIA/LISTPLAY", VAR_PROGS .. "/media/listplay/trunk/listplay"},
{"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"}, {"MEDIA/MIDAMP", VAR_PROGS .. "/media/midamp/trunk/midamp"},
@@ -605,6 +599,7 @@ tup.append_table(extra_files, {
{"kolibrios/demos/life3", VAR_PROGS .. "/games/life3/life3"}, {"kolibrios/demos/life3", VAR_PROGS .. "/games/life3/life3"},
{"kolibrios/demos/qjulia", VAR_PROGS .. "/demos/qjulia/trunk/qjulia"}, {"kolibrios/demos/qjulia", VAR_PROGS .. "/demos/qjulia/trunk/qjulia"},
{"kolibrios/develop/koldbg", VAR_PROGS .. "/develop/koldbg/koldbg"}, {"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/Almaz", VAR_PROGS .. "/games/almaz/almaz"},
{"kolibrios/games/arcanii", VAR_PROGS .. "/games/arcanii/arcanii"}, {"kolibrios/games/arcanii", VAR_PROGS .. "/games/arcanii/arcanii"},
{"kolibrios/games/bomber/bomber", VAR_PROGS .. "/games/bomber/bomber"}, {"kolibrios/games/bomber/bomber", VAR_PROGS .. "/games/bomber/bomber"},
@@ -635,7 +630,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"}, {"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"}, {"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
}) else tup.append_table(img_files, { }) else tup.append_table(img_files, {
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"}, {"DEVELOP/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"},
}) end }) end
if build_type == "ru_RU" then tup.append_table(extra_files, { if build_type == "ru_RU" then tup.append_table(extra_files, {
@@ -644,6 +639,22 @@ if build_type == "ru_RU" then tup.append_table(extra_files, {
end -- tup.getconfig('NO_FASM') ~= 'full' 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. -- Programs that require JWASM to compile.
if tup.getconfig('NO_JWASM') ~= 'full' then if tup.getconfig('NO_JWASM') ~= 'full' then
tup.append_table(img_files, { tup.append_table(img_files, {
@@ -672,6 +683,7 @@ tup.append_table(img_files, {
{"DEVELOP/PIPET", VAR_PROGS .. "/cmm/misc/pipet.com"}, {"DEVELOP/PIPET", VAR_PROGS .. "/cmm/misc/pipet.com"},
{"File Managers/EOLITE", VAR_PROGS .. "/cmm/eolite/Eolite.com"}, {"File Managers/EOLITE", VAR_PROGS .. "/cmm/eolite/Eolite.com"},
{"File Managers/KFM2", VAR_PROGS .. "/cmm/misc/kfm2.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"}, {"DEVELOP/DIFF", VAR_PROGS .. "/cmm/diff/diff.com"},
{"GAMES/CLICKS", VAR_PROGS .. "/games/clicks/clicks.com"}, {"GAMES/CLICKS", VAR_PROGS .. "/games/clicks/clicks.com"},
{"GAMES/MBLOCKS", VAR_PROGS .. "/cmm/misc/mblocks.com"}, {"GAMES/MBLOCKS", VAR_PROGS .. "/cmm/misc/mblocks.com"},
@@ -718,7 +730,6 @@ if tup.getconfig('NO_TCC') ~= 'full' then
tup.append_table(img_files, { tup.append_table(img_files, {
{"NETWORK/WHOIS", VAR_PROGS .. "/network/whois/whois"}, {"NETWORK/WHOIS", VAR_PROGS .. "/network/whois/whois"},
{"SHELL", VAR_PROGS .. "/system/shell/shell"}, {"SHELL", VAR_PROGS .. "/system/shell/shell"},
{"GAMES/DINO", VAR_PROGS .. "/games/dino/dino"},
}) })
tup.append_table(extra_files, { tup.append_table(extra_files, {
{"kolibrios/utils/thashview", VAR_PROGS .. "/other/TinyHashView/thashview"}, {"kolibrios/utils/thashview", VAR_PROGS .. "/other/TinyHashView/thashview"},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 1.7 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.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 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.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.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -79,7 +79,7 @@ next=$TextEditor
[Assoc] [Assoc]
/=/sys/file managers/eolite /=/sys/file managers/eolite
kf=/sys/syspanel kf=/sys/KF_VIEW
txt=$CodeEdit txt=$CodeEdit
log=$CodeEdit log=$CodeEdit

View File

@@ -1,16 +1,14 @@
The following "hot" shortcut keys are used in the system: The following "hot" shortcut keys are used in the system:
(Indexing on time of appearance 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. 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 2) Ctrl + Shift - switching of keyboard layout.
3) Win - start of the application MENU 3) Win - start of the application MENU.
4) Alt + Ctrl + F12 - start of the application END 4) Alt + Ctrl + F12 - start of the application END.
5) Alt + F4 - terminate the active application 5) Alt + F4 - terminate the active application.
6) Alt + Tab - switch to the next window 6) Alt + Tab - switch to the next (in the window stack) window
7) Alt + Shift + Tab - switch to the previous window 7) Alt + Shift + Tab - switch to the previous (in the window stack) window
8) Alt + Shift + NumLock - start of the application MOUSEMUL, which emulates mouse with numpad, when NumLock is on. 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) 9) Alt + 1...7 - fast switching to the selected keyboard layout (even if absent for Ctrl + Shift)
10) Win + D - minimize/restore all windows 10) Win + D - minimize/restore all windows (cleaning of desktop)
11) Win + R - start of the application RUN 11) Win + R - start of the application RUN
12) Ctrl + PrintScreen - start of the application SCRSHOOT 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.
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 x=-67
y=68 y=68
[10] [10]
name=DBGBOARD name=BOARD
path=/SYS/DEVELOP/DBGBOARD path=/SYS/DEVELOP/BOARD
param= param=
ico=19 ico=19
x=-135 x=-135

View File

@@ -57,7 +57,8 @@
20 Diff Tool |develop/diff 20 Diff Tool |develop/diff
52 Shared resources |/sys/@reshare 52 Shared resources |/sys/@reshare
34 Base Converter |develop/h2d2b 34 Base Converter |develop/h2d2b
59 Charsets Viewer |develop/CHARSETS 59 Character table |develop/ASCIIVju
59 Key ASCII-codes |develop/keyascii
59 Key SCAN-codes |develop/scancode 59 Key SCAN-codes |develop/scancode
#6 **** EMUL #6 **** EMUL
24 DOSBox * |/kolibrios/emul/DosBox/dosbox 24 DOSBox * |/kolibrios/emul/DosBox/dosbox

View File

@@ -1,16 +1,14 @@
The following "hot" shortcut keys are used in the system: The following "hot" shortcut keys are used in the system:
(Indexing on time of appearance 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. 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 2) Ctrl + Shift - switching of keyboard layout.
3) Win - start of the application MENU 3) Win - start of the application MENU.
4) Alt + Ctrl + F12 - start of the application END 4) Alt + Ctrl + F12 - start of the application END.
5) Alt + F4 - terminate the active application 5) Alt + F4 - terminate the active application.
6) Alt + Tab - switch to the next window 6) Alt + Tab - switch to the next (in the window stack) window
7) Alt + Shift + Tab - switch to the previous window 7) Alt + Shift + Tab - switch to the previous (in the window stack) window
8) Alt + Shift + NumLock - start of the application MOUSEMUL, which emulates mouse with numpad, when NumLock is on. 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) 9) Alt + 1...7 - fast switching to the selected keyboard layout (even if absent for Ctrl + Shift)
10) Win + D - minimize/restore all windows 10) Win + D - minimize/restore all windows (cleaning of desktop)
11) Win + R - start of the application RUN 11) Win + R - start of the application RUN
12) Ctrl + PrintScreen - start of the application SCRSHOOT 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.
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 x=-67
y=68 y=68
[10] [10]
name=DBGBOARD name=BOARD
path=/SYS/DEVELOP/DBGBOARD path=/SYS/DEVELOP/BOARD
param= param=
ico=19 ico=19
x=-135 x=-135

View File

@@ -56,7 +56,8 @@
49 Debugger mtdbg |develop/mtdbg 49 Debugger mtdbg |develop/mtdbg
49 Debugger koldbg * |/kolibrios/develop/koldbg 49 Debugger koldbg * |/kolibrios/develop/koldbg
16 Hex2Dec2Bin |develop/h2d2b 16 Hex2Dec2Bin |develop/h2d2b
16 Tabla de caracteres |develop/CHARSETS 16 Tabla de caracteres |ASCIIVju
16 C<>digos ASCII |develop/keyascii
16 C<>digos SCAN |develop/scancode 16 C<>digos SCAN |develop/scancode
#6 **** EMULATORS #6 **** EMULATORS
24 DOSBox * |/kolibrios/emul/DosBox/dosbox 24 DOSBox * |/kolibrios/emul/DosBox/dosbox

View File

@@ -116,8 +116,8 @@ ico=8
x=-67 x=-67
y=68 y=68
[10] [10]
name=DBGBOARD name=BOARD
path=/SYS/DEVELOP/DBGBOARD path=/SYS/DEVELOP/BOARD
param= param=
ico=19 ico=19
x=-135 x=-135

View File

@@ -116,8 +116,8 @@ ico=8
x=-67 x=-67
y=68 y=68
[10] [10]
name=DBGBOARD name=BOARD
path=/SYS/DEVELOP/DBGBOARD path=/SYS/DEVELOP/BOARD
param= param=
ico=19 ico=19
x=-135 x=-135

View File

@@ -1,16 +1,14 @@
<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>: <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>) (<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. 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> 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 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 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> 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> 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><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>
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> 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) 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> 10) Win + D - ᢥ<><E1A2A5><EFBFBD><EFBFBD><EFBFBD>/ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD>⪠ ࠡ<><EFBFBD> <20><EFBFBD>)
11) Win + R - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RUN 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 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.
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 x=-67
y=68 y=68
[10] [10]
name=DBGBOARD name=BOARD
path=/SYS/DEVELOP/DBGBOARD path=/SYS/DEVELOP/BOARD
param= param=
ico=19 ico=19
x=-135 x=-135

View File

@@ -58,7 +58,8 @@
20 Diff tool |develop/diff 20 Diff tool |develop/diff
52 Shared resources |/sys/@reshare 52 Shared resources |/sys/@reshare
34 Hex2Dec2Bin |develop/h2d2b 34 Hex2Dec2Bin |develop/h2d2b
59 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> |develop/CHARSETS 59 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A8AC><EFBFBD><EFBFBD><EFBFBD> |develop/ASCIIVju
59 ASCII-<2D><><EFBFBD><EFBFBD> |develop/keyascii
59 SCAN-<2D><><EFBFBD><EFBFBD> |develop/scancode 59 SCAN-<2D><><EFBFBD><EFBFBD> |develop/scancode
#6 **** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #6 **** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
24 DOSBox * |/kolibrios/emul/DosBox/dosbox 24 DOSBox * |/kolibrios/emul/DosBox/dosbox

Binary file not shown.

View File

@@ -55,15 +55,9 @@ _ini taskbar_vars_ini = { #taskbar_ini_path, "Variables" };
_ini docky_ini = { "/sys/settings/docky.ini", "@" }; _ini docky_ini = { "/sys/settings/docky.ini", "@" };
unsigned char panels_img_data[] = FROM "bars.raw";
#define PIMG_W 37 #define PIMG_W 37
#define PIMG_H 27 //27*5 #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; proc_info Form;
@@ -143,7 +137,7 @@ void main()
void DrawPanelsImage(dword y, n) void DrawPanelsImage(dword y, n)
{ {
PutPaletteImage(n * PIMG_W * PIMG_H + #panels_img_data, PIMG_W, PIMG_H, 22, y, 8, #panels_img_pal); PutImage(22, y, PIMG_W, PIMG_H, n * PIMG_W * PIMG_H * 3 + #panels_img_data);
} }
void SetDisabledMode() void SetDisabledMode()

View File

@@ -101,16 +101,13 @@ void TWebBrowser::SetPageDefaults()
img_url.drop(); img_url.drop();
text_colors.drop(); text_colors.drop();
text_colors.add(0); 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.drop();
bg_colors.add(DEFAULT_BG_COL); bg_colors.add(DEFAULT_BG_COL);
canvas.Fill(0, DEFAULT_BG_COL);
header = NULL; header = NULL;
draw_y = BODY_MARGIN; draw_y = BODY_MARGIN;
draw_x = left_gap = BODY_MARGIN; draw_x = left_gap = BODY_MARGIN;
draw_w = list.w - BODY_MARGIN - BODY_MARGIN; draw_w = list.w - BODY_MARGIN;
linebuf = 0; linebuf = 0;
redirect = '\0'; redirect = '\0';
list.SetFont(8, 14, 10011000b); list.SetFont(8, 14, 10011000b);
@@ -136,6 +133,8 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
dword bufpos; dword bufpos;
bufsize = _bufsize; bufsize = _bufsize;
if (list.w!=canvas.bufw) canvas.Init(list.x, list.y, list.w, 400*20);
if (bufpointer == _bufpointer) { if (bufpointer == _bufpointer) {
custom_encoding = cur_encoding; custom_encoding = cur_encoding;
} else { } else {
@@ -154,6 +153,7 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
} }
} }
table.cols.drop(); table.cols.drop();
secondrun = false; secondrun = false;
@@ -216,15 +216,19 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
AddCharToTheLine(ESBYTE[bufpos]); AddCharToTheLine(ESBYTE[bufpos]);
} }
RenderTextbuf();
list.count = draw_y + style.cur_line_h;
list.CheckDoesValuesOkey();
anchors.current = NULL;
if (!secondrun) { if (!secondrun) {
secondrun = true; secondrun = true;
goto _PARSE_START_; 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) { if (!header) {
strncpy(#header, #version, sizeof(TWebBrowser.header)-1); strncpy(#header, #version, sizeof(TWebBrowser.header)-1);
DrawTitle(#header); DrawTitle(#header);

View File

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

View File

@@ -112,7 +112,6 @@ dword _tag::get_next_param(dword ps, pe)
// "pe" - param end // "pe" - param end
// "q" - quote char // "q" - quote char
char q = NULL; char q = NULL;
dword initial_pe = pe;
dword fixeq; dword fixeq;
dword val; dword val;
dword attr; dword attr;
@@ -146,14 +145,6 @@ dword _tag::get_next_param(dword ps, pe)
//already have ATTR end //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 //find ATTR start and copy
while (pe>ps) && (!__isWhite(ESBYTE[pe])) pe--; while (pe>ps) && (!__isWhite(ESBYTE[pe])) pe--;
attr = pe + 1; attr = pe + 1;
@@ -170,8 +161,6 @@ dword _tag::get_next_param(dword ps, pe)
} }
strlwr(attr); strlwr(attr);
strrtrim(val); strrtrim(val);
//Fix case: " img.png"
while(__isWhite(ESBYTE[val])) && (val<initial_pe) val++;
attributes.add(attr); attributes.add(attr);
values.add(val); values.add(val);

View File

@@ -10,8 +10,10 @@ void TWebBrowser::RenderLine(dword _line)
if (style.title) if (style.title)
{ {
strncpy(#header, _line, sizeof(TWebBrowser.header)-1); strncpy(#header, _line, sizeof(TWebBrowser.header)-1);
strncat(#header, " - ", sizeof(TWebBrowser.header)-1); if (!application_mode) {
strncat(#header, #version, sizeof(TWebBrowser.header)-1); strncat(#header, " - ", sizeof(TWebBrowser.header)-1);
strncat(#header, #version, sizeof(TWebBrowser.header)-1);
}
} }
else if (t_html) && (!t_body) { else if (t_html) && (!t_body) {
// //
@@ -22,10 +24,11 @@ void TWebBrowser::RenderLine(dword _line)
zoom = list.font_w / BASIC_CHAR_W; zoom = list.font_w / BASIC_CHAR_W;
//there is some shit happens!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //there is some shit happens!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if (pw > draw_w + BODY_MARGIN) { if (pw > draw_w) {
//debugln("shit"); //draw_w = pw;
NewLine();
} }
if (debug_mode) { if (debug_mode) {
canvas.DrawBar(draw_x, draw_y, pw, list.item_h, 0xCCCccc); canvas.DrawBar(draw_x, draw_y, pw, list.item_h, 0xCCCccc);
debugln(_line); debugln(_line);
@@ -82,13 +85,12 @@ void TWebBrowser::RenderTextbuf()
//debugln(" \\n"); //debugln(" \\n");
//Is a new line fits in the maximum line width? //Is a new line fits in the current line?
if (br * list.font_w + draw_x - left_gap >= draw_w) { if (br * list.font_w + draw_x - left_gap >= draw_w) {
br = draw_w - draw_x + left_gap /list.font_w; br = draw_w - draw_x + left_gap /list.font_w;
if (br < 0) br = 0;
while(br) { while(br) {
if (ESBYTE[lbp + br]==' ') { if (ESBYTE[lbp + br]==' ') {
if (br < len) br++; br++;
break; break;
} }
br--; br--;
@@ -96,16 +98,7 @@ void TWebBrowser::RenderTextbuf()
} }
//Maybe a new line is too big for the whole new line? Then we have to split it //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) { 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; 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) { if (br) {
@@ -129,13 +122,9 @@ void TWebBrowser::NewLine()
if (draw_x==left_gap) && (draw_y==BODY_MARGIN) return; if (draw_x==left_gap) && (draw_y==BODY_MARGIN) return;
if (t_html) && (!t_body) return; if (t_html) && (!t_body) return;
if (draw_x == style.tag_list.level * 5 * list.font_w + left_gap) { if (draw_x == style.tag_list.level * 5 * list.font_w + left_gap) {
if (!empty_line) { if (!empty_line) empty_line=true; else return;
empty_line=true;
} else {
return;
}
} else { } else {
empty_line = false; empty_line = false;
} }

View File

@@ -56,12 +56,15 @@ void TWebBrowser::SetStyle()
if (tag.is("tr")) { tag_table(); return; } if (tag.is("tr")) { tag_table(); return; }
if (tag.is("th")) { tag_table(); return; } if (tag.is("th")) { tag_table(); return; }
if (tag.is("td")) { tag_table(); return; } if (tag.is("td")) { tag_table(); return; }
if (application_mode) {
if (tag.is("exit")) { ExitProcess(); return; }
}
} }
void TWebBrowser::tag_p() void TWebBrowser::tag_p()
{ {
IF (tag.prior[0] == 'h') || (streq(#tag.prior,"td")) return; IF (tag.prior[0] == 'h') || (streq(#tag.prior,"td")) || (streq(#tag.prior,"p")) return;
IF (!tag.opened) && (streq(#tag.prior,"p")) return;
NewLine(); NewLine();
} }
@@ -119,7 +122,6 @@ void TWebBrowser::tag_iframe()
void TWebBrowser::tag_a() void TWebBrowser::tag_a()
{ {
if (!secondrun) return;
if (tag.opened) if (tag.opened)
{ {
if (tag.get_value_of("href")) && (!strstr(tag.value,"javascript:")) if (tag.get_value_of("href")) && (!strstr(tag.value,"javascript:"))
@@ -134,7 +136,6 @@ void TWebBrowser::tag_a()
void TWebBrowser::tag_meta_xml() void TWebBrowser::tag_meta_xml()
{ {
if (secondrun) return;
if (custom_encoding == -1) if (tag.get_value_of("charset")) if (custom_encoding == -1) if (tag.get_value_of("charset"))
|| (tag.get_value_of("content")) || (tag.get_value_of("encoding")) || (tag.get_value_of("content")) || (tag.get_value_of("encoding"))
{ {
@@ -147,6 +148,22 @@ void TWebBrowser::tag_meta_xml()
if (streq(tag.get_value_of("http-equiv"), "refresh")) && (tag.get_value_of("content")) { 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 (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) signed int get_encoding_type_by_name(dword name)
@@ -189,7 +206,7 @@ void TWebBrowser::tag_ol_ul_dt()
void TWebBrowser::tag_li() void TWebBrowser::tag_li()
{ {
//if (style.nav) return; if (style.nav) return;
if (tag.opened) { if (tag.opened) {
if (!style.tag_list.level) style.tag_list.upd_level(1, 'u'); if (!style.tag_list.level) style.tag_list.upd_level(1, 'u');
if (!style.pre) NewLine(); if (!style.pre) NewLine();
@@ -218,10 +235,13 @@ void TWebBrowser::tag_hr()
void TWebBrowser::tag_body() void TWebBrowser::tag_body()
{ {
t_body = tag.opened; t_body = tag.opened;
if (tag.get_value_of("link")) link_color_default = GetColor(tag.value); 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("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("text")) text_colors.set(0, GetColor(tag.value));
if (tag.get_value_of("bgcolor")) bg_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));
}
// Autodetecting encoding if no encoding was set // Autodetecting encoding if no encoding was set
if (tag.opened) && (custom_encoding==-1) && (cur_encoding == CH_CP866) { if (tag.opened) && (custom_encoding==-1) && (cur_encoding == CH_CP866) {
if (strstr(bufpointer, "\208\190")) ChangeEncoding(CH_UTF8); if (strstr(bufpointer, "\208\190")) ChangeEncoding(CH_UTF8);
@@ -244,19 +264,11 @@ void TWebBrowser::tag_h1234_caption()
} else { } else {
style.h = tag.opened; style.h = tag.opened;
if (tag.opened) { if (tag.opened) {
if (!style.pre) { if (!style.pre) NewLine();
NewLine(); draw_y += 10;
NewLine(); list.SetFont(BASIC_CHAR_W*2, 14*2, 10011001b);
} list.item_h = BASIC_LINE_H * 2 - 2;
if (tag.is("h1")) { if (tag.is("h1")) style.b = true;
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 { } else {
if (tag.is("h1")) style.b = false; if (tag.is("h1")) style.b = false;
NewLine(); NewLine();
@@ -293,7 +305,7 @@ void TWebBrowser::tag_img()
if (!strcmp(tag.value + strrchr(tag.value, '.'), "webp")) goto NOIMG; if (!strcmp(tag.value + strrchr(tag.value, '.'), "webp")) goto NOIMG;
strlcpy(#img_path, tag.value, sizeof(img_path)-1); strlcpy(#img_path, tag.value, sizeof(img_path)-1);
replace_char(#img_path, ' ', '\0', sizeof(img_path)-1); replace_char(#img_path, ' ', '\0', sizeof(img_path));
get_absolute_url(#img_path, history.current()); get_absolute_url(#img_path, history.current());
if (check_is_the_adress_local(#img_path)) { if (check_is_the_adress_local(#img_path)) {
@@ -330,28 +342,31 @@ NOIMG:
text_colors.pop(); text_colors.pop();
} }
struct TABLE { struct TABLE {
int count;
int depth; int depth;
int margin; int margin;
collection_int cols; collection_int cols;
collection_int width;
} table; } table;
unsigned table_id;
unsigned colcount; int tr_pos, td_pos;
unsigned tr_pos; int row_start_y;
unsigned td_pos; int colcount;
unsigned row_start_y; dword tallest_cell_in_row;
unsigned tallest_cell_in_row;
unsigned cur_cell_w;
void TWebBrowser::tag_table_reset() void TWebBrowser::tag_table_reset()
{ {
table_id = 0; table.depth = 0;
table.count = 0;
colcount = 0; colcount = 0;
tr_pos = 0; tr_pos = 0;
td_pos = 0; td_pos = 0;
table.depth = 0;
cur_cell_w = 0;
} }
void TWebBrowser::tag_table() void TWebBrowser::tag_table()
@@ -365,15 +380,15 @@ void TWebBrowser::tag_table()
if(tag.opened) { if(tag.opened) {
table.depth++; table.depth++;
if (table.depth==1) { if (table.depth==1) {
table_id++; table.count++;
colcount = 0; colcount = 0;
td_pos = 0; td_pos = 0;
row_start_y = draw_y; row_start_y = draw_y;
if (tag.get_number_of("width")) { if (tag.get_number_of("width")) {
if (strchr(tag.value, '%')) tag.number = list.w * tag.number / 100; if (strchr(tag.value, '%')) tag.number = list.w * tag.number / 100;
cur_cell_w = math.min(tag.number,list.w); table.width.set(table.count, math.min(tag.number,list.w));
} else { } else {
cur_cell_w = list.w; table.width.set(table.count, list.w);
} }
} }
} else { } else {
@@ -432,17 +447,26 @@ void TWebBrowser::tag_table()
if (!tr_pos) goto _TR_FIX; if (!tr_pos) goto _TR_FIX;
tallest_cell_in_row = math.max(draw_y+style.cur_line_h-list.item_h+1, tallest_cell_in_row); /*
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);
style.cur_line_h = list.item_h; style.cur_line_h = list.item_h;
if (tag.opened) if (tag.opened) {
{
if (!td_pos) { if (!td_pos) {
table.margin = list.w - cur_cell_w / 2 + BODY_MARGIN; table.margin = list.w - table.width.get(table.count) / 2 + BODY_MARGIN;
draw_x = left_gap = table.margin; draw_x = left_gap = table.margin;
draw_w = cur_cell_w - BODY_MARGIN; draw_w = table.width.get(table.count) - BODY_MARGIN;
} else { } else {
draw_x = left_gap = left_gap + draw_w; draw_x = left_gap = left_gap + draw_w;
draw_w = cur_cell_w - left_gap + table.margin - BODY_MARGIN; draw_w = table.width.get(table.count) - left_gap + table.margin - BODY_MARGIN;
} }
if (EAX = table.cols.get(tr_pos-1)-td_pos) { if (EAX = table.cols.get(tr_pos-1)-td_pos) {
@@ -453,18 +477,20 @@ void TWebBrowser::tag_table()
} }
if (table.cols.get(tr_pos-1)-td_pos>1) && (tag.get_number_of("width")) { if (table.cols.get(tr_pos-1)-td_pos>1) && (tag.get_number_of("width")) {
if (strchr(tag.value, '%')) { if (strchr(tag.value, '%')) {
tag.number = cur_cell_w - table.margin - 23 - left_gap * tag.number / 100; tag.number = table.width.get(table.count) - table.margin - 23 - left_gap * tag.number / 100;
} }
if (tag.number < draw_w) draw_w = tag.number; if (tag.number < draw_w) draw_w = tag.number;
} }
draw_y = row_start_y; 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++; td_pos++;
} }
} }
} }
if (draw_x > cur_cell_w) { if (draw_x > table.width.get(table.count)) {
draw_x = left_gap = table.margin; draw_x = left_gap = table.margin;
draw_w = cur_cell_w - table.margin - 23 - left_gap; draw_w = table.width.get(table.count) - table.margin - 23 - left_gap;
table.depth = 0; table.depth = 0;
NewLine(); NewLine();
if (debug_mode) { if (debug_mode) {
@@ -472,8 +498,11 @@ void TWebBrowser::tag_table()
canvas.DrawBar(0, draw_y, 20, 20, 0xFF0000); canvas.DrawBar(0, draw_y, 20, 20, 0xFF0000);
} }
} }
//if (left_gap + draw_w > list.w) { /*
// draw_w = list.w - left_gap; if (left_gap + draw_w > list.w) {
// if (debug_mode) debugln("anomaly draw_W"); draw_w = list.w - left_gap;
//} if (debug_mode) debugln("anomaly draw_W");
} }
*/
}

View File

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

View File

@@ -1,4 +1,4 @@
//Copyright 2007-2025 by Veliant & Leency //Copyright 2007-2021 by Veliant & Leency
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr... //Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
//BUGS //BUGS
@@ -45,6 +45,7 @@
bool debug_mode = false; bool debug_mode = false;
bool show_images = true; bool show_images = true;
bool source_mode = false; bool source_mode = false;
bool application_mode = false;
_history history; _history history;
@@ -109,6 +110,9 @@ void HandleParam()
history.add(#param + 8); history.add(#param + 8);
} else if (!strncmp(#param, "-new ", 5)) { } else if (!strncmp(#param, "-new ", 5)) {
history.add(#param + 5); history.add(#param + 5);
} else if (!strncmp(#param, "-app ", 5)) {
history.add(#param + 5);
application_mode = true;
} else { } else {
if (GetProcessesCount("WEBVIEW") == 1) { if (GetProcessesCount("WEBVIEW") == 1) {
history.add(#param); history.add(#param);
@@ -132,6 +136,14 @@ void main()
LoadLibraries(); LoadLibraries();
HandleParam(); 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.left = PADDING+TSZE*2+PADDING+6;
omnibox_edit.top = PADDING+3; omnibox_edit.top = PADDING+3;
@@ -209,6 +221,15 @@ void main()
if (http.transfer <= 0) break; if (http.transfer <= 0) break;
http.receive(); 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 (http.receive_result != 0) break;
if (debug_mode) { if (debug_mode) {
EAX = http.transfer; EAX = http.transfer;
@@ -227,15 +248,6 @@ void main()
notify("'Too many redirects.' -E"); notify("'Too many redirects.' -E");
} }
} else { } 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 // Loading the page is complete, free resources
redirect_count = 0; redirect_count = 0;
if (http_get_type==PAGE) { if (http_get_type==PAGE) {
@@ -312,7 +324,7 @@ void ProcessKeyEvent()
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT)
{ {
if (key_scancode == SCAN_CODE_TAB) {EventActivatePreviousTab();return;} if (key_scancode == SCAN_CODE_TAB) {EventActivatePreviousTab();return;}
if (key_scancode == SCAN_CODE_BS) {EventOpenNewTab(URL_SERVICE_TEST);return;} if (key_scancode == SCAN_CODE_KEY_T) {EventOpenNewTab(URL_SERVICE_TEST);return;}
} }
if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) switch(key_scancode) if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) switch(key_scancode)
@@ -337,7 +349,6 @@ void ProcessKeyEvent()
{ {
case SCAN_CODE_UP: EventScrollUpAndDown(SCAN_CODE_UP); return; case SCAN_CODE_UP: EventScrollUpAndDown(SCAN_CODE_UP); return;
case SCAN_CODE_DOWN: EventScrollUpAndDown(SCAN_CODE_DOWN); 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_F6: {omnibox_edit.flags=ed_focus; DrawOmnibox();} return;
case SCAN_CODE_F5: EventRefreshPage(); return; case SCAN_CODE_F5: EventRefreshPage(); return;
case SCAN_CODE_ENTER: if (omnibox_edit.flags & ed_focus) EventSubmitOmnibox(); return; case SCAN_CODE_ENTER: if (omnibox_edit.flags & ed_focus) EventSubmitOmnibox(); return;
@@ -371,21 +382,23 @@ void draw_window()
SetElementSizes(); SetElementSizes();
DrawBar(0,0, Form.cwidth,PADDING, sc.work); if (!application_mode) {
DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work); DrawBar(0,0, Form.cwidth,PADDING, sc.work);
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.dark, sc.work, 180)); DrawBar(0,PADDING+TSZE+1, Form.cwidth,PADDING-1, sc.work);
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.line); DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.dark, sc.work, 180));
DrawBar(0, PADDING, omnibox_edit.left-2, TSZE+1, sc.work); DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.line);
DrawBar(omnibox_edit.left+omnibox_edit.width+18, PADDING, Form.cwidth-omnibox_edit.left-omnibox_edit.width-18, TSZE+1, sc.work); DrawBar(0, PADDING, omnibox_edit.left-2, TSZE+1, sc.work);
DrawBar(omnibox_edit.left+omnibox_edit.width+18, PADDING, Form.cwidth-omnibox_edit.left-omnibox_edit.width-18, TSZE+1, sc.work);
DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30, false); DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30, false);
DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31, false); DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31, false);
DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE-3, PADDING, -1, burger_active); //burger menu DrawTopPanelButton(SANDWICH_BUTTON, Form.cwidth-PADDING-TSZE-3, PADDING, -1, burger_active); //burger menu
DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.line); DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, sc.line);
DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x, DrawRectangle(WB1.list.x + WB1.list.w, WB1.list.y, scroll_wv.size_x,
WB1.list.h-1, scroll_wv.bckg_col); WB1.list.h-1, scroll_wv.bckg_col);
}
if (!canvas.bufw) { if (!canvas.bufw) {
EventOpenFirstPage(); EventOpenFirstPage();
@@ -393,9 +406,12 @@ void draw_window()
WB1.DrawPage(); WB1.DrawPage();
DrawOmnibox(); DrawOmnibox();
} }
DrawProgress(); if (!application_mode) {
DrawStatusBar(NULL); DrawProgress();
DrawTabsBar(); DrawStatusBar(NULL);
DrawTabsBar();
}
} }
void EventOpenFirstPage() void EventOpenFirstPage()
@@ -572,6 +588,7 @@ void OpenPage(dword _open_URL)
history.add(#new_url); history.add(#new_url);
WB1.custom_encoding = -1; WB1.custom_encoding = -1;
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)); 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)); else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test));
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory(); 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));
@@ -740,12 +757,7 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){
WB1.DrawPage(); WB1.DrawPage();
} }
http.hfree(); http.hfree();
if (WB1.img_url.count) { if (WB1.img_url.count) { GetImg(true); DrawOmnibox(); }
GetImg(true);
DrawOmnibox();
} else {
PageLoaded();
}
} }
} }
@@ -758,6 +770,7 @@ bool UrlExtIs(dword base, ext)
void DrawProgress() void DrawProgress()
{ {
dword pct; dword pct;
if (application_mode) return;
if (!http.transfer) 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==PAGE) && (prbar.max) pct = prbar.value*30/prbar.max; else pct = 10;
if (http_get_type==IMG) pct = prbar.value * 70 / prbar.max + 30; if (http_get_type==IMG) pct = prbar.value * 70 / prbar.max + 30;
@@ -766,18 +779,21 @@ void DrawProgress()
void EventShowPageMenu() void EventShowPageMenu()
{ {
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #rmb_menu); open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #rmb_menu);
menu_id = BACK_BUTTON; menu_id = VIEW_SOURCE;
} }
void EventShowLinkMenu() void EventShowLinkMenu()
{ {
if (application_mode) return;
open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #link_menu); open_lmenu(mouse.x, mouse.y, MENU_TOP_LEFT, NULL, #link_menu);
menu_id = IN_NEW_TAB; menu_id = IN_NEW_TAB;
} }
void EventShowMainMenu() void EventShowMainMenu()
{ {
if (application_mode) return;
open_lmenu(Form.cwidth - PADDING -4, PADDING + TSZE + 3, open_lmenu(Form.cwidth - PADDING -4, PADDING + TSZE + 3,
MENU_TOP_RIGHT, NULL, #main_menu); MENU_TOP_RIGHT, NULL, #main_menu);
menu_id = OPEN_FILE; menu_id = OPEN_FILE;
@@ -785,6 +801,7 @@ void EventShowMainMenu()
void EventShowEncodingsList() void EventShowEncodingsList()
{ {
if (application_mode) return;
open_lmenu(Form.cwidth-4, Form.cheight - STATUSBAR_H + 12, open_lmenu(Form.cwidth-4, Form.cheight - STATUSBAR_H + 12,
MENU_BOT_RIGHT, WB1.cur_encoding + 1, MENU_BOT_RIGHT, WB1.cur_encoding + 1,
"UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866"); "UTF-8\nKOI8-RU\nCP1251\nCP1252\nISO8859-5\nCP866");
@@ -807,8 +824,7 @@ void EventSeachWeb()
{ {
char new_url[URL_SIZE+1]; char new_url[URL_SIZE+1];
replace_char(#editURL, ' ', '+', URL_SIZE); replace_char(#editURL, ' ', '+', URL_SIZE);
//strcpy(#new_url, "https://html.duckduckgo.com/html/?q="); strcpy(#new_url, "https://www.google.com/search?q=");
strcpy(#new_url, "http://bing.com/search?q=");
strncat(#new_url, #editURL, URL_SIZE); strncat(#new_url, #editURL, URL_SIZE);
OpenPage(#new_url); OpenPage(#new_url);
} }
@@ -870,6 +886,7 @@ void DrawStatusBar(dword _msg)
{ {
dword status_y = Form.cheight - STATUSBAR_H + 4; dword status_y = Form.cheight - STATUSBAR_H + 4;
dword status_w = Form.cwidth - 90; dword status_w = Form.cwidth - 90;
if (application_mode) return;
if (Form.status_window>2) return; if (Form.status_window>2) return;
DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work); DrawBar(0,Form.cheight - STATUSBAR_H+1, Form.cwidth,STATUSBAR_H-1, sc.work);
if (_msg) { if (_msg) {
@@ -883,6 +900,7 @@ void DrawStatusBar(dword _msg)
void DrawOmnibox() void DrawOmnibox()
{ {
int imgxoff; int imgxoff;
if (application_mode) return;
DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+18, 24, sc.line, DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+18, 24, sc.line,
sc.line, sc.line, sc.dark); sc.line, sc.line, sc.dark);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+18, 1, 0xD8DCD8); DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+18, 1, 0xD8DCD8);
@@ -901,6 +919,7 @@ void DrawOmnibox()
void SetOmniboxText(dword _text) void SetOmniboxText(dword _text)
{ {
if (application_mode) return;
edit_box_set_text stdcall (#omnibox_edit, _text); edit_box_set_text stdcall (#omnibox_edit, _text);
omnibox_edit.pos = omnibox_edit.flags = 0; omnibox_edit.pos = omnibox_edit.flags = 0;
DrawOmnibox(); DrawOmnibox();
@@ -981,13 +1000,8 @@ dword GetImg(bool _new)
DrawStatusBar(T_RENDERING); DrawStatusBar(T_RENDERING);
WB1.Reparse(); WB1.Reparse();
WB1.DrawPage(); WB1.DrawPage();
PageLoaded(); debugln(sprintf(#param, T_DONE_IN_SEC, GetStartTime()-render_start_time/100));
} DrawStatusBar(NULL);
void PageLoaded()
{
DrawStatusBar(sprintf(#param, T_DONE_IN_SEC, GetStartTime()-render_start_time/100,
GetStartTime()-render_start_time*10));
} }
stop: stop:

View File

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

View File

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

View File

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

View File

@@ -1,15 +1,17 @@
<html><head><meta charset="cp-866"> <html>
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AD><EFBFBD></title></head> <head>
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD> WebView! <meta charset="cp-866">
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AD><EFBFBD></title>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol> </head>
<li><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><></a> <body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
<li><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a> 1. <a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E0A0AD><EFBFBD> KolibriOS</a>
<li><a href="//ftp.kolibrios.org">FTP <20><><EFBFBD></a></ol> 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>
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font> <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> <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> <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><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><EFBFBD> <EFBFBD><EFBFBD><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> <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>. &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,22 +2,23 @@
<title>TEST</title> <title>TEST</title>
<style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style> <style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style>
<body> <body>
<pre><a href=//wiby.org>wiby.org</a> <pre>
<a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a> <a href=//kolibrios.org>KolibriOS</a>
<a href=//macintoshgarden.org/>Macintosh Garden</a> <a href=//kolibri-n.org>KolibriN10</a>
<a href=//store.kolibri-n.org>Kolibri Store</a>
<table><tr><td>Simplest: <table><tr><td>Simplest:
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a> <a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
<a href=//pci-ids.ucw.cz>pci.ids</a> <a href=//pci-ids.ucw.cz>pci.ids</a>
<a href=//dgmag.in>dgmag.in</a> <a href=//dgmag.in>dgmag.in</a>
<a href=//web.archive.org/web/https://bash.im>bash.im</a> <a href=//bash.im>bash.im</a>
<a href=//web.archive.org/web/https://opennet.ru>opennet</a> <a href=//opennet.ru>opennet</a>
<a href=//linux.org.ru>LOR</a> <a href=//linux.org.ru>LOR</a>
<a href=//web.archive.org/web/https://samlib.ru/b>samlib.ru/b</a> <a href=//baravy.by/me/b.html>baravy.by/me/b.html</a>
<a href=//web.archive.org/web/https://mirrors.pdp-11.ru>mirrors.pdp-11.ru</a> <a href=//samlib.ru/b>samlib.ru/b</a>
<a href=//web.archive.org/web/http://gona.mactar.hu/ATI_Mac/>ATI drivers for Mac</a> <a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
<td>Simple: <td>Simple:
<a href=//web.archive.org/web/http://lionovsky.us>lionovsky.us</a> <a href=//lionovsky.us>lionovsky.us</a>
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a> <a href=//os-menuet.narod.ru>os-menuet.narod.ru</a>
<a href=//mestack.narod.ru/index.html>mestack.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=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
@@ -33,7 +34,8 @@ Moderate:
<a href=//www.weitek.com/textual/support/driver.html>weitek</a> <a href=//www.weitek.com/textual/support/driver.html>weitek</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a> <a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
<td>Complex: <td>Complex:
<a href=//web.archive.org/web/https://artcon.ru>artcon.ru</a> <a href=//artcon.ru>artcon.ru</a>
<a href=//nubo.ru>nubo.ru</a> <a href=//nubo.ru>nubo.ru</a>
<a href=//salinc.ru>salinc.ru</a>
<a href=//electromyne.de>electromyne.de</a> <a href=//electromyne.de>electromyne.de</a>
<a href=//web.archive.org/web/20190403215447//www.thg.ru/>thg</a> <a href=//www.thg.ru/graphic/25year_ati_history>tom's hardware</a>

View File

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

View File

@@ -17,10 +17,8 @@
#define T_STATUS_DL_P2 " M<> <20><><EFBFBD><EFBFBD><EFBFBD> (" #define T_STATUS_DL_P2 " M<> <20><><EFBFBD><EFBFBD><EFBFBD> ("
#define T_STATUS_DL_P3 " K<>/<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> <EFBFBD>४⮢ (HTTP 3XX)' -Et" #define FILE_SAVED_AS "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>\n<><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><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 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_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"
char accept_language[]= "Accept-Language: ru\n"; char accept_language[]= "Accept-Language: ru\n";
#else #else
@@ -40,10 +38,8 @@
#define T_STATUS_DL_P2 " MB received (" #define T_STATUS_DL_P2 " MB received ("
#define T_STATUS_DL_P3 " KB/s) " #define T_STATUS_DL_P3 " KB/s) "
#define T_ERROR_TOO_MANY_REDIRECTS "'Download manager\nToo many redirects' -Et" #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 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_ERROR_STARTING_DOWNLOAD "'Error while starting download process.\nCheck entered path and Internet connection.' -E"
char accept_language[]= "Accept-Language: en\n"; char accept_language[]= "Accept-Language: en\n";
#endif #endif

View File

@@ -11,8 +11,6 @@ bool open_file = false;
dword speed; dword speed;
int redirect_count;
_http http; _http http;
checkbox autoclose = { T_AUTOCLOSE, false }; checkbox autoclose = { T_AUTOCLOSE, false };
@@ -230,7 +228,6 @@ void InitDownload()
pb.progress_color = PB_COL_PROGRESS; pb.progress_color = PB_COL_PROGRESS;
filepath = '\0'; filepath = '\0';
active_status = T_STATUS_READY; active_status = T_STATUS_READY;
redirect_count = 0;
} }
void MonitorProgress() void MonitorProgress()
@@ -244,13 +241,6 @@ void MonitorProgress()
DrawDownloadingProgress(); DrawDownloadingProgress();
} else { } else {
if (http.status_code >= 300) && (http.status_code < 400) { 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); http.header_field("location", #redirect_url, URL_SIZE);
get_absolute_url(#redirect_url, #uEdit); get_absolute_url(#redirect_url, #uEdit);
edit_box_set_text stdcall (#ed, #redirect_url); edit_box_set_text stdcall (#ed, #redirect_url);
@@ -317,9 +307,9 @@ void SaveFile(int attempt)
} }
if (CreateFile(http.content_received, http.content_pointer, #filepath)==0) { if (CreateFile(http.content_received, http.content_pointer, #filepath)==0) {
miniprintf(#notify_message, T_FILE_SAVED_AS, #filepath); miniprintf(#notify_message, FILE_SAVED_AS, #filepath);
} else { } else {
miniprintf(#notify_message, T_FILE_NOT_SAVED, #filepath); miniprintf(#notify_message, FILE_NOT_SAVED, #filepath);
} }
if (!autoclose.checked) notify(#notify_message); if (!autoclose.checked) notify(#notify_message);

View File

@@ -11,9 +11,9 @@ TODO:
http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334 http://board.kolibrios.org/viewtopic.php?f=23&t=4521&p=77334#p77334
*/ */
#define ABOUT_TITLE "EOLITE 5.28" #define ABOUT_TITLE "EOLITE 5.26a"
#define TITLE_EOLITE "Eolite File Manager 5.28" #define TITLE_EOLITE "Eolite File Manager 5.26a"
#define TITLE_KFM "Kolibri File Manager 2.28"; #define TITLE_KFM "Kolibri File Manager 2.26a";
#define MEMSIZE 1024 * 250 #define MEMSIZE 1024 * 250
#include "../lib/clipboard.h" #include "../lib/clipboard.h"
@@ -239,7 +239,6 @@ void main()
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) { if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT) {
EventChooseFilesRange(old_cur_y, files.cur_y); EventChooseFilesRange(old_cur_y, files.cur_y);
} else if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) { } else if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) {
if (!getSelectedCount()) EventChooseFile(old_cur_y);
EventChooseFile(files.cur_y); EventChooseFile(files.cur_y);
DrawStatusBar(); DrawStatusBar();
List_ReDraw(); List_ReDraw();
@@ -540,13 +539,16 @@ void draw_window()
incn x; incn x;
dword title; dword title;
static int rand_n; static int rand_n;
if (!rand_n) && (Form.width + 1 != screen.w) rand_n = random(80); if (!rand_n) rand_n = random(80);
#define STBAR_EOLITE_H 16
#define STBAR_KFM_H 21
if (efm) status_bar_h = STBAR_KFM_H;
else status_bar_h = STBAR_EOLITE_H;
if (show_status_bar.checked) {
#define STBAR_EOLITE_H 16
#define STBAR_KFM_H 21
if (efm) status_bar_h = STBAR_KFM_H;
else status_bar_h = STBAR_EOLITE_H;
} else {
status_bar_h = 0;
}
if (efm) title = TITLE_KFM; else title = TITLE_EOLITE; 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); DefineAndDrawWindow(Form.left+rand_n,Form.top+rand_n,Form.width,Form.height,0x73,NULL,title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
@@ -594,7 +596,7 @@ void draw_window()
} }
//main rectangles //main rectangles
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,sc.line); DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,sc.line);
DrawBar(0,39,1,-status_bar_h + Form.cheight - 40, sc.work); DrawBar(0,39,1,-show_status_bar.checked*status_bar_h + Form.cheight - 40, sc.work);
EBX = Form.cwidth-1 * 65536 + 1; EBX = Form.cwidth-1 * 65536 + 1;
$int 64 $int 64
for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.dark, sc.work, i*10)); for (i=0; i<6; i++) DrawBar(0, 34+i, Form.cwidth, 1, MixColors(sc.dark, sc.work, i*10));
@@ -649,13 +651,17 @@ void DrawStatusBar()
{ {
char status_bar_str[80]; char status_bar_str[80];
int go_up_folder_exists=0; int go_up_folder_exists=0;
DrawBar(0, Form.cheight - status_bar_h-1, Form.cwidth, 1, sc.light); 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);
if (efm) { if (efm) {
DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, 2, sc.work); DrawBar(0, Form.cheight - status_bar_h, Form.cwidth, 2, sc.work);
DrawBar(0, Form.cheight - 2, Form.cwidth, 2, EDX); DrawBar(0, Form.cheight - 2, Form.cwidth, 2, EDX);
DrawBar(Form.cwidth-1, Form.cheight - 19, 1, 17, EDX); DrawBar(Form.cwidth-1, Form.cheight - 19, 1, 17, EDX);
DrawFuncButtonsInKfm(); DrawFuncButtonsInKfm();
} else { } else if (show_status_bar.checked) {
if (files.count>0) && (streq(items.get(0)*304+buf+72,"..")) go_up_folder_exists=1; 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); 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); sprintf(#status_bar_str, T_STATUS_EVEMENTS, folder_count-go_up_folder_exists, files.count-folder_count);
@@ -1109,6 +1115,7 @@ void EventClosePopinForm()
void ShowPopinForm(byte _popin_type) void ShowPopinForm(byte _popin_type)
{ {
int popinx; int popinx;
popin_string[0] = -1;
switch(_popin_type) { switch(_popin_type) {
case POPIN_PATH: case POPIN_PATH:
edit_box_set_text stdcall (#popin_text, path); edit_box_set_text stdcall (#popin_text, path);
@@ -1123,7 +1130,6 @@ void ShowPopinForm(byte _popin_type)
DrawEolitePopup(T_CREATE, T_CANCEL); DrawEolitePopup(T_CREATE, T_CANCEL);
break; break;
case POPIN_RENAME: case POPIN_RENAME:
if (itdir) && (streq(#file_name,"..")) return;
edit_box_set_text stdcall (#popin_text, #file_name); edit_box_set_text stdcall (#popin_text, #file_name);
DrawEolitePopup(T_RENAME, T_CANCEL); DrawEolitePopup(T_RENAME, T_CANCEL);
break; break;
@@ -1181,7 +1187,7 @@ void FnProcess(byte N)
if (files.count) ShowPopinForm(POPIN_RENAME); if (files.count) ShowPopinForm(POPIN_RENAME);
break; break;
case 3: case 3:
if (files.count) && (!itdir) RunProgram("/sys/develop/heed", #file_path); if (files.count) && (!itdir) RunProgram("/kolibrios/utils/quark", #file_path);
break; break;
case 4: case 4:
if (files.count) && (!itdir) RunProgram("/sys/develop/cedit", #file_path); 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; about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2;
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE); WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE); WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
WriteTextLines(73,163,0x90,sc.work_text," By Leency\nand KolibriOS Team\n 2008-2025",20); WriteTextLines(73,163,0x90,sc.work_text," By Leency\nand KolibriOS Team\n 2008-2021",20);
#ifdef LANG_RUS #ifdef LANG_RUS
DrawStandartCaptButton(60,about_form.cheight-38,11,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧࠡ<E0A0A7>"); DrawStandartCaptButton(60,about_form.cheight-38,11,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧࠡ<E0A0A7>");
#endif #endif

View File

@@ -38,7 +38,7 @@
char *kfm_func = { char *kfm_func = {
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<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><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 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_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 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 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 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 LIST_LINE_HEIGHT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> ᯨ᪥"
#define SAVE_PATH_AS_DEFAULT "<22><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD>" #define SAVE_PATH_AS_DEFAULT "<22><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD>"
@@ -137,7 +137,7 @@ char *actions[] = {
char *kfm_func = { char *kfm_func = {
"Info", "Info",
"Rename", "Rename",
"HEX View", "View",
"Edit", "Edit",
"Copy", "Copy",
"Move", "Move",
@@ -185,9 +185,9 @@ char *actions[] = {
#define TITLE_SETT "Settings" #define TITLE_SETT "Settings"
#define SHOW_DEVICE_CLASS "Show device class name" #define SHOW_DEVICE_CLASS "Show device class name"
#define SHOW_STATUS_BAR "Show status bar"
#define BIG_ICONS "Big icons in list" #define BIG_ICONS "Big icons in list"
#define COLORED_LINES "Highlight even lines in list" #define COLORED_LINES "Highlight even lines in list"
#define FONT_BOLD "Bold font"
#define FONT_SIZE_LABEL "Font size" #define FONT_SIZE_LABEL "Font size"
#define LIST_LINE_HEIGHT "List line height" #define LIST_LINE_HEIGHT "List line height"
#define SAVE_PATH_AS_DEFAULT "Current path" #define SAVE_PATH_AS_DEFAULT "Current path"

View File

@@ -158,27 +158,25 @@ void _SystemDiscs::DrawOptions(int draw_x)
SystemDiscs.Get(); SystemDiscs.Get();
DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.line); 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++) { for (i=0;i<list.count;i++) {
strcpy(#dev_name, list.get(i)); strcpy(#dev_name, list.get(i));
GetDiskIconAndName(#dev_name, #dev_icon, #disc_name); GetDiskIconAndName(#dev_name, #dev_icon, #disc_name);
if (strstr(path, #dev_name)!=0) kfont.bold=true; else kfont.bold=false; if (strstr(path, #dev_name)!=0) is_active=true; else is_active=false;
DrawBar(draw_x, optionsy, DDW, KFM2_DEVH, 0xFFFFFF); DrawBar(draw_x, optionsy, DDW, KFM2_DEVH, 0xFFFFFF);
DefineButton(draw_x, optionsy, DDW, KFM2_DEVH-1, 100+i+BT_HIDE,0xFFFFFF); DefineButton(draw_x, optionsy, DDW, KFM2_DEVH-1, 100+i+BT_HIDE,0xFFFFFF);
PutImage(draw_x + 5, optionsy+2, 18,17, kfont.bold*7+dev_icon*17*18*3+#devices); PutImage(draw_x + 5, optionsy+2, 18,17, is_active*7+dev_icon*17*18*3+#devices);
if (is_active) kfont.bold = true;
//strncpy(#volume_label, GetVolumeLabel(#dev_name), sizeof(volume_label)); //strncpy(#volume_label, GetVolumeLabel(#dev_name), sizeof(volume_label));
strcpy(#label_file_name, #dev_name); strcpy(#label_file_name, #dev_name);
//if (dev_name[1]!='k') && (dev_name[2]!='y') { //if (dev_name[1]!='k') && (dev_name[2]!='y') {
// if (volume_label) sprintf(#label_file_name, "%s [%s]", #dev_name, #volume_label); // 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.WriteIntoWindow(draw_x + 24, optionsy+2, 0xFFFfff, 0x000000, kfont.size.pt, #label_file_name+1);
kfont.bold = false;
optionsy += KFM2_DEVH; optionsy += KFM2_DEVH;
} }
$pop eax
kfont.bold = EAX;
} }

View File

@@ -9,9 +9,9 @@ edit_box path_start_ed = {290,50,57,0xffffff,0x94AECE,0xffffff,0xffffff,0x100000
more_less_box font_size = { NULL, 9, 22, FONT_SIZE_LABEL }; more_less_box 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, 16, 64, LIST_LINE_HEIGHT };
checkbox show_dev_name = { SHOW_DEVICE_CLASS }; checkbox show_dev_name = { SHOW_DEVICE_CLASS };
checkbox show_status_bar = { SHOW_STATUS_BAR };
checkbox big_icons = { BIG_ICONS }; checkbox big_icons = { BIG_ICONS };
checkbox colored_lines = { COLORED_LINES }; checkbox colored_lines = { COLORED_LINES };
checkbox bold_font = { FONT_BOLD };
void settings_dialog() void settings_dialog()
@@ -51,10 +51,8 @@ void settings_dialog()
break; break;
} }
show_dev_name.click(id); show_dev_name.click(id);
show_status_bar.click(id);
colored_lines.click(id); colored_lines.click(id);
if (bold_font.click(id)) {
kfont.bold^=1;
}
if (font_size.click(id)) { if (font_size.click(id)) {
kfont.size.pt = font_size.value; kfont.size.pt = font_size.value;
kfont.changeSIZE(); kfont.changeSIZE();
@@ -74,7 +72,7 @@ void settings_dialog()
case evReDraw: case evReDraw:
DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400, DefineAndDrawWindow(Form.cwidth-300/2+Form.left, Form.cheight-292/2+Form.top, 400,
345+skin_h,0x34,sc.work,TITLE_SETT,0); -efm*42+345+skin_h,0x34,sc.work,TITLE_SETT,0);
GetProcessInfo(#Settings, SelfInfo); GetProcessInfo(#Settings, SelfInfo);
DrawSettingsCheckBoxes(); DrawSettingsCheckBoxes();
} }
@@ -98,10 +96,10 @@ void DrawSettingsCheckBoxes()
y.n = 0; y.n = 0;
if (!efm) { if (!efm) {
show_dev_name.draw(XXX, y.inc(14)); show_dev_name.draw(XXX, y.inc(14));
show_status_bar.draw(XXX, y.inc(25));
} }
big_icons.draw(XXX, y.inc(25)); big_icons.draw(XXX, y.inc(25));
colored_lines.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)); font_size.draw(XXX, y.inc(31));
line_height.draw(XXX, y.inc(31)); line_height.draw(XXX, y.inc(31));
@@ -123,7 +121,7 @@ void LoadIniSettings()
files.SetFont(6, 9, 10000000b); files.SetFont(6, 9, 10000000b);
show_dev_name.checked = ini.GetInt("ShowDeviceName", true); show_dev_name.checked = ini.GetInt("ShowDeviceName", true);
kfont.bold = bold_font.checked = ini.GetInt("BoldFont", false); show_status_bar.checked = ini.GetInt("ShowStatusBar", true);
big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch(); big_icons.checked = ini.GetInt("BigIcons", false); BigIconsSwitch();
colored_lines.checked = ini.GetInt("ColoredLines", true); colored_lines.checked = ini.GetInt("ColoredLines", true);
kfont.size.pt = ini.GetInt("FontSize", 13); kfont.size.pt = ini.GetInt("FontSize", 13);
@@ -143,7 +141,7 @@ void LoadIniSettings()
void SaveIniSettings() void SaveIniSettings()
{ {
ini.SetInt("ShowDeviceName", show_dev_name.checked); ini.SetInt("ShowDeviceName", show_dev_name.checked);
ini.SetInt("BoldFont", bold_font.checked); ini.SetInt("ShowStatusBar", show_status_bar.checked);
ini.SetInt("BigIcons", big_icons.checked); ini.SetInt("BigIcons", big_icons.checked);
ini.SetInt("ColoredLines", colored_lines.checked); ini.SetInt("ColoredLines", colored_lines.checked);
ini.SetInt("FontSize", kfont.size.pt); ini.SetInt("FontSize", kfont.size.pt);

View File

@@ -0,0 +1,6 @@
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

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

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,8 @@
#define MEMSIZE 1024*30
#define ENTRY_POINT #main
#include "../lib/kfont.h"
#include "../lib/gui.h"
#define BARH 28 #define BARH 28
#define WINW 528 #define WINW 528
@@ -8,8 +12,11 @@ char active_tab = 0;
char colored = true; char colored = true;
dword checkbox_flag; dword checkbox_flag;
void main_kfont() void main()
{ {
proc_info Form;
mem_init();
checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ); checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ);
if (!param) strcpy(#param, DEFAULT_FONT); if (!param) strcpy(#param, DEFAULT_FONT);
@@ -41,7 +48,7 @@ void main_kfont()
case evReDraw: case evReDraw:
sc.get(); sc.get();
DefineAndDrawWindow(215,100,WINW+9,WINH+skin_h+4,0x74,0xFFFFFF,#title,0); DefineAndDrawWindow(215,100,WINW+9,WINH+GetSkinHeight()+4,0x74,0xFFFFFF,#title,0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) break; if (Form.status_window&ROLLED_UP) break;
_DRAW_WINDOW_CONTENT: _DRAW_WINDOW_CONTENT:

View File

@@ -13,6 +13,7 @@ struct collection_int
dword buf; dword buf;
dword buf_size; dword buf_size;
unsigned count; unsigned count;
void alloc();
void add(); void add();
dword get(); dword get();
dword set(); dword set();
@@ -21,35 +22,34 @@ struct collection_int
dword get_last(); dword get_last();
void pop(); void pop();
void drop(); void drop();
#define DWSIZE4 4
}; };
:void collection_int::add(dword _in) { :void collection_int::alloc() {
unsigned i;
if (!buf) { if (!buf) {
//if (buf_size) notify("'buf_size on empty buf' -A"); buf_size = 4096;
buf_size = 4096 * 5; buf = malloc(4096);
buf = malloc(4096 * 5); } else {
//if (!buf) notify("'malloc error' -E"); buf_size += 4096;
} else if (count + 1 * DWSIZE4 >= buf_size) {
buf_size += 4096 * 5;
buf = realloc(buf, buf_size); buf = realloc(buf, buf_size);
//if (!buf) notify("'realloc error' -E");
} }
i = count * DWSIZE4 + buf; }
ESDWORD[i] = _in;
:void collection_int::add(dword _in) {
if (!buf) || (count * sizeof(dword) >= buf_size) alloc();
EAX = count * sizeof(dword) + buf;
ESDWORD[EAX] = _in;
count++; count++;
} }
:dword collection_int::get(dword pos) { :dword collection_int::get(dword pos) {
if (!buf) || (pos<0) || (pos>=count) return 0; if (pos<0) || (pos>=count) return 0;
return ESDWORD[pos * DWSIZE4 + buf]; return ESDWORD[pos * sizeof(dword) + buf];
} }
:dword collection_int::set(dword pos, _in) { :dword collection_int::set(dword pos, _in) {
while (pos >= count) add(0); while (pos >= count) add(0);
EAX = pos * DWSIZE4 + buf; EAX = pos * sizeof(dword) + buf;
ESDWORD[EAX] = _in; ESDWORD[EAX] = _in;
return ESDWORD[EAX]; return ESDWORD[EAX];
} }
@@ -57,8 +57,8 @@ struct collection_int
:void collection_int::swap(dword pos1, pos2) { :void collection_int::swap(dword pos1, pos2) {
while (pos1 >= count) add(0); while (pos1 >= count) add(0);
while (pos2 >= count) add(0); while (pos2 >= count) add(0);
EAX = pos1 * DWSIZE4 + buf; EAX = pos1 * sizeof(dword) + buf;
EBX = pos2 * DWSIZE4 + buf; EBX = pos2 * sizeof(dword) + buf;
ESDWORD[EAX] >< ESDWORD[EBX]; ESDWORD[EAX] >< ESDWORD[EBX];
} }
@@ -77,8 +77,6 @@ struct collection_int
:void collection_int::drop() { :void collection_int::drop() {
count = 0; count = 0;
if (buf) buf = free(buf);
buf_size = 0;
} }
/*======================================================== /*========================================================
@@ -89,11 +87,12 @@ struct collection_int
struct collection struct collection
{ {
unsigned int realloc_size, count; int realloc_size, count;
dword data_start; dword data_start;
dword data_size; dword data_size;
collection_int offset; collection_int offset;
dword add(); int add();
int addn();
dword get(); //get_name_by_pos dword get(); //get_name_by_pos
dword get_pos_by_name(); dword get_pos_by_name();
void drop(); void drop();
@@ -106,22 +105,28 @@ struct collection
if (realloc_size<4096) realloc_size = 4096; if (realloc_size<4096) realloc_size = 4096;
if (!data_size) { if (!data_size) {
data_size = realloc_size; data_size = realloc_size;
data_start = malloc(data_size); data_start = malloc(realloc_size);
} else { }
else {
data_size = data_size + realloc_size; data_size = data_size + realloc_size;
data_start = realloc(data_start, data_size); data_start = realloc(data_start, data_size);
} }
} }
:dword collection::add(dword in) { :int collection::add(dword in) {
dword len = strlen(in); return addn(in, strlen(in));
while (offset.get(count) + len + 4 > data_size) { }
:int collection::addn(dword in, len) {
if (offset.get(count)+len+2 > data_size) {
increase_data_size(); increase_data_size();
addn(in, len);
return 1;
} }
strncpy(data_start+offset.get(count), in, len); strncpy(data_start+offset.get(count), in, len);
count++; count++;
offset.set(count, offset.get(count-1) + len + 1); offset.set(count, offset.get(count-1) + len + 1);
return data_start+offset.get(count-1); return 1;
} }
:dword collection::get(dword pos) { :dword collection::get(dword pos) {
@@ -136,9 +141,7 @@ struct collection
:dword collection::get_pos_by_name(dword name) { :dword collection::get_pos_by_name(dword name) {
dword i; dword i;
for (i=0; i<count; i++) { for (i=0; i<count; i++) {
if (streq(data_start + offset.get(i), name)) { if (strcmp(data_start + offset.get(i), name)==0) return i;
return i;
}
} }
return -1; return -1;
} }

View File

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

View File

@@ -66,11 +66,10 @@ int kfont_char_width[255];
:bool KFONT::init(dword font_path) :bool KFONT::init(dword font_path)
{ {
dword fsize_notused; dword fsize_notused;
if(font) font = free(font); if(font)free(font);
read_file(font_path, #font_begin, #fsize_notused); read_file(font_path, #font_begin, #fsize_notused);
if(!EAX) { 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; return false;
} }
changeSIZE(); changeSIZE();
@@ -100,10 +99,6 @@ int kfont_char_width[255];
:dword KFONT::getsize(byte font_size, dword text1) :dword KFONT::getsize(byte font_size, dword text1)
{ {
if (!font) {
size.width = strlen(text1) * 8;
return size.width;
}
size.height = size.width = 0; size.height = size.width = 0;
size.offset_x = size.offset_y = -1; size.offset_x = size.offset_y = -1;
if (size.pt != font_size) { if (size.pt != font_size) {
@@ -280,11 +275,6 @@ inline fastcall dword b32(EAX) { return DSDWORD[EAX]; }
{ {
if(!text1)return 0; if(!text1)return 0;
getsize(font_size, text1); getsize(font_size, text1);
if (!font) {
EDI = _background;
WriteText(x, y, 0xD0, _color, text1);
return size.width;
}
raw_size = NULL; raw_size = NULL;
WriteIntoBuffer(0, -size.offset_y, size.width-size.offset_x, WriteIntoBuffer(0, -size.offset_y, size.width-size.offset_x,
size.height-size.offset_y, _background, _color, font_size, text1); size.height-size.offset_y, _background, _color, font_size, text1);

View File

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

View File

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

View File

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

View File

@@ -10,13 +10,11 @@ SOFTWARE CENTER v2.87
#include "..\lib\obj\libini.h" #include "..\lib\obj\libini.h"
#include "..\lib\kfont.h" #include "..\lib\kfont.h"
#include "..\lib\list_box.h" #include "..\lib\list_box.h"
#include "..\lib\collection.h"
proc_info Form; proc_info Form;
#include "font_viewer.h"
llist list; llist list;
dword app_path_collection; collection app_path_collection=0;
bool kolibrios_mounted; bool kolibrios_mounted;
int window_width, int window_width,
@@ -32,10 +30,16 @@ char window_title[128],
bool small_screen = false; bool small_screen = false;
block selection[128]; struct SW_COLORS
{
dword list_bg;
dword text;
dword graph;
dword dark;
dword light;
} swc;
#define MAX_ITEMS 75 block selection[128];
#define MAX_FPATH 1024
void load_ini_config(dword _ini_path) void load_ini_config(dword _ini_path)
{ {
@@ -53,21 +57,17 @@ void main()
{ {
dword id; dword id;
kfont.init(DEFAULT_FONT); kfont.init(DEFAULT_FONT);
load_dll(libini, #lib_init,1);
if (streq(#param + strlen(#param) - 3, ".kf")) { kolibrios_mounted = dir_exists("/kolibrios");
main_kfont();
} else if (param) { if (param) {
strcpy(#settings_ini_path, #param); strcpy(#settings_ini_path, #param);
} else { } else {
strcpy(#settings_ini_path, "/sys/settings/"); strcpy(#settings_ini_path, "/sys/settings/");
strcat(#settings_ini_path, I_Path + strrchr(I_Path, '/')); strcat(#settings_ini_path, I_Path + strrchr(I_Path, '/'));
strcat(#settings_ini_path, ".ini"); 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); load_ini_config(#settings_ini_path);
list.cur_y = -1; list.cur_y = -1;
@@ -99,8 +99,8 @@ void main()
break; break;
case evReDraw: case evReDraw:
SetAppColors();
DefineAndDrawWindow(screen.w-window_width/2,screen.h-window_height/2,window_width,window_height,0x74,0,"",0); DefineAndDrawWindow(screen.w-window_width/2,screen.h-window_height/2,window_width,window_height,0x74,0,"",0);
sc.get();
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) { if (Form.status_window&ROLLED_UP) {
DrawTitle(#window_title); DrawTitle(#window_title);
@@ -110,18 +110,41 @@ void main()
DrawTitle(#window_title); DrawTitle(#window_title);
list.y = 0; list.y = 0;
} else { } else {
DrawTitle(NULL); DrawTitle(NULL);
DrawTopBar(); DrawTopBar();
} }
DrawList(); DrawList();
DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, sc.light); DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, swc.list_bg);
DrawSelection(); 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() { void DrawList() {
list.count = 0; list.count = 0;
row = -1; row = -1;
app_path_collection.drop();
list_pos = list.y; list_pos = list.y;
list.column_max = window_width - 10 / list.item_w; list.column_max = window_width - 10 / list.item_w;
ini_enum_sections stdcall (#settings_ini_path, #process_sections); ini_enum_sections stdcall (#settings_ini_path, #process_sections);
@@ -145,7 +168,7 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
col=0; col=0;
} }
if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, sc.light); if (col==0) DrawBar(0, row * list.item_h + list_pos, Form.cwidth, list.item_h, swc.list_bg);
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); 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, ','); icon_char_pos = strchr(key_value, ',');
@@ -154,21 +177,20 @@ byte draw_icons_from_section(dword key_value, key_name, sec_name, f_name)
selection[list.count].x = icon_x-2; selection[list.count].x = icon_x-2;
selection[list.count].y = icon_y-2; selection[list.count].y = icon_y-2;
if (icon_char_pos) ESBYTE[icon_char_pos] = '\0'; //delete icon from string 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_x = col*list.item_w+5;
text_y = list.item_h - 40 / 2; text_y = list.item_h - 40 / 2;
if (!strchr(key_name, ' ')) {//|| (kfont.getsize(key_name)+30<list.item_w) <== too slow 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, sc.light, sc.work_text, 12, key_name); kfont.WriteIntoWindowCenter(text_x, row*list.item_h+46 + list_pos, list.item_w,0, swc.list_bg, swc.text, 12, key_name);
} else { } else {
space_pos = strrchr(key_name, ' '); space_pos = strrchr(key_name, ' ');
ESBYTE[key_name+space_pos-1] = '\0'; ESBYTE[key_name+space_pos-1] = '\0';
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 - 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, sc.light, sc.work_text, 12, key_name+space_pos); 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);
} }
if (icon_char_pos) icon_id = atoi(icon_char_pos+1); if (icon_char_pos) icon_id = atoi(icon_char_pos+1);
if (Form.cwidth) draw_icon_32(icon_x, icon_y, sc.light, icon_id); if (Form.cwidth) draw_icon_32(icon_x, icon_y, swc.list_bg, icon_id);
list.count++; list.count++;
col++; col++;
return true; return true;
@@ -190,9 +212,10 @@ byte process_sections(dword sec_name, f_name)
old_row = row; old_row = row;
if (!small_screen) { if (!small_screen) {
DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, sc.light); 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, sc.light, sc.work_text, 15, sec_name); 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, 2, sc.work); 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);
list_pos += 29; list_pos += 29;
} }
ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
@@ -210,7 +233,7 @@ void DrawTopBar()
void EventIconClick(dword appid) void EventIconClick(dword appid)
{ {
char run_app_path[4096]; char run_app_path[4096];
dword app_path = MAX_FPATH * appid + app_path_collection; dword app_path = app_path_collection.get(appid);
dword param_pos = strchr(app_path, '|'); dword param_pos = strchr(app_path, '|');
if (param_pos) { if (param_pos) {
ESBYTE[param_pos] = NULL; ESBYTE[param_pos] = NULL;
@@ -250,7 +273,7 @@ void DrawSelection()
int i; int i;
dword col; dword col;
for (i=0; i<list.count; i++) { for (i=0; i<list.count; i++) {
if (i==list.cur_y) col=0x0080FF; else col=sc.light; if (i==list.cur_y) col=0x0080FF; else col=swc.list_bg;
DrawWideRectangle(selection[i].x, selection[i].y, 36, 36, 2, col); DrawWideRectangle(selection[i].x, selection[i].y, 36, 36, 2, col);
} }
} }

View File

@@ -23,8 +23,11 @@ MAX_TRIANGLES equ 12
SCREEN_X equ 320 SCREEN_X equ 320
SCREEN_Y equ 200 SCREEN_Y equ 200
include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
;purge mov ;purge mov
include 'ascl.inc'
include 'ascgl.inc'
START: START:
init_sin_cos: init_sin_cos:
@@ -62,47 +65,7 @@ still:
; cmp eax,3 ; button in buffer ? ; cmp eax,3 ; button in buffer ?
jz button 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: main_loop:
@@ -149,15 +112,15 @@ exit:
draw_window: draw_window:
mcall 12, 1 ;Start window redraw mcall 12, 1 ;Start window redraw
mcall 48, 4 mcall 48, 4
lea ecx,[100*65536+SCREEN_Y+4+eax]; [y start] *65536 + [y size] + [skin_height] lea ecx, [100*65536+SCREEN_Y+4+eax]; [y start] *65536 + [y size] + [skin_height]
xor eax,eax ;Draw window xor eax, eax ;Draw window
mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size mov ebx,100*65536+(SCREEN_X+9) ;x start*65536+x size
mov edx,0x54000000 ;0x03 use skinned window mov edx,0x54000000 ;0x03 use skinned window
mov edi,title mov edi,title
mcall mcall
mcall 12, 2 ;End window redraw mcall 12, 2 ;End window redraw
ret ret
@@ -233,7 +196,7 @@ clear_screen_buffer:
rep stosd rep stosd
ret ret
;include triangle.asm ;include triangle.asm
; Mikolaj Felix 14/5/2001 ; Mikolaj Felix 14/5/2001
; mfelix@polbox.com ; mfelix@polbox.com

View File

@@ -3,4 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())
tup.rule({"3DCUBE2.ASM"}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2") 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")

View File

@@ -0,0 +1,624 @@
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

@@ -0,0 +1,499 @@
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

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +0,0 @@
@fasm.exe -m 16384 aclock.asm aclock.kex
@kpack aclock.kex
pause

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

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

View File

@@ -17,6 +17,8 @@
; along with this program; if not, write to the Free Software ; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
; ;
%ifndef _CMDLINE_INC
%define _CMDLINE_INC
;******************************************************************** ;********************************************************************
@@ -103,7 +105,8 @@ parseCommandLine:
; output : eax contains position ; output : eax contains position
; destroys : nothing ; destroys : nothing
parsePositionParam: parsePositionParam:
push ebx esi push ebx
push esi
pushfd pushfd
; is the second char of the parameter a '-' ? ; is the second char of the parameter a '-' ?
@@ -126,7 +129,8 @@ parsePositionParam:
.rotationshyperboloid: .rotationshyperboloid:
popfd popfd
pop esi ebx pop esi
pop ebx
ret ret
; parse dimension parameter ; parse dimension parameter
@@ -143,4 +147,5 @@ parseSizeParam:
ret ret
%endif

View File

@@ -19,34 +19,20 @@
; along with this program; if not, write to the Free Software ; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
; ;
%ifndef _DBGBOARD_INC
%define _DBGBOARD_INC
if DEBUG eq %ifdef DEBUG
macro DBG_BOARD_PRINTNEWLINE {
}
macro DBG_BOARD_PRINTCHAR c1 {
}
macro DBG_BOARD_PRINTDWORD w1 {
}
macro DBG_BOARD_PRINTSTRINGLITERAL p1 {
}
macro DBG_BOARD_PRINTSTRING s1 {
}
else
;******************************************************************** ;********************************************************************
; print newline ; print newline
; no input ; no input
;******************************************************************** ;********************************************************************
macro DBG_BOARD_PRINTNEWLINE { %macro DBG_BOARD_PRINTNEWLINE 0
call dbg_board_printnewline call dbg_board_printnewline
} %endm
;******************************************************************** ;********************************************************************
@@ -58,12 +44,12 @@ macro DBG_BOARD_PRINTNEWLINE {
; DBG_BOARD_PRINTCHAR [esi] ; DBG_BOARD_PRINTCHAR [esi]
; DBG_BOARD_PRINTCHAR [somevariable] ; DBG_BOARD_PRINTCHAR [somevariable]
;******************************************************************** ;********************************************************************
macro DBG_BOARD_PRINTCHAR c1 { %macro DBG_BOARD_PRINTCHAR 1
push ecx push ecx
mov cl,byte c1 mov cl,byte %1
call dbg_board_printchar call dbg_board_printchar
pop ecx pop ecx
} %endm
@@ -74,10 +60,10 @@ macro DBG_BOARD_PRINTCHAR c1 {
; DBG_BOARD_PRINTDWORD 0xdeadbeef ; DBG_BOARD_PRINTDWORD 0xdeadbeef
; DBG_BOARD_PRINTDWORD [somevariable] ; DBG_BOARD_PRINTDWORD [somevariable]
;******************************************************************** ;********************************************************************
macro DBG_BOARD_PRINTDWORD w1 { %macro DBG_BOARD_PRINTDWORD 1
push dword w1 push dword %1
call dbg_board_printdword call dbg_board_printdword
} %endm
;******************************************************************** ;********************************************************************
@@ -87,14 +73,13 @@ macro DBG_BOARD_PRINTDWORD w1 {
; examples DBG_BOARD_PRINTSTRINGLITERAL "foo",0 ; examples DBG_BOARD_PRINTSTRINGLITERAL "foo",0
; DBG_BOARD_PRINTSTRINGLITERAL "bar",10,13,0 ; DBG_BOARD_PRINTSTRINGLITERAL "bar",10,13,0
;******************************************************************** ;********************************************************************
macro DBG_BOARD_PRINTSTRINGLITERAL p1 { %macro DBG_BOARD_PRINTSTRINGLITERAL 1+
local .foo jmp %%bar
jmp @f %%foo db %1, 0 ; terminate string, just to be sure
.foo db p1, 0 ; terminate string, just to be sure %%bar:
@@: push dword %%foo
push dword .foo
call dbg_board_printstring call dbg_board_printstring
} %endm
;******************************************************************** ;********************************************************************
@@ -104,18 +89,22 @@ macro DBG_BOARD_PRINTSTRINGLITERAL p1 {
; DBG_BOARD_PRINTSTRING esi ; DBG_BOARD_PRINTSTRING esi
; DBG_BOARD_PRINTSTRING [ebx] ; DBG_BOARD_PRINTSTRING [ebx]
;******************************************************************** ;********************************************************************
macro DBG_BOARD_PRINTSTRING s1 { %macro DBG_BOARD_PRINTSTRING 1
push dword s1 push dword %1
call dbg_board_printstring call dbg_board_printstring
} %endm
; no input ; no input
dbg_board_printnewline: dbg_board_printnewline:
pushad pushad
pushfd pushfd
mcall SF_BOARD,SSF_DEBUG_WRITE,10 mov eax,MOS_SC_DEBUGBOARD
mcall ,,13 mov ebx,1
mov ecx,10
int 0x40
mov ecx,13
int 0x40
popfd popfd
popad popad
ret ret
@@ -125,8 +114,10 @@ dbg_board_printnewline:
dbg_board_printchar: dbg_board_printchar:
pushad pushad
pushfd pushfd
mov eax,MOS_SC_DEBUGBOARD
mov ebx,1
and ecx,0xff and ecx,0xff
mcall SF_BOARD,SSF_DEBUG_WRITE int 0x40
popfd popfd
popad popad
ret ret
@@ -136,17 +127,20 @@ dbg_board_printchar:
dbg_board_printdword: dbg_board_printdword:
enter 0,0 enter 0,0
pushad pushad
pushfd pushfd
; print 0x prefix mov eax,MOS_SC_DEBUGBOARD
mcall SF_BOARD,SSF_DEBUG_WRITE,'0' mov ebx,1
mcall ,,'x' mov ecx,'0' ; print 0x prefix
int 0x40
mov ecx,'x'
int 0x40
mov edx,[ebp + 8] ; get dword to print mov edx,[ebp + 8] ; get dword to print
mov esi,8 ; iterate through all nibbles mov esi,8 ; iterate through all nibbles
.loop: .loop:
mov ecx,edx ; display hex digit mov ecx,edx ; display hex digit
shr ecx,28 shr ecx,28
movzx ecx,byte [dbg_board_printdword_digits + ecx] movzx ecx,byte [dbg_board_printdword_digits + ecx]
mcall int 0x40
shl edx,4 ; next nibble shl edx,4 ; next nibble
dec esi dec esi
jnz .loop jnz .loop
@@ -172,13 +166,35 @@ dbg_board_printstring:
or al,al ; zero ? or al,al ; zero ?
je .done ; yeah -> get outta here je .done ; yeah -> get outta here
movzx ecx,al ; nope -> display character movzx ecx,al ; nope -> display character
mcall SF_BOARD mov eax,MOS_SC_DEBUGBOARD
int 0x40
jmp .loop jmp .loop
.done: .done:
popfd popfd
popad popad
leave leave
ret 4 ret 4
%else
end if
%macro DBG_BOARD_PRINTNEWLINE 0
%endm
%macro DBG_BOARD_PRINTCHAR 1
%endm
%macro DBG_BOARD_PRINTDWORD 1
%endm
%macro DBG_BOARD_PRINTSTRINGLITERAL 1+
%endm
%macro DBG_BOARD_PRINTSTRING 1
%endm
%endif
%endif

View File

@@ -17,6 +17,8 @@
; along with this program; if not, write to the Free Software ; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
; ;
%ifndef _DRAW_INC
%define _DRAW_INC
TMR1_FACTOR dd 0.45 TMR1_FACTOR dd 0.45
@@ -48,36 +50,45 @@ monthNames:
; output : nothing ; output : nothing
; destroys : nothing ; destroys : nothing
;******************************************************************** ;********************************************************************
proc drawClock drawClock:
locals %push drawClock_context
i dd ? %stacksize flat
TMR1X dd ? %assign %$localsize 0
TMR1Y dd ?
TMR2X dd ? %local i:dword, \
TMR2Y dd ? TMR1X:dword, \
SECRX dd ? TMR1Y:dword, \
SECRY dd ? TMR2X:dword, \
MINRX dd ? TMR2Y:dword, \
MINRY dd ? SECRX:dword, \
HOURRX dd ? SECRY:dword, \
HOURRY dd ? MINRX:dword, \
workwidth dd ? MINRY:dword, \
workheight dd ? HOURRX:dword, \
foo dd ? HOURRY:dword, \
endl workwidth:dword, \
workheight:dword, \
foo:dword
enter %$localsize,0
pushad pushad
pushfd pushfd
; get window dimensions ; get window dimensions
mcall SF_THREAD_INFO,procInfo,-1 mov eax,MOS_SC_GETPROCESSINFO
mov ebx,procInfo
mov ecx,-1
int 0x40
; calculate work area size (width/height = ecx/edx) ; calculate work area size (width/height = ecx/edx)
; if the work area is too small (maybe the window is shaded) ; if the work area is too small (maybe the window is shaded)
; we don't draw anything. ; we don't draw anything.
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT ; get skin height (eax) mov eax,MOS_SC_WINDOWPROPERTIES
mov ecx,[procInfo.box.width] mov ebx,4 ; get skin height (eax)
int 0x40
mov ecx,[procInfo + MOS_PROCESSINFO.wndWidth]
sub ecx,MOS_WND_SKIN_BORDER_LEFT+MOS_WND_SKIN_BORDER_RIGHT sub ecx,MOS_WND_SKIN_BORDER_LEFT+MOS_WND_SKIN_BORDER_RIGHT
mov edx,[procInfo.box.height] mov edx,[procInfo + MOS_PROCESSINFO.wndHeight]
sub edx,eax sub edx,eax
sub edx,MOS_WND_SKIN_BORDER_BOTTOM sub edx,MOS_WND_SKIN_BORDER_BOTTOM
cmp ecx,0 ; width too small ? cmp ecx,0 ; width too small ?
@@ -91,9 +102,9 @@ proc drawClock
mov [workheight],edx mov [workheight],edx
; calculate center of clock (x/y = esi/edi) ; calculate center of clock (x/y = esi/edi)
mov esi,[procInfo.box.width] mov esi,[procInfo + MOS_PROCESSINFO.wndWidth]
shr esi,1 shr esi,1
mov edi,[procInfo.box.height] mov edi,[procInfo + MOS_PROCESSINFO.wndHeight]
sub edi,MOS_WND_SKIN_BORDER_BOTTOM sub edi,MOS_WND_SKIN_BORDER_BOTTOM
sub edi,eax sub edi,eax
shr edi,1 shr edi,1
@@ -108,8 +119,9 @@ proc drawClock
shl ecx,16 ; (=skin height) shl ecx,16 ; (=skin height)
or ecx,edx ; height or ecx,edx ; height
inc ecx inc ecx
mov edx,[wndColors.work] mov edx,[wndColors + MOS_WNDCOLORS.work]
mcall SF_DRAW_RECT mov eax,MOS_SC_DRAWBAR
int 0x40
popad popad
; calculate second hand radii ; calculate second hand radii
@@ -151,7 +163,8 @@ proc drawClock
fstp dword [TMR2Y] fstp dword [TMR2Y]
; get system clock (edx) ; get system clock (edx)
mcall SF_GET_SYS_TIME mov eax,MOS_SC_GETSYSCLOCK
int 0x40
mov edx,eax mov edx,eax
; draw second hand ; draw second hand
@@ -160,14 +173,21 @@ proc drawClock
shr eax,16 shr eax,16
call bcdbin call bcdbin
mov ecx,eax ; save seconds for later mov ecx,eax ; save seconds for later
; 2*pi/60 push ecx
stdcall getHandCoords,edi,esi,[SECRY],[SECRX],0.104719755,eax,ecx push eax
fpush32 0.104719755 ; 2*pi/60
push dword [SECRX]
push dword [SECRY]
push esi
push edi
call getHandCoords
mov eax,MOS_SC_DRAWLINE
shl ebx,16 shl ebx,16
or ebx,esi or ebx,esi
shl ecx,16 shl ecx,16
or ecx,edi or ecx,edi
mov edx,[wndColors.work_text] mov edx,[wndColors + MOS_WNDCOLORS.workText]
mcall SF_DRAW_LINE int 0x40
pop ecx pop ecx
pop edx pop edx
@@ -180,14 +200,21 @@ proc drawClock
mul edx mul edx
add eax,ecx add eax,ecx
mov ecx,eax ; save for later mov ecx,eax ; save for later
; 2*pi/60/60 push ecx
stdcall getHandCoords,edi,esi,[MINRY],[MINRX],0.001745329,eax,ecx push eax
fpush32 0.001745329 ; 2*pi/60/60
push dword [MINRX]
push dword [MINRY]
push esi
push edi
call getHandCoords
mov eax,MOS_SC_DRAWLINE
shl ebx,16 shl ebx,16
or ebx,esi or ebx,esi
shl ecx,16 shl ecx,16
or ecx,edi or ecx,edi
mov edx,[wndColors.work_text] mov edx,[wndColors + MOS_WNDCOLORS.workText]
mcall SF_DRAW_LINE int 0x40
pop ecx pop ecx
pop edx pop edx
@@ -202,39 +229,55 @@ proc drawClock
mov edx,60*60 mov edx,60*60
mul edx mul edx
add eax,ecx add eax,ecx
; 2*pi/60/60/12 push eax
stdcall getHandCoords,edi,esi,[HOURRY],[HOURRX],0.000145444,eax fpush32 0.000145444 ; 2*pi/60/60/12
push dword [HOURRX]
push dword [HOURRY]
push esi
push edi
call getHandCoords
mov eax,MOS_SC_DRAWLINE
shl ebx,16 shl ebx,16
or ebx,esi or ebx,esi
shl ecx,16 shl ecx,16
or ecx,edi or ecx,edi
mov edx,[wndColors.work_text] mov edx,[wndColors + MOS_WNDCOLORS.workText]
mcall SF_DRAW_LINE int 0x40
pop edx pop edx
; draw tick marks ; draw tick marks
mov dword [i],11 ; draw 12 marks mov dword [i],11 ; draw 12 marks
.drawtickmarks: .drawtickmarks:
; calculate start point push dword [i] ; calculate start point
; 2*pi/12 fpush32 0.523598776 ; 2*pi/12
stdcall getHandCoords,edi,esi,[TMR1Y],[TMR1X],0.523598776,[i] push dword [TMR1X]
push dword [TMR1Y]
push esi
push edi
call getHandCoords
mov eax,ebx ; save in eax and edx mov eax,ebx ; save in eax and edx
mov edx,ecx mov edx,ecx
; 2*pi/12 push dword [i]
stdcall getHandCoords,edi,esi,[TMR2Y],[TMR2X],0.523598776,[i] fpush32 0.523598776 ; 2*pi/12
push dword [TMR2X]
push dword [TMR2Y]
push esi
push edi
call getHandCoords
shl eax,16 shl eax,16
shl edx,16 shl edx,16
or ebx,eax ; ebx = x start and end or ebx,eax ; ebx = x start and end
or ecx,edx ; ecx = y start and end or ecx,edx ; ecx = y start and end
mov edx,[wndColors.work_text] mov edx,[wndColors + MOS_WNDCOLORS.workText]
mcall SF_DRAW_LINE mov eax,MOS_SC_DRAWLINE
int 0x40
dec dword [i] dec dword [i]
jns .drawtickmarks jns .drawtickmarks
DATE_WIDTH =48 %define DATE_WIDTH 48
; calculate text start position ; calculate text start position
mov eax,[procInfo.box.width] mov eax,[procInfo+MOS_PROCESSINFO.wndWidth]
sub eax,DATE_WIDTH ; x = (wndwidth-textwidth)/2 sub eax,DATE_WIDTH ; x = (wndwidth-textwidth)/2
shr eax,1 ; eax = x shr eax,1 ; eax = x
fild dword [workheight] ; y = DATE_FACTOR*workheight... fild dword [workheight] ; y = DATE_FACTOR*workheight...
@@ -249,7 +292,7 @@ proc drawClock
jb .goodbye jb .goodbye
mov ecx,ebx ; text too high ? mov ecx,ebx ; text too high ?
add ecx,10-1 add ecx,10-1
mov edx,[procInfo.box.height] mov edx,[procInfo+MOS_PROCESSINFO.wndHeight]
sub edx,MOS_WND_SKIN_BORDER_BOTTOM sub edx,MOS_WND_SKIN_BORDER_BOTTOM
cmp ecx,edx cmp ecx,edx
jnae .yousuck jnae .yousuck
@@ -263,7 +306,8 @@ proc drawClock
or ebx,eax or ebx,eax
; get date (edi) ; get date (edi)
mcall SF_GET_SYS_DATE mov eax,MOS_SC_GETDATE
int 0x40
mov edi,eax mov edi,eax
; display month ; display month
@@ -271,41 +315,44 @@ proc drawClock
shr eax,8 shr eax,8
call bcdbin call bcdbin
; ebx contains already position ; ebx contains already position
mov ecx,[wndColors.work_text] mov ecx,[wndColors+MOS_WNDCOLORS.workText]
lea edx,[monthNames-3+eax*2+eax]; -3 because eax = 1..12 =] lea edx,[monthNames-3+eax*2+eax]; -3 because eax = 1..12 =]
mov esi,3 ; text length mov esi,3 ; text length
mcall SF_DRAW_TEXT mov eax,MOS_SC_WRITETEXT
int 0x40
; display date ; display date
add ebx,(3*6+3) shl 16 add ebx,MOS_DWORD(3*6+3,0)
mov eax,edi ; get date mov eax,edi ; get date
shr eax,16 shr eax,16
call bcdbin call bcdbin
mov edx,ebx ; position must be in edx mov edx,ebx ; position must be in edx
mov ebx,0x00020000 ; number, display two digits mov ebx,0x00020000 ; number, display two digits
mov ecx,eax ; number to display mov ecx,eax ; number to display
mov esi,[wndColors.work_text] mov esi,[wndColors+MOS_WNDCOLORS.workText]
mcall SF_DRAW_NUMBER mov eax,MOS_SC_WRITENUMBER
int 0x40
; display year. the way we avoid the y2k bug is even ; display year. the way we avoid the y2k bug is even
; simpler, yet much better than in the last version: ; simpler, yet much better than in the last version:
; now we simply display the last two digits and let the ; now we simply display the last two digits and let the
; user decide wether it's the year 1903 or 2003 =] ; user decide wether it's the year 1903 or 2003 =]
add edx,(2*6+3) shl 16 add edx,MOS_DWORD(2*6+3,0)
mov eax,edi ; get year mov eax,edi ; get year
call bcdbin call bcdbin
mov ebx,0x00020000 ; number, display two digits mov ebx,0x00020000 ; number, display two digits
mov ecx,eax ; number to display mov ecx,eax ; number to display
; edx contains already position ; edx contains already position
mov esi,[wndColors.work_text] mov esi,[wndColors+MOS_WNDCOLORS.workText]
mcall SF_DRAW_NUMBER mov eax,MOS_SC_WRITENUMBER
int 0x40
.byebye: .byebye:
popfd popfd
popad popad
;leave leave
ret ret
endp %pop
;********************************************************** ;**********************************************************
@@ -350,26 +397,36 @@ bcdbin:
; destroys: ; destroys:
; nothing ; nothing
;******************************************************************** ;********************************************************************
proc getHandCoords CENTERY:dword, CENTERX:dword, RADIUSY:dword, RADIUSX:dword, DEG2RAD:dword, ANGLE:dword getHandCoords:
ANGLE equ 28
DEG2RAD equ 24
RADIUSX equ 20
RADIUSY equ 16
CENTERX equ 12
CENTERY equ 8
enter 0,0
pushfd pushfd
fild dword [ANGLE] ; get angle fild dword [ebp+ANGLE] ; get angle
fmul dword [DEG2RAD] ; convert to radians fmul dword [ebp+DEG2RAD] ; convert to radians
fsincos fsincos
fmul dword [RADIUSY] ; -y * radius + clockcy fmul dword [ebp+RADIUSY] ; -y * radius + clockcy
fchs fchs
fiadd dword [CENTERY] fiadd dword [ebp+CENTERY]
fistp dword [CENTERY] fistp dword [ebp+CENTERY]
fmul dword [RADIUSX] ; x * radius + clockcx fmul dword [ebp+RADIUSX] ; x * radius + clockcx
fiadd dword [CENTERX] fiadd dword [ebp+CENTERX]
fistp dword [CENTERX] fistp dword [ebp+CENTERX]
mov ebx,[CENTERX] mov ebx,[ebp+CENTERX]
mov ecx,[CENTERY] mov ecx,[ebp+CENTERY]
popfd popfd
;leave leave
ret ret 4*6
endp
%endif

View File

@@ -0,0 +1,3 @@
@rem nasm -t -f bin -o aclock -l aclock.lst aclock.asm -DDEBUG
nasmw -t -f bin -o aclock aclock.asm
@pause

View File

@@ -0,0 +1,334 @@
; mos.inc 0.03
; Copyright (c) 2002 Thomas Mathys
; killer@vantage.ch
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
%ifndef _MOS_INC
%define _MOS_INC
;**********************************************************
; generates a menuetos 01 header
; takes 6 parameters:
;
; MOS_HEADER01 start, end, appmem, esp, i_param, i_icon
;**********************************************************
%macro MOS_HEADER01 6
org 0x0
db 'MENUET01' ; 8 byte id
dd 0x01 ; header version
dd %1 ; start of code
dd %2 ; image size
dd %3 ; application memory
dd %4 ; esp
dd %5 ; i_param
dd %6 ; i_icon
%endmacro
;**********************************************************
; MOS_DWORD
; packs 2 words into a double word
;**********************************************************
%define MOS_DWORD(hi,lo) ((((hi) & 0xffff) << 16) + ((lo) & 0xffff))
;**********************************************************
; MOS_RGB
; creates a menuet os compatible color (0x00RRGGBB)
;**********************************************************
%define MOS_RGB(r,g,b) ((((r) & 255) << 16) + (((g) & 255) << 8) + ((b) & 255))
;**********************************************************
; window stuff
;**********************************************************
; default window colors
struc MOS_WNDCOLORS
.frame: resd 1
.grab: resd 1
.grabButton: resd 1
.grabButtonText: resd 1
.grabText: resd 1
.work: resd 1
.workButton: resd 1
.workButtonText: resd 1
.workText: resd 1
.workGraphics: resd 1
endstruc
; skinned window borders
MOS_WND_SKIN_BORDER_LEFT equ 5
MOS_WND_SKIN_BORDER_RIGHT equ 5
MOS_WND_SKIN_BORDER_BOTTOM equ 5
;**********************************************************
; process info structure
;**********************************************************
struc MOS_PROCESSINFO
.CPUUsage: resd 1
.windowStackPos: resw 1
.windowStackVal: resw 1
.reserved1: resw 1
.processName: resb 12
.memStart: resd 1
.memUsed: resd 1
.pid: resd 1
.wndXPos resd 1
.wndYPos resd 1
.wndWidth resd 1
.wndHeight resd 1
.reserved2: resb (1024 - 50)
endstruc
;**********************************************************
; system call numbers
;**********************************************************
MOS_SC_EXIT equ -1
MOS_SC_DEFINEWINDOW equ 0
MOS_SC_PUTPIXEL equ 1
MOS_SC_GETKEY equ 2
MOS_SC_GETSYSCLOCK equ 3
MOS_SC_WRITETEXT equ 4
MOS_SC_DELAY equ 5
MOS_SC_OPENFILEFLOPPY equ 6 ; obsolete
MOS_SC_PUTIMAGE equ 7
MOS_SC_DEFINEBUTTON equ 8
MOS_SC_GETPROCESSINFO equ 9
MOS_SC_WAITEVENT equ 10
MOS_SC_CHECKEVENT equ 11
MOS_SC_REDRAWSTATUS equ 12
MOS_SC_DRAWBAR equ 13
MOS_SC_GETSCREENMAX equ 14
MOS_SC_SETBACKGROUND equ 15
MOS_SC_GETPRESSEDBUTTON equ 17
MOS_SC_SYSTEMSERVICE equ 18
MOS_SC_STARTPROGRAM equ 19 ; obsolete
MOS_SC_MIDIINTERFACE equ 20
MOS_SC_DEVICESETUP equ 21
MOS_SC_WAITEVENTTIMEOUT equ 23
MOS_SC_CDAUDIO equ 24
MOS_SC_SB16MIXER1 equ 25
MOS_SC_GETDEVICESETUP equ 26
MOS_SC_WSS equ 27
MOS_SC_SB16MIXER2 equ 28
MOS_SC_GETDATE equ 29
MOS_SC_READHD equ 30 ; obsolete
MOS_SC_STARTPROGRAMHD equ 31 ; obsolete
MOS_SC_DELETEFILEFLOPPY equ 32
MOS_SC_SAVEFILERAMDISK equ 33 ; obsolete
MOS_SC_READDIRRAMDISK equ 34 ; obsolete
MOS_SC_GETSCREENPIXEL equ 35
MOS_SC_GETMOUSEPOSITION equ 37
MOS_SC_DRAWLINE equ 38
MOS_SC_GETBACKGROUND equ 39
MOS_SC_SETEVENTMASK equ 40
MOS_SC_GETIRQOWNER equ 41
MOS_SC_GETDATAREADBYIRQ equ 42
MOS_SC_SENDDATATODEVICE equ 43
MOS_SC_PROGRAMIRQS equ 44
MOS_SC_RESERVEFREEIRQ equ 45
MOS_SC_RESERVEFREEPORTS equ 46
MOS_SC_WRITENUMBER equ 47
MOS_SC_WINDOWPROPERTIES equ 48
MOS_SC_SHAPEDWINDOWS equ 50
MOS_SC_CREATETHREAD equ 51
MOS_SC_STACKDRIVERSTATE equ 52
MOS_SC_SOCKETINTERFACE equ 53
MOS_SC_SOUNDINTERFACE equ 55
MOS_SC_WRITEFILEHD equ 56 ; obsolete
MOS_SC_DELETEFILEHD equ 57
MOS_SC_SYSTREEACCESS equ 58
MOS_SC_SYSCALLTRACE equ 59
MOS_SC_IPC equ 60
MOS_SC_DIRECTGRAPHICS equ 61
MOS_SC_PCI equ 62
MOS_SC_DEBUGBOARD equ 63
;**********************************************************
; event numbers
;**********************************************************
MOS_EVT_NONE equ 0
MOS_EVT_REDRAW equ 1
MOS_EVT_KEY equ 2
MOS_EVT_BUTTON equ 3
;**********************************************************
; event bits
;**********************************************************
MOS_EVTBIT_REDRAW equ (1 << 0)
MOS_EVTBIT_KEY equ (1 << 1)
MOS_EVTBIT_BUTTON equ (1 << 2)
MOS_EVTBIT_ENDREQUEST equ (1 << 3)
MOS_EVTBIT_BGDRAW equ (1 << 4)
MOS_EVTBIT_MOUSECHANGE equ (1 << 5)
MOS_EVTBIT_IPCEVENT equ (1 << 6)
MOS_EVTBIT_IRQ0 equ (1 << 16)
MOS_EVTBIT_IRQ1 equ (1 << 17)
MOS_EVTBIT_IRQ2 equ (1 << 18)
MOS_EVTBIT_IRQ3 equ (1 << 19)
MOS_EVTBIT_IRQ4 equ (1 << 20)
MOS_EVTBIT_IRQ5 equ (1 << 21)
MOS_EVTBIT_IRQ6 equ (1 << 22)
MOS_EVTBIT_IRQ7 equ (1 << 23)
MOS_EVTBIT_IRQ8 equ (1 << 24)
MOS_EVTBIT_IRQ9 equ (1 << 25)
MOS_EVTBIT_IRQ10 equ (1 << 26)
MOS_EVTBIT_IRQ11 equ (1 << 27)
MOS_EVTBIT_IRQ12 equ (1 << 28)
MOS_EVTBIT_IRQ13 equ (1 << 29)
MOS_EVTBIT_IRQ14 equ (1 << 30)
MOS_EVTBIT_IRQ15 equ (1 << 31)
;**********************************************************
; exit application (syscall -1)
;**********************************************************
; exit application
%macro MOS_EXIT 0
mov eax,MOS_SC_EXIT
int 0x40
%endmacro
; exit application, smaller version
%macro MOS_EXIT_S 0
xor eax,eax
dec eax
int 0x40
%endmacro
;**********************************************************
; wait event stuff
; (MOS_SC_WAITEVENT, syscall 10)
;**********************************************************
; wait for event
; destroys : nothing
; returns : eax = event type
%macro MOS_WAITEVENT 0
mov eax,MOS_SC_WAITEVENT
int 0x40
%endmacro
; wait for event, smaller version
; destroys : flags
; returns : eax = event type
%macro MOS_WAITEVENT_S 0
xor eax,eax
mov al,MOS_SC_WAITEVENT
int 0x40
%endmacro
;**********************************************************
; window redraw status stuff
; (MOS_SC_REDRAWSTATUS, syscall 12)
;**********************************************************
MOS_RS_STARTREDRAW equ 1
MOS_RS_ENDREDRAW equ 2
; start window redraw
; destroys: eax,ebx
%macro MOS_STARTREDRAW 0
mov ebx,MOS_RS_STARTREDRAW
mov eax,MOS_SC_REDRAWSTATUS
int 0x40
%endmacro
; start window redraw, smaller version
; destroys: eax,ebx,flags
%macro MOS_STARTREDRAW_S 0
xor ebx,ebx
inc ebx
xor eax,eax
mov al,MOS_SC_REDRAWSTATUS
int 0x40
%endmacro
; end window redraw
; destroys: eax,ebx
%macro MOS_ENDREDRAW 0
mov ebx,MOS_RS_ENDREDRAW
mov eax,MOS_SC_REDRAWSTATUS
int 0x40
%endmacro
; end window redraw, smaller version
; destroys: eax,ebx,flags
%macro MOS_ENDREDRAW_S 0
xor ebx,ebx
mov bl,MOS_RS_ENDREDRAW
xor eax,eax
mov al,MOS_SC_REDRAWSTATUS
int 0x40
%endmacro
;**********************************************************
; get screen max stuff (syscall 14)
;**********************************************************
; get screen dimensions in eax
; destroys: nothing
%macro MOS_GETSCREENMAX 0
mov eax,MOS_SC_GETSCREENMAX
int 0x40
%endmacro
; get screen dimensions in eax, smaller version
; destroys: flags
%macro MOS_GETSCREENMAX_S 0
xor eax,eax
mov al,MOS_SC_GETSCREENMAX
int 0x40
%endmacro
;********************************************************************
; opcode hacks
;********************************************************************
; nasm refuses to assemble stuff like
; push dword 4.44
; with the following macro this becomes possible:
; fpush32 9.81
; don't forget to use a decimal point. things like
; fpush32 1
; will probably not do what you expect. instead, write:
; fpush32 1.0
%macro fpush32 1
db 0x68 ; push imm32
dd %1
%endm
%endif

View File

@@ -0,0 +1,92 @@
; string2dword - a useless string to double word conversion routine
;
; Copyright (c) 2003 Thomas Mathys
; killer@vantage.ch
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
;********************************************************************
; converts an asciiz string into an unsigned doubleword.
; (base 10 is assumed)
;
; - first, leading whitespaces are skipped
; - then the function converts the string, until it
; finds the terminating zero, another character it
; cannot convert or the number becomes too large.
;
; input : esi = pointer to string
; output : eax = unsigned doubleword
; the function tries to convert as
; many digits as possible, before it
; stops. if the value of the dword
; becomes too large, 0xffffffff is
; returned.
; destroys : nothing
;********************************************************************
string2dword:
push ebx
push ecx
push edx
push esi
pushfd
xor ebx,ebx ; ebx : dword
; skip leading whitespaces
.skipspaces:
lodsb
cmp al,32 ; space
je .skipspaces
cmp al,12 ; ff
je .skipspaces
cmp al,10 ; lf
je .skipspaces
cmp al,13 ; cr
je .skipspaces
cmp al,9 ; ht
je .skipspaces
cmp al,11 ; vt
je .skipspaces
; convert string
dec esi ; esi -> 1st non-whitespace
.convert:
xor eax,eax ; get character
lodsb
sub al,'0' ; convert to digit
cmp al,9 ; is digit in range [0,9] ?
ja .done ; nope -> stop conversion
mov ecx,eax ; save new digit
mov eax,10 ; dword = dword * 10
mul ebx
jc .overflow
add eax,ecx ; + new digit
jc .overflow
mov ebx,eax
jmp .convert
.overflow:
mov ebx,0xffffffff
.done:
mov eax,ebx
popfd
pop esi
pop edx
pop ecx
pop ebx
ret

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