Max Kellermann
2b21312b36
util/StringUtil: add StringEndsWith()
...
Replaces g_str_has_suffix().
2014-02-18 09:18:42 +01:00
Max Kellermann
579e48edbb
util/StringUtil: add function Strip()
...
Replaces g_strstrip().
2014-02-17 22:37:43 +01:00
Max Kellermann
d05ae4b444
util/HugeAllocator: relicense to BSD-2
2014-02-10 13:32:50 +01:00
Max Kellermann
fe7cda57e4
util/PeakBuffer: fix nullptr dereference when peak_size==0
2014-01-14 23:07:04 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
139122c57f
Merge branch 'v0.18.x'
2014-01-08 22:14:12 +01:00
Max Kellermann
27ca0db7a6
util/Alloc: new library replacing GLib's g_malloc()
2014-01-07 23:35:18 +01:00
Max Kellermann
da80f91e1c
Directory: make some code generic, move to VarSize.hxx
2014-01-07 23:10:56 +01:00
Max Kellermann
0d20130d07
util/Cast: new utility library
2014-01-06 18:21:45 +01:00
Max Kellermann
afc70c120e
util/UriUtil: uri_get_suffix() fails if name begins with dot
...
A file called ".jpg" is not a JPEG file with an empty name; it is
merely a hidden file.
2013-12-29 17:40:51 +01:00
Max Kellermann
86e72ffefb
util/Clamp: generic Clamp() function
2013-12-22 21:08:06 +01:00
Max Kellermann
d86cd4e4b4
util/fifo_buffer: remove obsolete library
2013-12-19 12:17:09 +01:00
Max Kellermann
a191db84f2
util/Error: add missing <algorithm> include
...
For std::move().
2013-12-19 10:58:20 +01:00
Max Kellermann
52dca859c7
util/PeakBuffer: use IsEmpty() instead of IsNull()
...
The DynamicFifoBuffer methods never return nullptr when the buffer is
empty or full; instead, they return an empty buffer. This bug caused
an endless loop.
2013-12-19 10:30:26 +01:00
Max Kellermann
f544316314
util/{Domain,Error}: relicense to BSD 2-clause
2013-12-16 22:42:01 +01:00
Max Kellermann
ecdebb315f
util/PeakBuffer: use DynamicFifoBuffer instead of struct fifo_buffer
...
Switch to the C++ version.
2013-12-15 23:07:08 +01:00
Max Kellermann
1f523be72d
util/PeakBuffer: return ConstBuffer<void>
2013-12-15 23:07:08 +01:00
Max Kellermann
f2a20a0a80
util/WritableBuffer: add cast methods
2013-12-15 23:01:06 +01:00
Max Kellermann
e5a2efaa65
util/WritableBuffer: fix indent
2013-12-15 22:58:32 +01:00
Max Kellermann
c44cb3246d
util/DynamicFifoBuffer: make constructor "explicit"
2013-12-15 22:35:21 +01:00
Max Kellermann
635d6a19ef
util/Tokenizer, ...: include cleanup
2013-12-15 18:33:26 +01:00
Max Kellermann
777844ae0c
system/SocketError, ...: use strerror() instead of g_strerror()
...
Avoid GLib.
2013-12-15 18:32:07 +01:00
Max Kellermann
e1ec65bd53
UriUtil: add function uri_get_scheme()
...
Replaces g_uri_parse_scheme().
2013-12-15 17:06:10 +01:00
Max Kellermann
635a67afac
util/SplitString: new utility class
...
To replace g_strdup().
2013-12-14 12:58:26 +01:00
Max Kellermann
ad7302a032
util/DynamicFifoBuffer: new class replacing growing_fifo
2013-12-05 11:49:21 +01:00
Max Kellermann
6f47c1ca20
util/ConstBuffer: new utility class
2013-11-29 22:06:04 +01:00
Max Kellermann
af4133e3c9
Util/StringUtil: add StringStartsWith()
...
Replaces GLib's g_str_has_prefix().
2013-11-28 18:48:35 +01:00
Max Kellermann
f90abe9530
include cleanup using iwyu
2013-11-28 11:50:54 +01:00
Denis Krjuchkov
db238cc23f
CommandLine: new command line parser
...
This implementation behaves mostly identical to old parser.
Few observable differences:
- There are no option groups (single group is used for all options)
- Option --stdout is hidden (it has been obsolete for a long time)
- MPD executable name (mpd) is hardcoded for simplicity
2013-11-24 17:29:05 +06:00
Max Kellermann
0b6548a282
util/RefCount: no "constexpr" with libc++
...
Not supported by libc++.
2013-11-11 12:27:16 +01:00
Max Kellermann
faf5821816
util/LazyRandomEngine: make min()/max() static+constexpr
...
Required for building with libc++.
2013-11-11 12:27:15 +01:00
Max Kellermann
44581dbef5
util/UriUtil: add uri_is_child_or_same()
2013-10-29 21:13:40 +01:00
Max Kellermann
3ac7de7a22
util/NumberParser: add ParseFloat()
2013-10-26 13:49:15 +02:00
Max Kellermann
ade66e7ece
util/NumberParser: indent
2013-10-26 13:49:15 +02:00
Max Kellermann
3d12f8d246
UriUtil: uri_remove_auth() returns std::string
2013-10-23 21:58:44 +02:00
Max Kellermann
8f1ec1dfdf
util/NumberParser: utilities for parsing numbers from ASCII strings
2013-10-21 09:48:31 +02:00
Max Kellermann
222dc8a239
Util/ASCII: add StringEqualsCaseASCII() overload with length
...
Replaces GLib's g_ascii_strncasecmp().
2013-10-21 08:42:55 +02:00
Max Kellermann
0e4d2e7277
Util/ASCII: add function StringEqualsCaseASCII()
...
Replaces GLib's g_ascii_strcasecmp().
2013-10-20 23:09:51 +02:00
Max Kellermann
5dc4cbdf82
util/FormatString: new library to replace g_strdup_printf()
2013-10-19 17:24:21 +02:00
Max Kellermann
b39ab76118
Util/CharUtil: new library replacing g_ascii_isX()
2013-10-19 15:36:47 +02:00
Max Kellermann
58fe352fda
util/StringUtil: rename strchug_fast_c() to strchug_fast()
...
Overload the name.
2013-10-18 12:24:47 +02:00
Max Kellermann
f6d74012b7
util/Error: add method SetLastError()
2013-10-17 19:29:38 +02:00
Max Kellermann
5e26e2ab1d
system/ByteOrder: new library for byte ordering / endianess
...
Replacing GLib macros.
2013-10-16 22:09:44 +02:00
Max Kellermann
08eca827b6
util/ByteReverse: use C99 "restrict"
...
Micro-optimization.
2013-10-16 22:07:59 +02:00
Max Kellermann
6b2b5af344
util/byte_reverse: convert to C++
2013-10-16 22:07:52 +02:00
Max Kellermann
509f8dab89
Util/Macros: replacement for GLib's G_N_ELEMENTS()
2013-10-15 22:47:39 +02:00
Max Kellermann
84d20d9e43
util/FifoBuffer: C++ version of the fifo_buffer library
2013-10-15 10:28:52 +02:00
Max Kellermann
be2951b45f
gcc.h: rename to Compiler.h
2013-10-15 09:21:59 +02:00
Max Kellermann
6fd481df97
Mapper, ...: use memcmp() instead of strncmp() where appropriate
...
Micro-optimization.
2013-10-14 22:00:21 +02:00
Max Kellermann
29030b54c9
util/Error: new error passing library
...
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00