]>
git.tdb.fi Git - libs/core.git/log
Mikko Rasa [Sun, 29 Aug 2021 08:54:20 +0000 (11:54 +0300)]
Use size_t for sizes in I/O classes
Mikko Rasa [Sun, 29 Aug 2021 08:50:29 +0000 (11:50 +0300)]
Remove deprecated things
Mikko Rasa [Sun, 29 Aug 2021 08:45:43 +0000 (11:45 +0300)]
Bump version so I can do breaking changes
Mikko Rasa [Sun, 29 Aug 2021 08:18:20 +0000 (11:18 +0300)]
Fix incorrect MSVC check
Mikko Rasa [Sun, 22 Aug 2021 10:19:29 +0000 (13:19 +0300)]
Treat ERROR_BROKEN_PIPE as end-of-file instead of an error
Mikko Rasa [Sun, 22 Aug 2021 10:17:08 +0000 (13:17 +0300)]
Use a persistent OVERLAPPED structure in EventReader
Mikko Rasa [Sun, 22 Aug 2021 09:41:28 +0000 (12:41 +0300)]
Close duplicated handles after starting a new process
Mikko Rasa [Sun, 22 Aug 2021 09:39:59 +0000 (12:39 +0300)]
Enable inheriting handles in CreateProcess
Mikko Rasa [Sun, 22 Aug 2021 09:37:15 +0000 (12:37 +0300)]
Skip path lookup if PATH is not set
Mikko Rasa [Sun, 22 Aug 2021 09:33:32 +0000 (12:33 +0300)]
Use correct directory separator to check for absolute binary path
Mikko Rasa [Sun, 22 Aug 2021 09:26:19 +0000 (12:26 +0300)]
Check for ERROR_PATH_NOT_FOUND in adition to ERROR_FILE_NOT_FOUND
Mikko Rasa [Sun, 22 Aug 2021 09:18:42 +0000 (12:18 +0300)]
Fix Path::is_absolute for empty paths on Windows
Mikko Rasa [Tue, 20 Apr 2021 15:11:45 +0000 (18:11 +0300)]
Add equality comparison for Variant
Besides value comparison, it's also possible to check if two Variant
objects have the same type.
Mikko Rasa [Mon, 12 Apr 2021 11:36:12 +0000 (14:36 +0300)]
Add TypeRegistry class
This is basically a generalization of DataFile::LoadableTypeRegistry,
formulated so it isn't associated specifically with Loaders.
Mikko Rasa [Sat, 10 Apr 2021 18:07:14 +0000 (21:07 +0300)]
Add utility functions to search and sort containers based on a member
Mikko Rasa [Sat, 3 Apr 2021 15:44:36 +0000 (18:44 +0300)]
Add folding functions for hashes
Mikko Rasa [Fri, 2 Apr 2021 11:05:04 +0000 (14:05 +0300)]
Add wrappers for lower_bound and upper_bound
Mikko Rasa [Thu, 4 Mar 2021 10:29:09 +0000 (12:29 +0200)]
Use the new utilities to format some strings
Mikko Rasa [Thu, 4 Mar 2021 10:26:25 +0000 (12:26 +0200)]
Add some utility functions for joining strings
Mikko Rasa [Fri, 19 Feb 2021 23:15:52 +0000 (01:15 +0200)]
Nicer formatting of exceptions with multi-line whats
Mikko Rasa [Sat, 6 Feb 2021 11:09:28 +0000 (13:09 +0200)]
Implement weak pointers
Mikko Rasa [Sat, 6 Feb 2021 09:55:56 +0000 (11:55 +0200)]
Move non-oneliner functions out of RefPtr class declaration
Mikko Rasa [Sat, 6 Feb 2021 09:51:17 +0000 (11:51 +0200)]
Move RefPtr refcount into a struct
This is necessary to implement weak pointers
Mikko Rasa [Mon, 18 May 2020 23:27:15 +0000 (02:27 +0300)]
Add a refcount function to RefPtr
Sometimes it may be useful to check if there are any other users for the
data.
Mikko Rasa [Fri, 27 Sep 2019 19:36:09 +0000 (22:36 +0300)]
Check that objects still exist when dispatching events to them
Mikko Rasa [Fri, 27 Sep 2019 19:35:14 +0000 (22:35 +0300)]
Additional adjustments for Poller
Mikko Rasa [Fri, 27 Sep 2019 19:34:05 +0000 (22:34 +0300)]
Use vectors for storage in Poller
Mikko Rasa [Fri, 27 Sep 2019 19:24:07 +0000 (22:24 +0300)]
Refactor signal connection handling in EventDispatcher
Connect the signals to functions on the Slot object to make them easier
to disconnect.
Mikko Rasa [Fri, 27 Sep 2019 00:05:07 +0000 (03:05 +0300)]
Add RemoveConstReference metaprogamming struct
It combines RemoveConst and RemoveReference but is much shorter
Mikko Rasa [Wed, 25 Sep 2019 20:42:08 +0000 (23:42 +0300)]
Add FileMonitor stubs for Windows
Mikko Rasa [Sat, 21 Sep 2019 15:25:59 +0000 (18:25 +0300)]
Add a class for monitoring changes in files
Mikko Rasa [Tue, 17 Sep 2019 14:22:55 +0000 (17:22 +0300)]
Add a facility to automatically create backtraces for exceptions
Obtaining a backtrace in the catch block won't show where the exception
happened. Hooking into the exception handler internals is necessary.
Because this is somewhat disruptive to the language runtime, it is an
optional feature and disabled by default.
Mikko Rasa [Sun, 9 Jun 2019 11:35:27 +0000 (14:35 +0300)]
Invent a value for argv[0] if not present
Gdbserver seems to pass an empty argv[0], at least on Windows. That
causes problems with the various get_*_dir functions.
Mikko Rasa [Mon, 3 Jun 2019 11:50:39 +0000 (14:50 +0300)]
Fix formatted output operator detection in lexicalcast.h
Since it was using a default-constructed value as part of the test
expression, it would fail to detect the operator for classes that are
not default-constructable.
Mikko Rasa [Mon, 3 Jun 2019 11:36:37 +0000 (14:36 +0300)]
Formatting fixes
Mikko Rasa [Mon, 3 Jun 2019 11:31:17 +0000 (14:31 +0300)]
Fix references to deprecated functions
Mikko Rasa [Mon, 3 Jun 2019 11:31:03 +0000 (14:31 +0300)]
Annotate deprecated functions as such
Mikko Rasa [Mon, 3 Jun 2019 10:24:11 +0000 (13:24 +0300)]
Allow std::vector to be used for GetOpt value lists
Mikko Rasa [Fri, 24 May 2019 16:58:39 +0000 (19:58 +0300)]
Add a version of get_item that dynamic_casts the result
Mikko Rasa [Fri, 24 May 2019 16:57:22 +0000 (19:57 +0300)]
Simplify the SFINAE construct a bit
More of the common stuff is now stored in the helper struct.
Mikko Rasa [Wed, 26 Dec 2018 22:38:04 +0000 (00:38 +0200)]
Add a main() function for Windows
Console applications (at least those compiled with MinGW) use it as the
entry point. MinGW has a support library to use WinMain as entry point,
but that requires a hack in builder that causes trouble with applications
that have a main() of their own.
Mikko Rasa [Fri, 6 Jul 2018 17:59:32 +0000 (20:59 +0300)]
Actually pass sec_attr to CreateFile
Mikko Rasa [Wed, 25 Apr 2018 10:16:55 +0000 (13:16 +0300)]
Make sure all classes have sensible copy semantics
They must either support copying or be derived from NonCopyable.
Mikko Rasa [Wed, 25 Apr 2018 10:15:43 +0000 (13:15 +0300)]
Add a NonCopyable utility base class
Mikko Rasa [Wed, 25 Apr 2018 10:06:00 +0000 (13:06 +0300)]
Use nicer formatting for string keys in key_error
Mikko Rasa [Sun, 25 Mar 2018 11:28:10 +0000 (14:28 +0300)]
Add whole-container versions of sort and stable_sort
Mikko Rasa [Sun, 25 Mar 2018 11:20:30 +0000 (14:20 +0300)]
Mark the functions in algorithm.h as inline
Mikko Rasa [Wed, 21 Feb 2018 17:29:43 +0000 (19:29 +0200)]
Add a method to set autobase in Fmt
Mikko Rasa [Mon, 4 Dec 2017 14:28:15 +0000 (16:28 +0200)]
Add stub implementations of the pure virtual functions to Asset
Mikko Rasa [Sat, 2 Dec 2017 20:23:13 +0000 (22:23 +0200)]
Remove test case for invalid Path iterator
Path::Iterator now caches the current component and no longer throws when
dereferencing end().
Mikko Rasa [Sat, 2 Dec 2017 15:05:54 +0000 (17:05 +0200)]
Fix incorrect function name in an exception
Mikko Rasa [Sat, 2 Dec 2017 15:04:00 +0000 (17:04 +0200)]
Fix basename and dirname on an empty Path
Mikko Rasa [Sat, 2 Dec 2017 15:03:10 +0000 (17:03 +0200)]
Implement controls for file descriptor inheritance
Mikko Rasa [Sat, 2 Dec 2017 14:44:48 +0000 (16:44 +0200)]
Fix mismatched fcntls in sys_set_blocking on unix
Mikko Rasa [Sat, 2 Dec 2017 14:41:22 +0000 (16:41 +0200)]
Make certain functions pure virtual so I won't forget to implement them
Mikko Rasa [Sat, 2 Dec 2017 14:33:44 +0000 (16:33 +0200)]
Add missing get_handle function to Serial
Mikko Rasa [Sat, 2 Dec 2017 14:32:33 +0000 (16:32 +0200)]
Add a missing mode flag adjustment to Console::set_block
Mikko Rasa [Sat, 2 Dec 2017 14:32:13 +0000 (16:32 +0200)]
Add a helper function for adjusting mode flags
Mikko Rasa [Sun, 8 Jan 2017 11:59:57 +0000 (13:59 +0200)]
Guard against badly behaving get functions in getline
Mikko Rasa [Sun, 8 Jan 2017 11:59:41 +0000 (13:59 +0200)]
Return -1 from Slice::get at eof
Mikko Rasa [Fri, 6 Jan 2017 02:54:14 +0000 (04:54 +0200)]
Pthread_setname_np is a GNU extension
Mikko Rasa [Sat, 5 Nov 2016 11:28:12 +0000 (13:28 +0200)]
Add implementations of find and find_if that take a container
Rather than an iterator pair. Searching through an entire container is
a very common use case.
Mikko Rasa [Sun, 30 Oct 2016 15:15:40 +0000 (17:15 +0200)]
Add integration between EventDispatcher and Timer
Mikko Rasa [Sat, 29 Oct 2016 16:43:42 +0000 (19:43 +0300)]
Add a class for loading and accessing modules at runtime
Mikko Rasa [Fri, 28 Oct 2016 21:41:01 +0000 (00:41 +0300)]
Add microsecond precision to RFC 3339 dates
Mikko Rasa [Fri, 28 Oct 2016 11:24:40 +0000 (14:24 +0300)]
Add a construct to create conditional RAII objects
Mikko Rasa [Tue, 20 Sep 2016 00:40:46 +0000 (03:40 +0300)]
Use the correct unit of time for WaitForSingleObject
Mikko Rasa [Fri, 2 Sep 2016 22:10:07 +0000 (01:10 +0300)]
Use a different diagnostic pragma for recent GCC versions
Mikko Rasa [Sun, 14 Aug 2016 18:46:42 +0000 (21:46 +0300)]
Fix an incorrect comparison
Mikko Rasa [Tue, 2 Aug 2016 09:16:25 +0000 (12:16 +0300)]
Use variadic templates for format and print functions if available
Mikko Rasa [Wed, 27 Jul 2016 15:49:16 +0000 (18:49 +0300)]
Merge agouti:prog/core
Mikko Rasa [Sun, 24 Jul 2016 14:24:01 +0000 (17:24 +0300)]
Add conversion from RFC3339 string to DateTime
Mikko Rasa [Wed, 20 Jul 2016 23:51:09 +0000 (02:51 +0300)]
Remove an outdated comment
Mikko Rasa [Wed, 20 Jul 2016 23:50:56 +0000 (02:50 +0300)]
Add an interface for naming threads
Mikko Rasa [Tue, 14 Jun 2016 05:13:20 +0000 (08:13 +0300)]
Make Mutex non-copyable
Mikko Rasa [Tue, 14 Jun 2016 05:04:42 +0000 (08:04 +0300)]
Use #ifdef _WIN32 rather than WIN32
It is the proper compiler-defined macro to use. WIN32 is defined by SDK
headers and may not appear in all cases.
Mikko Rasa [Sun, 31 Jan 2016 15:29:52 +0000 (17:29 +0200)]
Use Core Foundation to discover standard locations on OS X
Mikko Rasa [Sun, 31 Jan 2016 15:28:08 +0000 (17:28 +0200)]
Add a missing #include
Mikko Rasa [Sun, 31 Jan 2016 15:20:54 +0000 (17:20 +0200)]
Provide access to the Java VM on Android
Mikko Rasa [Sun, 31 Jan 2016 15:20:36 +0000 (17:20 +0200)]
Disallow negative timeouts for Timer::tick
Mikko Rasa [Fri, 25 Dec 2015 10:16:47 +0000 (12:16 +0200)]
Split Timer::tick into two overloads
This is in line with other similar interfaces, such as Poller and
Semaphore. The old function still exists but is deprecated.
Mikko Rasa [Fri, 25 Dec 2015 10:13:57 +0000 (12:13 +0200)]
Refactor Timer::tick
The previous version had some bugs: the blocking flag was not reset and
it might have tried to execute a canceled (and thus deleted) slot.
Mikko Rasa [Thu, 19 Nov 2015 16:49:52 +0000 (18:49 +0200)]
Hack to make 64-bit seeks work on Android
Mikko Rasa [Mon, 7 Sep 2015 09:25:48 +0000 (12:25 +0300)]
Fix end-of-file detection in Slice
Prepare_op was incorrectly adding start_offset to the remaining length.
Mikko Rasa [Sun, 26 Jul 2015 16:58:38 +0000 (19:58 +0300)]
Make fix_case to work with relative paths
Mikko Rasa [Sun, 26 Jul 2015 16:57:58 +0000 (19:57 +0300)]
Add negation operator and abs function for TimeDelta
Mikko Rasa [Tue, 7 Apr 2015 11:05:12 +0000 (14:05 +0300)]
Include filename in errors from stat
Mikko Rasa [Thu, 13 Nov 2014 20:46:48 +0000 (22:46 +0200)]
Expose window flags and set fullscreen mode by default
I'll likely change the default once I figure out a good way to add
fullscreen support to libmspgui on Android.
Mikko Rasa [Thu, 13 Nov 2014 20:46:14 +0000 (22:46 +0200)]
Move the generic file-based Asset implementation to a generic directory
Mikko Rasa [Thu, 13 Nov 2014 20:44:51 +0000 (22:44 +0200)]
Terminate the process when the application has finished running
Otherwise the OS may try to start the activity again in the same process,
which doesn't work because of Application::run semantics.
Mikko Rasa [Wed, 12 Nov 2014 20:22:15 +0000 (22:22 +0200)]
Chdir into a sensible location before starting the application
System location accessors will ultimately return this directory. The
default is /, which can easily cause problems. In particular, many of
my applications expect to have their data in get_sys_data_dir()/"data".
On Android /data exists but is not readable.
Mikko Rasa [Wed, 12 Nov 2014 20:21:36 +0000 (22:21 +0200)]
Have get_user_data_dir return a proper location on Android
Mikko Rasa [Wed, 12 Nov 2014 20:10:25 +0000 (22:10 +0200)]
Split getcwd and chdir to platform files
Mikko Rasa [Mon, 10 Nov 2014 17:32:54 +0000 (19:32 +0200)]
Deprecate the system directory accessors that take arguments
They are fundamentally broken due to their dependence on cwd and $PATH,
which may be changed after application startup. Now that Application
stores an absolute argv0, the argument-less versions can provide a more
consistent answer.
Implementations for the functions are still the same, as they behave
correctly when an absolute argv0 is passed in. At some point in the
future I'll remove the old versions completely.
Mikko Rasa [Mon, 10 Nov 2014 17:32:41 +0000 (19:32 +0200)]
Fix an infinite recursion bug
Mikko Rasa [Mon, 10 Nov 2014 17:29:11 +0000 (19:29 +0200)]
Store absolute path to argv[0] in Application
Working directory or $PATH may be changed by the program, so it may not
be possible to recover the executable later. It's still not completely
reliable since the parent process can pass any value for argv[0] through
execve().
Mikko Rasa [Mon, 10 Nov 2014 17:25:19 +0000 (19:25 +0200)]
Allow startup info to be set externally
... but only if startup didn't happen through Application::run(). Certain
facilities, like Graphics::Display on Windows, require startup info to be
set and would not work without this in a custom startup scenario.
Mikko Rasa [Sun, 19 Oct 2014 22:34:17 +0000 (01:34 +0300)]
Add a class for accessing applications assets
Mikko Rasa [Sun, 19 Oct 2014 22:27:10 +0000 (01:27 +0300)]
Zero-arguments overloads and better error checking for get*dir functions
Mikko Rasa [Sun, 19 Oct 2014 22:24:43 +0000 (01:24 +0300)]
Store argv0 and application name in the Application class
It can get quite annoying having to pass them around to be fed to the
standard path retrieval functions.