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

2551 commits

Author SHA1 Message Date
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
Roland Heyder e01b29c9a2 Merge branch 'main' into wiki-dev 2022-06-11 23:27:25 +02:00
github-actions[bot] e6a5d4744c Automatic update of ./internal/source 2022-06-11 16:32:22 +00:00
Matt Kilgore 9109bfdb05
Merge pull request #111 from mkilgore/fix-ide-cpp-settings-menu
Fix C++ compiler settings menu
2022-06-11 12:21:37 -04:00
Roland Heyder 74ca4c9da6 Add apostrophe HTML entity 2022-06-11 17:52:18 +02:00
Roland Heyder 6efdd43a2a Avoid additional new line at EOF 2022-06-11 17:50:14 +02:00
Matthew Kilgore 58cccc19fa Update version to v0.8.2 2022-06-10 22:35:38 -04:00
Matthew Kilgore 931a9dd272 Fix C++ Compiler Settings menu 2022-06-10 22:31:56 -04:00
github-actions[bot] 7d06ff2400 Automatic update of ./internal/source 2022-06-10 21:39:18 +00:00
Matt Kilgore 4a865b52d4
Merge pull request #110 from mkilgore/update-0.8.1
Update version to v0.8.1
2022-06-10 17:29:15 -04:00
Matthew Kilgore 5bb2c7017c Update version to v0.8.1 2022-06-10 16:53:12 -04:00
github-actions[bot] 85cdcb2249 Automatic update of ./internal/source 2022-06-10 20:16:55 +00:00
Matt Kilgore 65aeac5d38
Merge pull request #107 from mkilgore/fix-cpp-compiler-menu-shortcut
The C++ settings menu reuses existing shortcut key
2022-06-10 16:07:58 -04:00
Matthew Kilgore f7b1427a89 The C++ settings menu reuses existing shortcut key
The C++ compiler Settings menu uses the shortcut key 'o', but that's
actually already in use and thus creates a conflict. We're switching it
to use the option 'm', which does not conflict.

Fixes: #105
2022-06-10 12:51:35 -04:00
Matt Kilgore 174cd45c63
Merge pull request #109 from mkilgore/add-version-to-artifact-name
Add version to artifact name
2022-06-10 11:55:06 -04:00
Matthew Kilgore 84df4e6082 Remove unused .ci/ files
These were left over from the previous CI system.
2022-06-10 11:21:24 -04:00
Matthew Kilgore 865371f4b1 Add version onto artifact names
The artifacts like 'qb64-lnx.tar.gz' will now also include the version
in them, making them 'qb64-lnx-X.Y.Z.tar.gz' instead.

Fixes: #104
2022-06-10 11:21:24 -04:00
github-actions[bot] 3057adf4dd Automatic update of ./internal/source 2022-06-10 15:12:32 +00:00
Matt Kilgore 5fd9e95422
Merge pull request #106 from mkilgore/fix-dollarsign-files
Fix compilation of files with $ in the name
2022-06-10 11:01:38 -04:00
Matthew Kilgore d36edad30c Fix compilation of files with $ in the name
This is a bit of an odd one, but files with $ in the name don't compile
correctly due to expansion being done on the $.

The culprit here is `make`, as the syntax '$x' is interpreted to mean to
insert the expansion of the variable 'x'. To avoid this behavior we have
to replace every single $ with $$. Make will interpret the $$ to mean it
should insert a single $ and not do any expansion, which is what we
want.

Fixes: #96
2022-06-10 10:42:49 -04:00
Matt Kilgore abe9936379
Merge pull request #101 from mkilgore/fix-deviceinput
Fix compilation with DEP_DEVICEINPUT
2022-06-10 10:26:29 -04:00
Matthew Kilgore e250753334 Disable deviceinput test on Linux 2022-06-09 21:30:37 -04:00
Matthew Kilgore 62ec4ebdbd Fix compilation with DEP_DEVICEINPUT
The Makefile changes broke compiling with device input support. This got
missed because no test case for DEP_DEVICEINPUT got added.

Fixes: #100
2022-06-09 21:30:37 -04:00
github-actions[bot] 578268e3a5 Automatic update of ./internal/source 2022-06-08 14:08:37 +00:00
Matt Kilgore 7f7d9d31da
Merge pull request #103 from PrajwalBorkar/main
Fixed Typo
2022-06-08 09:58:20 -04:00
Prajwal Borkar 23f45ea5cf
Fixed Typo 2022-06-08 12:25:31 +05:30
github-actions[bot] 2be869c263 Automatic update of ./internal/source 2022-06-07 21:38:41 +00:00
Matt Kilgore c1601d7edb
Merge pull request #97 from mkilgore/update-0.8.0
Update version to 0.8.0
2022-06-07 17:26:57 -04:00