1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00
Commit graph

2528 commits

Author SHA1 Message Date
Roland Heyder 4952f1b873 Allow help file updates 2022-07-31 23:35:11 +02:00
Roland Heyder b25c8b55a9 Improved help rendering
Headings enforce a blank line before it as separation to the previous section. Definition lists are rendered in blockquote style as in the Wiki, also enforce blank line separation.
2022-07-31 23:31:42 +02:00
github-actions[bot] 1efbfd03fe Automatic update of ./internal/source 2022-07-24 07:45:23 +00:00
Roland Heyder e5c778c5ea
Merge pull request #130 from QB64-Phoenix-Edition/wiki-dev
Wiki parser enhancements
2022-07-24 09:33:23 +02:00
Roland Heyder 68fb4df7c0
Merge branch 'main' into wiki-dev 2022-07-24 07:44:16 +02:00
Matt Kilgore 6cfd06a282
Merge pull request #131 from GeorgeMcGinn/patch-1
Update setup_lnx.sh to pass OS=lnx to clean
2022-07-24 01:13:51 -04:00
George McGinn 17878775c2
Update setup_lnx.sh
Added OS=lnx to the 'make clean' statement for Issue #89
2022-07-23 17:12:24 -04:00
Roland Heyder decdde5cdc Some more tweaks
Beside local #toc links also ignore #top links (top of page).
2022-07-20 16:23:18 +02:00
Roland Heyder 5a4687f1b4 Added some comments 2022-07-17 18:59:27 +02:00
Roland Heyder 4aff0cc49c Update plugins recursively
Update current page must include all used plugin templates, hence ignoring the cache for the whole process.
2022-07-17 00:34:51 +02:00
Roland Heyder d6d9c15a14 Added plugin templates
Works like $INCLUDE, but for help text. Meant to outsource recurring text into a template and plug it in where needed.
2022-07-16 23:42:05 +02:00
Roland Heyder 11dae1ccbf Fixed headings
Makes headings detection more reliable, also revised syntax notes.
2022-07-16 23:34:26 +02:00
github-actions[bot] 0a30c91d55 Automatic update of ./internal/source 2022-07-09 21:11:50 +00:00
Matt Kilgore 225c3598cd
Merge pull request #127 from mkilgore/fix-static-libraries-on-windows
Fix linking static libraries on Windows
2022-07-09 17:02:06 -04:00
github-actions[bot] 72d801e0cd Fix linking static libraries on Windows
In QB64, when linking with an external static library `nm.exe` is used
to determine whether the symbol being used is either a C or C++ symbol,
which determines how the function should be declared in the C++ code.

Unfortunately on Windows the `SHELL` command for `nm.exe` is missing the
`cmd /c`, which means the redirection does not work and consequently
we're unable to find the function declaration via `nm.exe`, which causes
the compilation to fail.

In addition to fixing this, I added tests for `DECLARE STATIC LIBRARY`
for all supported platforms.

Fixes: #112
2022-07-09 14:59:33 -04:00
github-actions[bot] 4e3873f420 Automatic update of ./internal/source 2022-07-09 18:48:23 +00:00
Matt Kilgore ae5e327b11
Merge pull request #126 from mkilgore/fix-math-eval-mod-non-integer
Math evaluator: values that round to zero can crash QB64pe
2022-07-09 14:38:20 -04:00
github-actions[bot] 863029ddfd Math evaluator: values that round to zero can crash QB64pe
The math evaluator already contains a few checks for zero when we're
executing operations that could cause a `Divide By Zero` error, but the
actual value input is floating point and can get rounded to zero when
the operation happens. This effectively allows zero values to bypass the
checks to prevent them from being evaluated.

