libusual.git
14 years agoaatree: use uintptr_t instead of long for data
Marko Kreen [Tue, 22 Feb 2011 19:05:30 +0000 (21:05 +0200)]
aatree: use uintptr_t instead of long for data

14 years agotest_time: allow exact usleep
Marko Kreen [Tue, 15 Feb 2011 07:25:17 +0000 (09:25 +0200)]
test_time: allow exact usleep

14 years agowin32: WINVER is more proper thing to set than _WIN32_WINNT
Marko Kreen [Tue, 15 Feb 2011 06:57:20 +0000 (08:57 +0200)]
win32: WINVER is more proper thing to set than _WIN32_WINNT

14 years agolist,statlist: reverse list walking
Marko Kreen [Tue, 15 Feb 2011 06:56:49 +0000 (08:56 +0200)]
list,statlist: reverse list walking

14 years agofind_module: use awk for processing, seems more portable than sed
Marko Kreen [Tue, 15 Feb 2011 06:53:45 +0000 (08:53 +0200)]
find_module: use awk for processing, seems more portable than sed

14 years agotest_fileutil: use wb to write file
Marko Kreen [Tue, 15 Feb 2011 06:52:24 +0000 (08:52 +0200)]
test_fileutil: use wb to write file

14 years agotest: missing LDFLAGS from link
Marko Kreen [Tue, 15 Feb 2011 06:52:04 +0000 (08:52 +0200)]
test: missing LDFLAGS from link

14 years agosocket: inet_pton() and inet_ntop() from openbsd
Marko Kreen [Tue, 15 Feb 2011 06:51:39 +0000 (08:51 +0200)]
socket: inet_pton() and inet_ntop() from openbsd

14 years agobuild: allow several .c files per module
Marko Kreen [Tue, 15 Feb 2011 06:49:06 +0000 (08:49 +0200)]
build: allow several .c files per module

14 years agotest: fileutil, time, crc32 and lookup3 tests
Marko Kreen [Tue, 1 Feb 2011 12:37:12 +0000 (14:37 +0200)]
test: fileutil, time, crc32 and lookup3 tests

14 years agotest_string: parse_word_list() tests
Marko Kreen [Tue, 1 Feb 2011 12:36:34 +0000 (14:36 +0200)]
test_string: parse_word_list() tests

14 years agotest_netdb: add socket.h include
Marko Kreen [Tue, 1 Feb 2011 12:35:59 +0000 (14:35 +0200)]
test_netdb: add socket.h include

14 years agotest_mdict: test overwrite and delete
Marko Kreen [Tue, 1 Feb 2011 12:35:35 +0000 (14:35 +0200)]
test_mdict: test overwrite and delete

14 years agomakefile/sparse: add -Wno-transparent-union
Marko Kreen [Tue, 1 Feb 2011 12:35:01 +0000 (14:35 +0200)]
makefile/sparse: add -Wno-transparent-union

14 years agostring: allow empty strings in parse_word_list()
Marko Kreen [Tue, 1 Feb 2011 12:34:29 +0000 (14:34 +0200)]
string: allow empty strings in parse_word_list()

14 years agomdict: fix free on overwrite, add mdict_del()
Marko Kreen [Tue, 1 Feb 2011 12:33:23 +0000 (14:33 +0200)]
mdict: fix free on overwrite, add mdict_del()

14 years agofileutil: better error handling for foreach_line()
Marko Kreen [Tue, 1 Feb 2011 12:32:47 +0000 (14:32 +0200)]
fileutil: better error handling for foreach_line()

14 years agotest: decrease loop count in aatree/cbtree tests
Marko Kreen [Tue, 1 Feb 2011 12:31:43 +0000 (14:31 +0200)]
test: decrease loop count in aatree/cbtree tests

this should decrease regtest run time

14 years agopgutil: include keywords in kwlookup.g
Marko Kreen [Mon, 31 Jan 2011 17:16:06 +0000 (19:16 +0200)]
pgutil: include keywords in kwlookup.g

autogen does not work, because they keywords can be
removed from postgres, but we dont want to remove them
from here.

Currently list is union of 8.3 .. 9.1 keywords.

