]> git.tdb.fi Git - libs/core.git/log
libs/core.git
11 years agoLink examples against the library with a use statement
Mikko Rasa [Sat, 20 Apr 2013 16:37:59 +0000 (19:37 +0300)]
Link examples against the library with a use statement

11 years agoFix Timer to use is Semaphore correctly
Mikko Rasa [Sat, 20 Apr 2013 14:47:50 +0000 (17:47 +0300)]
Fix Timer to use is Semaphore correctly

Besides still assuming the old condvar-style semantics, it was also
horribly broken and contained potential deadlocks and race conditions.
Not to mention unusable due to a missing constructor.

11 years agoAvoid an extra copy by making Variant::Store's c'tor take a const ref
Mikko Rasa [Sat, 20 Apr 2013 14:32:04 +0000 (17:32 +0300)]
Avoid an extra copy by making Variant::Store's c'tor take a const ref

11 years agoAdd activation check to the rest of Filtered's virtual functions
Mikko Rasa [Sat, 20 Apr 2013 14:19:55 +0000 (17:19 +0300)]
Add activation check to the rest of Filtered's virtual functions

This fixes a bug manifesting in builder where a put call that triggers a
BufferedFile's buffer flush causes the buffer contents to be written to
the file twice.

11 years agoEncapsulate serial device state into a struct
Mikko Rasa [Sat, 20 Apr 2013 14:18:23 +0000 (17:18 +0300)]
Encapsulate serial device state into a struct

11 years agoFix a memory leak in Poller
Mikko Rasa [Sat, 20 Apr 2013 13:07:52 +0000 (16:07 +0300)]
Fix a memory leak in Poller

11 years agoCorrect some multiple inclusion guards
Mikko Rasa [Sat, 20 Apr 2013 13:05:31 +0000 (16:05 +0300)]
Correct some multiple inclusion guards

11 years agoFix seeking of Slice
Mikko Rasa [Sat, 13 Apr 2013 16:09:52 +0000 (19:09 +0300)]
Fix seeking of Slice

11 years agoImprove file opening on Windows
Mikko Rasa [Wed, 27 Mar 2013 19:53:20 +0000 (21:53 +0200)]
Improve file opening on Windows

Handle M_RDWR properly
Allow multiple concurrent readers

11 years agoMove the time constants to timedelta.h
Mikko Rasa [Sun, 10 Feb 2013 09:38:20 +0000 (11:38 +0200)]
Move the time constants to timedelta.h

11 years agoComment changes
Mikko Rasa [Wed, 16 Jan 2013 16:45:30 +0000 (18:45 +0200)]
Comment changes

11 years agoFix an overload resolution problem in formatting values for key_error
Mikko Rasa [Mon, 14 Jan 2013 09:41:34 +0000 (11:41 +0200)]
Fix an overload resolution problem in formatting values for key_error

11 years agoAdd a constructor to ZlibCompressed that takes a mode parameter
Mikko Rasa [Sat, 5 Jan 2013 09:39:24 +0000 (11:39 +0200)]
Add a constructor to ZlibCompressed that takes a mode parameter

11 years agoFix Windows compilation
Mikko Rasa [Mon, 10 Dec 2012 19:49:46 +0000 (21:49 +0200)]
Fix Windows compilation

11 years agoImprove maputils test cases
Mikko Rasa [Sat, 1 Dec 2012 20:59:52 +0000 (22:59 +0200)]
Improve maputils test cases

11 years agoStore the value of the key in key_error
Mikko Rasa [Sat, 1 Dec 2012 20:58:19 +0000 (22:58 +0200)]
Store the value of the key in key_error

The type of the container is uninformative and often ugly.

11 years agoThrow from LexicalConverter::get if no conversion was performed
Mikko Rasa [Sat, 1 Dec 2012 20:57:35 +0000 (22:57 +0200)]
Throw from LexicalConverter::get if no conversion was performed

11 years agoFilter the types that get fallback lexical conversion operators
Mikko Rasa [Sat, 1 Dec 2012 20:50:39 +0000 (22:50 +0200)]
Filter the types that get fallback lexical conversion operators

Only enable the operators for types that already have iostream formatting
operators defined.  Having them exist for everything would interfere with
some other stuff I'm going to commit in a moment.

11 years agoMake lexical_cast symmetric
Mikko Rasa [Sat, 1 Dec 2012 09:27:45 +0000 (11:27 +0200)]
Make lexical_cast symmetric