To avoid the error completely we need to check that the rounded value is
not zero, rather than the initial value. FIX() is used to make sure
values such a `-.1` round to zero and are avoided. I also applied FIX()
when we actually execute the operation, just to ensure the same
behavior.
2022-07-09 03:23:20 -04:00
github-actions[bot] 9162e91ba6 Automatic update of ./internal/source 2022-07-06 16:10:33 +00:00
Roland Heyder d2cbf88281
Merge pull request #125 from QB64-Phoenix-Edition/wiki-dev
Semi-support local links
2022-07-06 18:00:24 +02:00
Roland Heyder 04b3d5e42a Semi-support local links
Rather than declining page local links completely, simply link to the top of the respective page, except if it's on the currently displayed page.
2022-07-06 16:13:02 +02:00
github-actions[bot] 7f14714b02 Automatic update of ./internal/source 2022-06-23 22:45:10 +00:00
Roland Heyder 9b3f38c1a4
Merge pull request #122 from QB64-Phoenix-Edition/wiki-dev
Wiki compatibility tweaks
2022-06-24 00:32:18 +02:00
Roland Heyder c20d80235f Improves table info box with direct link 2022-06-23 23:50:56 +02:00
Roland Heyder 5f039415bf Add plus (+) to the list of critical chars 2022-06-15 11:19:26 +02:00
Roland Heyder aba2021b76 Merge branch 'main' into wiki-dev 2022-06-15 10:47:10 +02:00
github-actions[bot] 802f67d6cf Automatic update of ./internal/source 2022-06-15 05:28:32 +00:00
Matt Kilgore 9bdbba9692
Merge pull request #114 from mkilgore/refactor-libqb
Add separate libqb folder with new APIs, along with C++ automated testing.
2022-06-15 01:17:20 -04:00
Matthew Kilgore 94c2b56b69 Use mutex guard in completion implementation 2022-06-14 23:58:04 -04:00
Matthew Kilgore 298331e490 posix mutex shouldn't allow NULL
We shouldn't allow mutex lock/unlock to silently do nothing if NULL is
passed, as that is very likely a bug. Beyond that the Windows version
doesn't do this, so it's inconsistent as well.
2022-06-14 23:56:17 -04:00
Roland Heyder e539497126 Fix command templates
This does fix the human readable syntax entries according to wiki issues #79 and #91.
2022-06-13 02:15:25 +02:00
Roland Heyder bfd12fc44f Add missing CRLF substitution 2022-06-12 17:06:13 +02:00
Roland Heyder 63c523ba38 Fix URLs containing ampersands
Escapes & in Wiki page URLs (eg. &B, &H, &O) and in external links (eg. many MSDN links)
2022-06-12 17:05:18 +02:00
Matthew Kilgore 869e361ee4 Move QB64 compiler settings to libqb-common.h
This moves a lot of the preprocessor flags for what compiler/platform
we're using into a libqb-common.h header inside the libqb/include
folder. This gets included at the top of every libqb .cpp file, and is
intended to be fairly small, providing only necessary things like
_WIN32_WINNT (which needs to be defined before including <windows.h> or
friends).
2022-06-12 00:28:16 -04:00
Matthew Kilgore cde7afef30 Use libqb_mutex in libqb.cpp
libqb_mutex can replace the existing Mutex handling we do in libqb.cpp
2022-06-11 22:47:06 -04:00
Matthew Kilgore 96ecc9e6db Add C++ testing to CI build 2022-06-11 22:47:06 -04:00
Matthew Kilgore f2e55cb507 Add script for running C++ tests 2022-06-11 22:47:06 -04:00
Matthew Kilgore da6ccba535 Add buffer API unit tests 2022-06-11 22:47:06 -04:00
Matthew Kilgore 4052b8cc19 Add append-only buffer API
The Buffer API implements an append-only buffer, where you can write to
the end or read from the beginning. Data that is read is discarded from
the buffer, and you can query the buffer to get the current amount of
data inside.

Internally the buffer API is implemented as a chain of separate buffers.
This is done to avoid having to resize the existing buffer, which is
expensive. We keep track of where the reading currently is, and discard
the internal buffers after all the data in them is read.
2022-06-11 22:47:06 -04:00
Matthew Kilgore ecfc71ef95 Add completion API
Completions are basically a oneshot flag, which provide a `wait()` call
that blocks until 'finish()' has been called on the completion.

The nice aspect of completions is that because it is a oneshot the order
does not matter - if 'finish()' is called before 'wait()' then 'wait()'
returns immediately. It makes the logic for waiting until a thread is
done finishing up some work easy to implement.
2022-06-11 22:47:06 -04:00
Matthew Kilgore 7ef15653fd Add generic thread, mutex, and condvar API
This adds generic APIs to libqb for handling thread's, mutex's, and
condition variables. On Linux and OSX these are implemented via the ones
provided by pthreads. On Windows they're implemented via the ones
provided by the Win32 API.

For compiling, the code itself is not conditional, but the Makefile
includes logic to decide which implementation to pick.

Note that it would have been nice to simply use std::thread and friends
from C++11, however using them on MinGW appears to be a bit messy. Since
using the Windows ones directly isn't that hard this was an easy compromise.
2022-06-11 22:47:06 -04:00
Matthew Kilgore e1828f84e1 Add basic C++ testing framework
This is a very simple testing framework for writing and running tests
for C++. The basic idea is that a `struct unit_test` is defined for
every test function to run, and then the test framework simply runs them
one at a time, printing various information about the tests out as ti
goes.

There are also various 'test_assert*()` macros to assert the value of
things while running the tests. They verify a value is equal to an
expected value, and if not it fails the tests. The more specific
assertions like the `ints` and `buffers` ones also print out useful
information on what the expected and actual values were, to aide in
debugging.
2022-06-11 22:47:06 -04:00
Matthew Kilgore 93f47326a7 Add basic C++ testing build logic
This is a fairly flexable build framework for building C++ test
executables. The executables are defined in a list and each can be given
its own set of source files, compiler flags, linker flags, etc. The
test source files are compiled together at the same time to allow any
necessary files to get applied at compile time.

Later a script will run through the test executables.
2022-06-11 22:47:05 -04:00
Matthew Kilgore eb815c4220 Prepare for separate libqb, define C++ standard
This sets up a few different flags we'll need for the conditional
compiling, and also sets the C++ standard to gnu++11, which effectively
just matches what we were implicitly using before.
2022-06-11 22:47:05 -04:00
github-actions[bot] df24714a49 Automatic update of ./internal/source 2022-06-12 02:46:10 +00:00
Matt Kilgore 244bd2dab9
Merge pull request #102 from mkilgore/undo-existing-libqb-separation
Undo existing libqb.cpp separation
2022-06-11 22:34:32 -04:00
Matthew Kilgore 6cfd785708 Change libqb.o compile location 2022-06-11 20:43:28 -04:00
Matthew Kilgore 014d0296f5 Use -j8, pass OS to ./.ci/compile.sh 2022-06-11 20:42:23 -04:00
Matthew Kilgore 76c437288a Remove leftover build file 2022-06-11 20:42:23 -04:00
Matthew Kilgore f99407f251 Revert existing libqb split 2022-06-11 20:42:23 -04:00