14 years agoendian: expand encdec functions to make them more dox-friendly
Marko Kreen [Mon, 31 Jan 2011 17:14:52 +0000 (19:14 +0200)]
endian: expand encdec functions to make them more dox-friendly

14 years agotest: shlist tests
Marko Kreen [Mon, 31 Jan 2011 09:53:09 +0000 (11:53 +0200)]
test: shlist tests

14 years agotest: strlist tests
Marko Kreen [Mon, 31 Jan 2011 09:51:19 +0000 (11:51 +0200)]
test: strlist tests

14 years agoshlist: couple new functions
Marko Kreen [Mon, 31 Jan 2011 09:50:17 +0000 (11:50 +0200)]
shlist: couple new functions

14 years agoshlist: fix shlist_prepend
Marko Kreen [Mon, 31 Jan 2011 09:49:52 +0000 (11:49 +0200)]
shlist: fix shlist_prepend

14 years agocxalloc: fix cx_strdup
Marko Kreen [Mon, 31 Jan 2011 09:48:33 +0000 (11:48 +0200)]
cxalloc: fix cx_strdup

14 years agotest: mdict tests
Marko Kreen [Fri, 28 Jan 2011 22:02:05 +0000 (00:02 +0200)]
test: mdict tests

14 years agomdict: fix urldecode memleak
Marko Kreen [Fri, 28 Jan 2011 22:00:04 +0000 (00:00 +0200)]
mdict: fix urldecode memleak

14 years agotest_endian: fix signedness warning
Marko Kreen [Thu, 27 Jan 2011 11:20:22 +0000 (13:20 +0200)]
test_endian: fix signedness warning

14 years agotest/: hashtab tests
Marko Kreen [Thu, 27 Jan 2011 11:03:18 +0000 (13:03 +0200)]
test/: hashtab tests

14 years agotest_utf8: add more tests
Marko Kreen [Thu, 27 Jan 2011 11:02:02 +0000 (13:02 +0200)]
test_utf8: add more tests

14 years agoutf8: make incoming char values unsigned
Marko Kreen [Thu, 27 Jan 2011 11:01:21 +0000 (13:01 +0200)]
utf8: make incoming char values unsigned

14 years agohashtab: fix thinko in hashtab_delete()
Marko Kreen [Thu, 27 Jan 2011 11:00:03 +0000 (13:00 +0200)]
hashtab: fix thinko in hashtab_delete()

14 years agologging: LG_STATS loglevel for liveness messages
Marko Kreen [Wed, 26 Jan 2011 12:54:32 +0000 (14:54 +0200)]
logging: LG_STATS loglevel for liveness messages

14 years agotest: <endian.h> tests
Marko Kreen [Wed, 26 Jan 2011 12:51:12 +0000 (14:51 +0200)]
test: <endian.h> tests

14 years agoMerge branch 'master' of git://github.com/markokr/libusual
Marko Kreen [Wed, 26 Jan 2011 12:34:26 +0000 (14:34 +0200)]
Merge branch 'master' of git://github.com/markokr/libusual

14 years agoendian: autoconf detection for enc/dec functions
Marko Kreen [Wed, 26 Jan 2011 12:31:47 +0000 (14:31 +0200)]
endian: autoconf detection for enc/dec functions

14 years agocfparser: new section callback
Marko Kreen [Wed, 26 Jan 2011 12:04:29 +0000 (14:04 +0200)]
cfparser: new section callback

14 years agostatlist: statlist_last()
Marko Kreen [Wed, 26 Jan 2011 12:04:16 +0000 (14:04 +0200)]
statlist: statlist_last()

14 years agousual.m4: -Wextra check uses wrong variable
Marko Kreen [Wed, 26 Jan 2011 11:09:07 +0000 (13:09 +0200)]
usual.m4: -Wextra check uses wrong variable

14 years agohashtab: cx conversion missed memset
Marko Kreen [Wed, 26 Jan 2011 11:08:46 +0000 (13:08 +0200)]
hashtab: cx conversion missed memset

14 years agoslab: cx conversion missed memset
Marko Kreen [Wed, 26 Jan 2011 11:08:03 +0000 (13:08 +0200)]
slab: cx conversion missed memset

14 years agosocket: poll compat fix
Marko Kreen [Fri, 21 Jan 2011 11:33:05 +0000 (13:33 +0200)]
socket: poll compat fix