It has bugged me for a long time that lexical_cast took only the type of
the non-string side as a template argument.  Fix it so that it always
takes both target and source types.  The source type can be deduced, so
this only requires changes to invocations that cast things to strings.

11 years agoAdd an I/O class to access a restricted range of bytes from another object
Mikko Rasa [Thu, 8 Nov 2012 19:51:30 +0000 (21:51 +0200)]
Add an I/O class to access a restricted range of bytes from another object

11 years agoAdd a dedicated exception class for a bad seek operation
Mikko Rasa [Sun, 4 Nov 2012 20:44:05 +0000 (22:44 +0200)]
Add a dedicated exception class for a bad seek operation

11 years agoUse native win32 functions for rename and unlink
Mikko Rasa [Sun, 4 Nov 2012 20:36:11 +0000 (22:36 +0200)]
Use native win32 functions for rename and unlink

11 years agoSome fixes for eof handling in Memory
Mikko Rasa [Sun, 4 Nov 2012 20:35:27 +0000 (22:35 +0200)]
Some fixes for eof handling in Memory

12 years agoAdd no-throw destructors to exception classes that were lacking one
Mikko Rasa [Thu, 27 Sep 2012 22:06:53 +0000 (01:06 +0300)]
Add no-throw destructors to exception classes that were lacking one

12 years agoAdd some useful shortcuts for CreateMode combinations
Mikko Rasa [Thu, 27 Sep 2012 22:04:31 +0000 (01:04 +0300)]
Add some useful shortcuts for CreateMode combinations

All valid modes can now be referred to with a single enumerator.
C_EXCLUSIVE alone is not valid.

12 years agoAdd an exclusive create flag to IO::File
Mikko Rasa [Thu, 27 Sep 2012 22:02:38 +0000 (01:02 +0300)]
Add an exclusive create flag to IO::File

This flag is important in creating temp files, as it allows atomic
creation of a new file.  It also completes the set of create modes
available on Win32.

12 years agoDon't report M_RDWR as "generic"
Mikko Rasa [Thu, 27 Sep 2012 20:45:34 +0000 (23:45 +0300)]
Don't report M_RDWR as "generic"

12 years agoAdd a mode parameter to Memory constructor with non-const pointers
Mikko Rasa [Thu, 27 Sep 2012 20:41:20 +0000 (23:41 +0300)]
Add a mode parameter to Memory constructor with non-const pointers

This makes it possible to explicitly set the mode for a Memory, and in
particular to create a write-only Memory.  ZlibCompressed does not work
with M_RDWR so writing compressed data to memory was impossible before
this commit.

12 years agoDon't give out a non-const reference from a const Variant
Mikko Rasa [Thu, 27 Sep 2012 20:38:10 +0000 (23:38 +0300)]
Don't give out a non-const reference from a const Variant

12 years agoComment updates
Mikko Rasa [Sun, 16 Sep 2012 20:39:45 +0000 (23:39 +0300)]
Comment updates

12 years agoMake Profiler able to report number of calls per second
Mikko Rasa [Sun, 16 Sep 2012 20:36:53 +0000 (23:36 +0300)]
Make Profiler able to report number of calls per second

12 years agoRefactor Profiler
Mikko Rasa [Sun, 16 Sep 2012 20:21:11 +0000 (23:21 +0300)]
Refactor Profiler

Have record() take in a ProfilingScope for easier transport of the
parameters.

Rename scope() to get_scope() since it provides read-only access.

12 years agoAvoid invoking callbacks of a deleted object
Mikko Rasa [Thu, 13 Sep 2012 21:47:31 +0000 (00:47 +0300)]
Avoid invoking callbacks of a deleted object

12 years agoFix the name of the UTF-16 codec
Mikko Rasa [Tue, 4 Sep 2012 20:12:37 +0000 (23:12 +0300)]
Fix the name of the UTF-16 codec

12 years agoDisable main() on win32 in favor of WinMain
Mikko Rasa [Tue, 4 Sep 2012 20:06:57 +0000 (23:06 +0300)]
Disable main() on win32 in favor of WinMain

12 years agoConvert command line arguments on Windows from UTF-16 to UTF-8
Mikko Rasa [Tue, 4 Sep 2012 20:06:45 +0000 (23:06 +0300)]
Convert command line arguments on Windows from UTF-16 to UTF-8

