libs/core.git
9 years agoAdd a UTF-16 codec
Mikko Rasa [Tue, 4 Sep 2012 10:15:46 +0000 (13:15 +0300)]
Add a UTF-16 codec

9 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

9 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

10 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.

10 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

10 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

10 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

10 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

10 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

10 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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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++

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

10 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

10 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

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

10 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

10 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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

10 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

10 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

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

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

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

10 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

10 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

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

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

10 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

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

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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

10 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

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

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

11 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

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

11 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

11 years agoAdd a constructor for system_error that takes error message instead of code
Mikko Rasa [Fri, 5 Aug 2011 14:49:46 +0000 (17:49 +0300)]
Add a constructor for system_error that takes error message instead of code

11 years agoRemove the obsolete exceptions from core
Mikko Rasa [Mon, 1 Aug 2011 09:38:05 +0000 (12:38 +0300)]
Remove the obsolete exceptions from core

11 years agoDon't throw on win32 if file has no owner or group
Mikko Rasa [Sun, 31 Jul 2011 15:37:29 +0000 (18:37 +0300)]
Don't throw on win32 if file has no owner or group

11 years agoAdd a flag to make statting directories work on win32
Mikko Rasa [Sun, 31 Jul 2011 15:36:54 +0000 (18:36 +0300)]
Add a flag to make statting directories work on win32

11 years agoUse 64-bit version of stat syscall, even on 32-bit systems
Mikko Rasa [Sun, 31 Jul 2011 15:36:16 +0000 (18:36 +0300)]
Use 64-bit version of stat syscall, even on 32-bit systems

11 years agoAdd an ls example to demonstrate some of the fs components
Mikko Rasa [Sun, 31 Jul 2011 15:34:38 +0000 (18:34 +0300)]
Add an ls example to demonstrate some of the fs components

11 years agoPut examples in their own directory
Mikko Rasa [Sat, 30 Jul 2011 08:40:15 +0000 (11:40 +0300)]
Put examples in their own directory

11 years agoRewrite the stat functions to expose a platform-independent interface
Mikko Rasa [Sat, 30 Jul 2011 08:18:35 +0000 (11:18 +0300)]
Rewrite the stat functions to expose a platform-independent interface

11 years agoAdd conversions from timeval/FILETIME to RawTime
Mikko Rasa [Sat, 30 Jul 2011 08:14:02 +0000 (11:14 +0300)]
Add conversions from timeval/FILETIME to RawTime

11 years agoIsolate platform-dependent RawTime conversion functions to a private header
Mikko Rasa [Fri, 29 Jul 2011 22:17:04 +0000 (01:17 +0300)]
Isolate platform-dependent RawTime conversion functions to a private header

11 years agoRemove an unnecessary #include
Mikko Rasa [Thu, 28 Jul 2011 12:10:24 +0000 (15:10 +0300)]
Remove an unnecessary #include

11 years agoException rework for fs components
Mikko Rasa [Thu, 28 Jul 2011 12:10:13 +0000 (15:10 +0300)]
Exception rework for fs components

11 years agoRemove some stray Id tags
Mikko Rasa [Thu, 28 Jul 2011 11:20:13 +0000 (14:20 +0300)]
Remove some stray Id tags

11 years agoMerge branch 'fs-master'
Mikko Rasa [Thu, 28 Jul 2011 11:19:27 +0000 (14:19 +0300)]
Merge branch 'fs-master'

Conflicts:
.gitignore
Build
Changelog.txt

11 years agoComment changes fs-master
Mikko Rasa [Thu, 28 Jul 2011 11:17:55 +0000 (14:17 +0300)]
Comment changes

11 years agoStyle update: remove alignment
Mikko Rasa [Thu, 28 Jul 2011 09:55:39 +0000 (12:55 +0300)]
Style update: remove alignment

11 years agoRemove Id tags and copyright notices from source files
Mikko Rasa [Wed, 27 Jul 2011 08:37:36 +0000 (11:37 +0300)]
Remove Id tags and copyright notices from source files

11 years agoPrepare for assimilation into core
Mikko Rasa [Wed, 27 Jul 2011 05:49:01 +0000 (08:49 +0300)]
Prepare for assimilation into core

11 years agoStyle update: spaces around assignments
Mikko Rasa [Wed, 27 Jul 2011 05:42:32 +0000 (08:42 +0300)]
Style update: spaces around assignments

11 years agoConvert svn:ignore to .gitignore
Mikko Rasa [Wed, 27 Jul 2011 05:24:13 +0000 (08:24 +0300)]
Convert svn:ignore to .gitignore

11 years agoUpdate .gitignore
Mikko Rasa [Mon, 25 Jul 2011 14:46:31 +0000 (17:46 +0300)]
Update .gitignore

11 years agoAdd unit tests
Mikko Rasa [Mon, 25 Jul 2011 14:46:24 +0000 (17:46 +0300)]
Add unit tests

11 years agomaputils.h: add insert_unique function
Mikko Rasa [Mon, 25 Jul 2011 08:02:05 +0000 (11:02 +0300)]
maputils.h: add insert_unique function

11 years agoBuild help messages with format instead of ostringstream
Mikko Rasa [Sat, 18 Jun 2011 18:34:43 +0000 (21:34 +0300)]
Build help messages with format instead of ostringstream

11 years agoUse IO::cout rather than std::cout
Mikko Rasa [Sat, 18 Jun 2011 18:34:15 +0000 (21:34 +0300)]
Use IO::cout rather than std::cout

11 years agoAdd FILE_FLAG_OVERLAPPED in a couple of places
Mikko Rasa [Sat, 18 Jun 2011 18:33:48 +0000 (21:33 +0300)]
Add FILE_FLAG_OVERLAPPED in a couple of places

11 years agoFix Memory::getline
Mikko Rasa [Wed, 15 Jun 2011 08:20:13 +0000 (11:20 +0300)]
Fix Memory::getline

11 years agoUnify end-of-file handling
Mikko Rasa [Wed, 15 Jun 2011 08:11:57 +0000 (11:11 +0300)]
Unify end-of-file handling

11 years agoDon't repeat exception names in what()
Mikko Rasa [Tue, 14 Jun 2011 08:19:16 +0000 (11:19 +0300)]
Don't repeat exception names in what()

11 years agoPut the check_access function in Base
Mikko Rasa [Tue, 14 Jun 2011 08:18:18 +0000 (11:18 +0300)]
Put the check_access function in Base

11 years agoDisallow closing stuff before destruction
Mikko Rasa [Tue, 14 Jun 2011 07:19:09 +0000 (10:19 +0300)]
Disallow closing stuff before destruction

11 years agoUse EventReader in Serial as well
Mikko Rasa [Mon, 13 Jun 2011 14:42:49 +0000 (17:42 +0300)]
Use EventReader in Serial as well

11 years agoFix the Build file so that io headers are installed
Mikko Rasa [Mon, 13 Jun 2011 14:17:05 +0000 (17:17 +0300)]
Fix the Build file so that io headers are installed

11 years agoMinor change to EventReader to avoid an invalid handle error on windows
Mikko Rasa [Mon, 13 Jun 2011 14:15:54 +0000 (17:15 +0300)]
Minor change to EventReader to avoid an invalid handle error on windows

11 years agoUse EventReader in pipe
Mikko Rasa [Sun, 12 Jun 2011 15:03:33 +0000 (18:03 +0300)]
Use EventReader in pipe

11 years agoEventReader class
Mikko Rasa [Sun, 12 Jun 2011 15:02:56 +0000 (18:02 +0300)]
EventReader class