14 years agogitignore more
Marko Kreen [Wed, 8 Dec 2010 15:26:31 +0000 (17:26 +0200)]
gitignore more

14 years agogitignore file
Marko Kreen [Fri, 3 Dec 2010 12:21:23 +0000 (14:21 +0200)]
gitignore file

14 years agocfparser: silently ignore CF_NO_RELOAD or CF_READONLY updates.
Marko Kreen [Tue, 30 Nov 2010 12:55:17 +0000 (14:55 +0200)]
cfparser: silently ignore CF_NO_RELOAD or CF_READONLY updates.

14 years agocfparser: clarify bit-checks
Marko Kreen [Tue, 30 Nov 2010 09:54:13 +0000 (11:54 +0200)]
cfparser: clarify bit-checks

14 years agoevent: signal_del/evtimer_del compat
Marko Kreen [Mon, 29 Nov 2010 16:23:35 +0000 (18:23 +0200)]
event: signal_del/evtimer_del compat

14 years agoevent: get_version and get_method functions
Marko Kreen [Mon, 29 Nov 2010 11:42:27 +0000 (13:42 +0200)]
event: get_version and get_method functions

14 years agodaemon: empty logfile means same as NULL
Marko Kreen [Mon, 29 Nov 2010 11:41:43 +0000 (13:41 +0200)]
daemon: empty logfile means same as NULL

14 years agom4/usual.m4: AC_USUAL_LIBEVENT_OPT macro, for optional libevent
Marko Kreen [Mon, 29 Nov 2010 11:41:08 +0000 (13:41 +0200)]
m4/usual.m4: AC_USUAL_LIBEVENT_OPT macro, for optional libevent

14 years agowin32 compat update
Marko Kreen [Wed, 24 Nov 2010 07:38:34 +0000 (09:38 +0200)]
win32 compat update

14 years agoattregex: lost interpretation.dat, compile regex locally
Marko Kreen [Wed, 24 Nov 2010 07:37:36 +0000 (09:37 +0200)]
attregex: lost interpretation.dat, compile regex locally

14 years agoCoupld portability fixes
Marko Kreen [Tue, 23 Nov 2010 13:28:42 +0000 (15:28 +0200)]
Coupld portability fixes

14 years agoFix couple bugs in regtests, makefile cleanup
Marko Kreen [Sat, 20 Nov 2010 11:38:39 +0000 (13:38 +0200)]
Fix couple bugs in regtests, makefile cleanup

Now the makefile does not depend on top-level makefile,
regtest is built as ordinary executable.

14 years agonetdb: compat getaddrinfo_a fixes
Marko Kreen [Mon, 22 Nov 2010 22:34:19 +0000 (00:34 +0200)]
netdb: compat getaddrinfo_a fixes

14 years agoheap: heap size and obj-by-index helpers
Marko Kreen [Mon, 22 Nov 2010 22:33:00 +0000 (00:33 +0200)]
heap: heap size and obj-by-index helpers

14 years agocfparser: API reorg, regtests
Marko Kreen [Thu, 18 Nov 2010 14:10:36 +0000 (16:10 +0200)]
cfparser: API reorg, regtests

Support both dynamic sections and dynamic keys.

Cleanup of both internal and external APIs.

14 years agodoc: mention netdb and heap
Marko Kreen [Thu, 4 Nov 2010 12:17:28 +0000 (14:17 +0200)]
doc: mention netdb and heap

14 years agologging: restore syslog and syslog_facility params
Marko Kreen [Wed, 17 Nov 2010 12:00:01 +0000 (14:00 +0200)]
logging: restore syslog and syslog_facility params

14 years agocfparser: filename params, with tilde expansion
Marko Kreen [Wed, 10 Nov 2010 15:44:41 +0000 (17:44 +0200)]
cfparser: filename params, with tilde expansion

Patch by Asko Tiidumaa, applied with minor modifications.

14 years agoheap: fix few conversion bugs
Marko Kreen [Thu, 4 Nov 2010 12:04:07 +0000 (14:04 +0200)]
heap: fix few conversion bugs