12 years agoAdd a UTF-16 codec
Mikko Rasa [Tue, 4 Sep 2012 10:15:46 +0000 (13:15 +0300)]
Add a UTF-16 codec

12 years agoRefuse to encode invalid Unicode characters in UTF-8
Mikko Rasa [Tue, 4 Sep 2012 06:46:19 +0000 (09:46 +0300)]
Refuse to encode invalid Unicode characters in UTF-8

12 years agoLet the base classes decide the default error mode
Mikko Rasa [Tue, 4 Sep 2012 06:40:53 +0000 (09:40 +0300)]
Let the base classes decide the default error mode

12 years agoThe EOF logic wasn't quite correct
Mikko Rasa [Fri, 3 Aug 2012 08:57:49 +0000 (11:57 +0300)]
The EOF logic wasn't quite correct

If the underlying object reported EOF after reading the last byte, then
ZlibCompressed would report EOF itself before giving out all data from
the buffers.

12 years agoAdd support for de/compression with zlib
Mikko Rasa [Thu, 2 Aug 2012 23:46:35 +0000 (02:46 +0300)]
Add support for de/compression with zlib

12 years agoFix several corner case bugs in lexical_cast
Mikko Rasa [Wed, 1 Aug 2012 20:43:34 +0000 (23:43 +0300)]
Fix several corner case bugs in lexical_cast

12 years agoAdd unit tests for lexical_cast
Mikko Rasa [Wed, 1 Aug 2012 20:22:11 +0000 (23:22 +0300)]
Add unit tests for lexical_cast

12 years agoProvide a way to get an integer type matching the size of another type
Mikko Rasa [Wed, 1 Aug 2012 15:01:10 +0000 (18:01 +0300)]
Provide a way to get an integer type matching the size of another type

12 years agoPrefer inttypes.h to doing the #ifdef dance everywhere
Mikko Rasa [Wed, 1 Aug 2012 14:30:58 +0000 (17:30 +0300)]
Prefer inttypes.h to doing the #ifdef dance everywhere

12 years agoExactly-sized integer types, the C++ way
Mikko Rasa [Wed, 1 Aug 2012 13:57:37 +0000 (16:57 +0300)]
Exactly-sized integer types, the C++ way

12 years agoUpdate .gitignore
Mikko Rasa [Wed, 1 Aug 2012 08:52:56 +0000 (11:52 +0300)]
Update .gitignore

12 years agoWe are no longer compatible with 1.x, so might as well bump the version
Mikko Rasa [Thu, 26 Jul 2012 19:32:45 +0000 (22:32 +0300)]
We are no longer compatible with 1.x, so might as well bump the version

12 years agoUpdate Build for latest changes in Builder
Mikko Rasa [Thu, 26 Jul 2012 19:32:11 +0000 (22:32 +0300)]
Update Build for latest changes in Builder

12 years agoImplement Console::get_size on windows
Mikko Rasa [Thu, 26 Jul 2012 19:30:06 +0000 (22:30 +0300)]
Implement Console::get_size on windows

12 years agoTell the TTY driver to not mess with serial port data
Mikko Rasa [Thu, 26 Jul 2012 19:15:28 +0000 (22:15 +0300)]
Tell the TTY driver to not mess with serial port data

12 years agoHandle c_cc when toggling canonical mode
Mikko Rasa [Tue, 10 Jul 2012 09:08:00 +0000 (12:08 +0300)]
Handle c_cc when toggling canonical mode

12 years agoFix a 64-bit compile error
Mikko Rasa [Tue, 10 Jul 2012 09:02:34 +0000 (12:02 +0300)]
Fix a 64-bit compile error

12 years agoAllow seen_count to be bound to a variable for dealing with optional arguments
Mikko Rasa [Wed, 18 Jul 2012 16:08:58 +0000 (19:08 +0300)]
Allow seen_count to be bound to a variable for dealing with optional arguments

12 years agoVariable length arrays on stack are not valid C++
Mikko Rasa [Mon, 16 Jul 2012 23:24:52 +0000 (02:24 +0300)]
Variable length arrays on stack are not valid C++

12 years agoDo less syscalls in mkpath
Mikko Rasa [Sun, 15 Jul 2012 12:05:32 +0000 (15:05 +0300)]
Do less syscalls in mkpath

12 years agoCheck that the option actually has a short name
Mikko Rasa [Sat, 14 Jul 2012 21:40:23 +0000 (00:40 +0300)]
Check that the option actually has a short name

12 years agoRemove the no longer supported exception_backtrace feature from Build
Mikko Rasa [Sat, 14 Jul 2012 16:54:56 +0000 (19:54 +0300)]
Remove the no longer supported exception_backtrace feature from Build

12 years agoAdd documentation to GetOpt
Mikko Rasa [Sat, 14 Jul 2012 15:21:00 +0000 (18:21 +0300)]
Add documentation to GetOpt

12 years agoRearrange GetOpt internals to provide a nicer external interface
Mikko Rasa [Sat, 14 Jul 2012 15:07:25 +0000 (18:07 +0300)]
Rearrange GetOpt internals to provide a nicer external interface

12 years agoReplace earlier options sharing the same short or long name
Mikko Rasa [Sat, 14 Jul 2012 14:55:14 +0000 (17:55 +0300)]
Replace earlier options sharing the same short or long name

12 years agoAdd common_ancestor function
Mikko Rasa [Tue, 10 Jul 2012 15:25:39 +0000 (18:25 +0300)]
Add common_ancestor function

12 years agoVerify that a path initialized with an empty string is empty
Mikko Rasa [Mon, 9 Jul 2012 16:34:51 +0000 (19:34 +0300)]
Verify that a path initialized with an empty string is empty

12 years agoRecognize either separator as the root component
Mikko Rasa [Mon, 9 Jul 2012 16:32:17 +0000 (19:32 +0300)]
Recognize either separator as the root component

12 years agoDefer the retrieval of owner/group names until they are needed
Mikko Rasa [Mon, 9 Jul 2012 16:18:48 +0000 (19:18 +0300)]
Defer the retrieval of owner/group names until they are needed

12 years agoFix GetSecurityInfo error checking and request appropriate access to the file
Mikko Rasa [Mon, 9 Jul 2012 16:11:54 +0000 (19:11 +0300)]
Fix GetSecurityInfo error checking and request appropriate access to the file

12 years agoMake Buffered trackable since it connects to signals
Mikko Rasa [Mon, 9 Jul 2012 14:47:35 +0000 (17:47 +0300)]
Make Buffered trackable since it connects to signals

12 years agoAdd an example that does some directory operations
Mikko Rasa [Mon, 9 Jul 2012 14:45:46 +0000 (17:45 +0300)]
Add an example that does some directory operations

12 years agoUse native CreateDirectory/RemoveDirectory calls on Windows
Mikko Rasa [Mon, 9 Jul 2012 14:45:17 +0000 (17:45 +0300)]
Use native CreateDirectory/RemoveDirectory calls on Windows

12 years agoReturn an empty Stat object for nonexistent files on Windows
Mikko Rasa [Mon, 9 Jul 2012 14:44:16 +0000 (17:44 +0300)]
Return an empty Stat object for nonexistent files on Windows

12 years agoFix name of the rmpath function
Mikko Rasa [Mon, 9 Jul 2012 14:39:04 +0000 (17:39 +0300)]
Fix name of the rmpath function

12 years agoWindows compilation fixes
Mikko Rasa [Mon, 9 Jul 2012 14:09:45 +0000 (17:09 +0300)]
Windows compilation fixes

12 years agoUse a self-assignment to copy all members
Mikko Rasa [Sat, 7 Jul 2012 19:09:49 +0000 (22:09 +0300)]
Use a self-assignment to copy all members

12 years agoStyle fix: split function bodies to separate line outside of class
Mikko Rasa [Sat, 7 Jul 2012 06:56:27 +0000 (09:56 +0300)]
Style fix: split function bodies to separate line outside of class

12 years agoAdd Path::c_str() method
Mikko Rasa [Fri, 6 Jul 2012 20:47:38 +0000 (23:47 +0300)]
Add Path::c_str() method

12 years agoComment updates
Mikko Rasa [Fri, 6 Jul 2012 20:47:24 +0000 (23:47 +0300)]
Comment updates

12 years agoRefactor Path::init
Mikko Rasa [Fri, 6 Jul 2012 20:46:28 +0000 (23:46 +0300)]
Refactor Path::init

12 years agoStore an array of separators alongside with the path string
Mikko Rasa [Fri, 6 Jul 2012 20:25:32 +0000 (23:25 +0300)]
Store an array of separators alongside with the path string