14 years agopgsocket: handle connection lifetime
Marko Kreen [Wed, 3 Nov 2010 15:48:26 +0000 (17:48 +0200)]
pgsocket: handle connection lifetime

14 years agologging: fix die(), again
Marko Kreen [Tue, 12 Oct 2010 11:02:46 +0000 (14:02 +0300)]
logging: fix die(), again

14 years agonetdb: compat getaddrinfo_a()
Marko Kreen [Tue, 12 Oct 2010 10:50:15 +0000 (13:50 +0300)]
netdb: compat getaddrinfo_a()

14 years agobits: wrong header ifdef
Marko Kreen [Tue, 12 Oct 2010 10:48:53 +0000 (13:48 +0300)]
bits: wrong header ifdef

14 years agoheap: convert inline implemenatation to regular one
Marko Kreen [Tue, 12 Oct 2010 10:47:55 +0000 (13:47 +0300)]
heap: convert inline implemenatation to regular one

the minor performance advantages are not worth
more complex use.

14 years agotest/: base tests, test both compat and system code
Marko Kreen [Sat, 9 Oct 2010 12:03:44 +0000 (15:03 +0300)]
test/: base tests, test both compat and system code

14 years agobase: alignof()
Marko Kreen [Sat, 9 Oct 2010 12:02:53 +0000 (15:02 +0300)]
base: alignof()

14 years agoGive parent project list of files to include in distro
Marko Kreen [Sat, 9 Oct 2010 07:14:43 +0000 (10:14 +0300)]
Give parent project list of files to include in distro

14 years agotime: make sure USEC is same type as usec_t
Marko Kreen [Thu, 30 Sep 2010 05:04:36 +0000 (22:04 -0700)]
time: make sure USEC is same type as usec_t

14 years agomakefile: Show CC flags at the start of compilation
Marko Kreen [Tue, 28 Sep 2010 19:07:21 +0000 (12:07 -0700)]
makefile: Show CC flags at the start of compilation

14 years agoAllow override of system regex
Marko Kreen [Tue, 28 Sep 2010 19:07:02 +0000 (12:07 -0700)]
Allow override of system regex

14 years agobits: add ffs compat, minor test fixes
Marko Kreen [Tue, 28 Sep 2010 18:50:43 +0000 (11:50 -0700)]
bits: add ffs compat, minor test fixes

14 years agotest: fix few compat problems
Marko Kreen [Sun, 26 Sep 2010 04:04:46 +0000 (21:04 -0700)]
test: fix few compat problems

- include <usual/base.h> before system includes
- don't force poll() test, it can conflict with system includes

14 years agobase: malloc.h is needed only on darwin
Marko Kreen [Sun, 26 Sep 2010 04:03:47 +0000 (21:03 -0700)]
base: malloc.h is needed only on darwin

14 years agobase: define few magic names to make Solaris work
Marko Kreen [Sun, 26 Sep 2010 04:02:56 +0000 (21:02 -0700)]
base: define few magic names to make Solaris work

14 years agoconfigure: add few common libraries to build.
Marko Kreen [Sun, 26 Sep 2010 04:01:53 +0000 (21:01 -0700)]
configure: add few common libraries to build.

Does not matter for libusual.a but for test executables.

14 years agoDon't use -Wextra on older gcc.
Marko Kreen [Sat, 25 Sep 2010 12:17:18 +0000 (05:17 -0700)]
Don't use -Wextra on older gcc.

Check for -Wno-missing-field-initializers,
gcc without it would be too noisy.

14 years agobits: make fallback fls work for negative values
Marko Kreen [Sun, 26 Sep 2010 03:57:05 +0000 (20:57 -0700)]
bits: make fallback fls work for negative values

14 years agobits: move bit-arithmetics to separate file
Marko Kreen [Tue, 21 Sep 2010 04:24:38 +0000 (21:24 -0700)]
bits: move bit-arithmetics to separate file

14 years agoSome more doc work
Marko Kreen [Tue, 21 Sep 2010 03:53:49 +0000 (20:53 -0700)]
Some more doc work

14 years agostring: memrchr() definition was lost
Marko Kreen [Wed, 15 Sep 2010 13:11:52 +0000 (16:11 +0300)]
string: memrchr() definition was lost