12 years agoAdd some more test cases for FS::Path
Mikko Rasa [Fri, 6 Jul 2012 20:22:19 +0000 (23:22 +0300)]
Add some more test cases for FS::Path

12 years agoMake FS::Path::Iterator assignable
Mikko Rasa [Fri, 6 Jul 2012 20:18:09 +0000 (23:18 +0300)]
Make FS::Path::Iterator assignable

12 years agoVery minor refactoring
Mikko Rasa [Fri, 6 Jul 2012 12:33:13 +0000 (15:33 +0300)]
Very minor refactoring

12 years agoAdd other comparison operators to FS::Path
Mikko Rasa [Fri, 6 Jul 2012 12:32:05 +0000 (15:32 +0300)]
Add other comparison operators to FS::Path

12 years agoStyle fix: add whitespace
Mikko Rasa [Fri, 6 Jul 2012 12:23:03 +0000 (15:23 +0300)]
Style fix: add whitespace

12 years agoReorder Path member functions
Mikko Rasa [Fri, 6 Jul 2012 12:22:27 +0000 (15:22 +0300)]
Reorder Path member functions

12 years agoAdd unit tests for strings/utils.h and FS::Path
Mikko Rasa [Fri, 6 Jul 2012 12:09:10 +0000 (15:09 +0300)]
Add unit tests for strings/utils.h and FS::Path

12 years agoImplement get_handle in File and Pipe
Mikko Rasa [Wed, 30 May 2012 19:02:30 +0000 (19:02 +0000)]
Implement get_handle in File and Pipe

12 years agoAdd functions to support console redirection
Mikko Rasa [Wed, 30 May 2012 19:00:56 +0000 (19:00 +0000)]
Add functions to support console redirection

12 years agoAdd some error checks to Console functions
Mikko Rasa [Wed, 30 May 2012 18:16:18 +0000 (18:16 +0000)]
Add some error checks to Console functions

12 years agoSet correct mode in Pipe constructor
Mikko Rasa [Wed, 30 May 2012 17:41:30 +0000 (17:41 +0000)]
Set correct mode in Pipe constructor

12 years agoUse separate members for Pipe read/write handles
Mikko Rasa [Wed, 30 May 2012 17:41:03 +0000 (17:41 +0000)]
Use separate members for Pipe read/write handles

12 years agoUse an enum rather than plain integers to distinguish Console instances
Mikko Rasa [Wed, 30 May 2012 17:38:40 +0000 (17:38 +0000)]
Use an enum rather than plain integers to distinguish Console instances

12 years agoFix a 64-bit compilation error
Mikko Rasa [Wed, 30 May 2012 17:36:56 +0000 (17:36 +0000)]
Fix a 64-bit compilation error

12 years agoFix warnings about certain narrowing conversions not being allowed in C++11
Mikko Rasa [Thu, 10 May 2012 21:11:17 +0000 (00:11 +0300)]
Fix warnings about certain narrowing conversions not being allowed in C++11

12 years agoAdd missing headers
Mikko Rasa [Thu, 10 May 2012 19:15:25 +0000 (22:15 +0300)]
Add missing headers

13 years agoChange stat functions so that it's again possible to determine file existence
Mikko Rasa [Tue, 6 Sep 2011 11:38:48 +0000 (14:38 +0300)]
Change stat functions so that it's again possible to determine file existence

13 years agoFix some stray header names
Mikko Rasa [Tue, 6 Sep 2011 08:37:06 +0000 (11:37 +0300)]
Fix some stray header names

13 years agoHash functions
Mikko Rasa [Sun, 4 Sep 2011 19:17:38 +0000 (22:17 +0300)]
Hash functions

13 years agoUse string::size_type rather than unsigned to store string offsets
Mikko Rasa [Sat, 13 Aug 2011 23:41:24 +0000 (02:41 +0300)]
Use string::size_type rather than unsigned to store string offsets

13 years agoAdd a missing #include
Mikko Rasa [Wed, 10 Aug 2011 19:32:42 +0000 (22:32 +0300)]
Add a missing #include

13 years agoRemove signal_closed now that closing is only done in the destructor
Mikko Rasa [Fri, 5 Aug 2011 15:04:07 +0000 (18:04 +0300)]
Remove signal_closed now that closing is only done in the destructor