14 years agoattregex: make it build
Marko Kreen [Wed, 15 Sep 2010 12:15:32 +0000 (15:15 +0300)]
attregex: make it build

14 years agoattregex: import AT&T Research regex regression tests
Marko Kreen [Wed, 15 Sep 2010 12:04:31 +0000 (15:04 +0300)]
attregex: import AT&T Research regex regression tests

Make sure <usual/regex.[ch]> stays POSIX-compliant.

Homepage: http://www2.research.att.com/~gsf/testregex/
Version:  2009-11-11
Authors:  Doug McIlroy & Glenn Fowler

14 years agoregex: remove non-standard error codes.
Marko Kreen [Wed, 15 Sep 2010 11:45:13 +0000 (14:45 +0300)]
regex: remove non-standard error codes.

REG_EEND and REG_ESIZE are not in POSIX, and are unused
by this implementation.

ECOLLATE is also unused, but it's standard so keep it.

14 years agotest make improvements
Marko Kreen [Tue, 14 Sep 2010 21:05:21 +0000 (00:05 +0300)]
test make improvements

14 years agoDoxygen-based API docs
Marko Kreen [Wed, 13 Jan 2010 07:32:09 +0000 (09:32 +0200)]
Doxygen-based API docs

14 years agologging: fix die() arg passing
Marko Kreen [Sun, 12 Sep 2010 21:11:10 +0000 (00:11 +0300)]
logging: fix die() arg passing

14 years agodict: small dict type, mainly for urlencode/decode
Marko Kreen [Mon, 9 Aug 2010 22:27:01 +0000 (01:27 +0300)]
dict: small dict type, mainly for urlencode/decode

14 years agocxalloc: customizable allocator framework
Marko Kreen [Fri, 23 Jul 2010 10:06:24 +0000 (13:06 +0300)]
cxalloc: customizable allocator framework

There is a need to sometimes have different allocation policy
to some generic data structure than usual.

Instead of having each of them having allocator abstraction
on their own and both simple and customisable API, lets
have simple generic allocation API.

Initialized will take another CxMem *cx argument, and when
no customization is needed, put USUAL_ALLOC there.

15 years agoevent: remove usage of zmalloc
Marko Kreen [Fri, 23 Jul 2010 10:05:27 +0000 (13:05 +0300)]
event: remove usage of zmalloc

15 years agoaatree: make NIL node const.
Marko Kreen [Sat, 11 Sep 2010 07:44:15 +0000 (10:44 +0300)]
aatree: make NIL node const.

It really should not be modified.

15 years agostring: undef basename, dirname before defining
Marko Kreen [Sat, 11 Sep 2010 07:43:26 +0000 (10:43 +0300)]
string: undef basename, dirname before defining

Helps with testing, otherwise OS defs conflict with ours.

15 years agoDraft tgz generation
Marko Kreen [Fri, 10 Sep 2010 10:26:22 +0000 (13:26 +0300)]
Draft tgz generation

15 years agopgutil: trim the kwlookup code
Marko Kreen [Wed, 8 Sep 2010 17:08:29 +0000 (20:08 +0300)]
pgutil: trim the kwlookup code

No reason to care about unreserved keywords or their exact types.

Only keep the pg_is_reserved_word().

15 years agopgutil: cleaner gperf code
Marko Kreen [Mon, 6 Sep 2010 05:25:43 +0000 (08:25 +0300)]
pgutil: cleaner gperf code

- stop inlining
- remove '#line' directives

15 years agosocket: WSAIoctl was called with wrong params
Marko Kreen [Mon, 6 Sep 2010 05:20:42 +0000 (08:20 +0300)]
socket: WSAIoctl was called with wrong params

15 years agobase: don't define posix_memalign, if it cannot be emulated
Marko Kreen [Mon, 6 Sep 2010 05:19:57 +0000 (08:19 +0300)]
base: don't define posix_memalign, if it cannot be emulated

15 years agoregex: win32 can have STRICT defined
Marko Kreen [Mon, 6 Sep 2010 05:19:14 +0000 (08:19 +0300)]
regex: win32 can have STRICT defined

15 years agotime: win32 can have usleep
Marko Kreen [Mon, 6 Sep 2010 05:17:29 +0000 (08:17 +0300)]
time: win32 can have usleep