]> mj.ucw.cz Git - libucw.git/log
libucw.git
12 years agoTester: Do not be picky about final newlines
Martin Mares [Fri, 10 Feb 2012 22:11:04 +0000 (23:11 +0100)]
Tester: Do not be picky about final newlines

12 years agoBasecode tests were completely wrong
Martin Mares [Fri, 10 Feb 2012 22:10:33 +0000 (23:10 +0100)]
Basecode tests were completely wrong

Wrong directory, wrong keywords...

12 years agoGrowing arrays: Fixed test cases
Martin Mares [Fri, 10 Feb 2012 21:57:16 +0000 (22:57 +0100)]
Growing arrays: Fixed test cases

"Output" is not a synonym for "Out".

12 years agoGrowing arrays now support auto-zeroing mode
Martin Mares [Fri, 10 Feb 2012 21:57:03 +0000 (22:57 +0100)]
Growing arrays now support auto-zeroing mode

12 years agoUpdated TODO
Martin Mares [Thu, 9 Feb 2012 22:43:14 +0000 (23:43 +0100)]
Updated TODO

12 years agoRemoved the `qache' module
Martin Mares [Thu, 9 Feb 2012 22:42:16 +0000 (23:42 +0100)]
Removed the `qache' module

During the whole history, it had only a single use in Sherlock's
multiplexer. Will be moved to libsherlock upon reviving Sherlock.

12 years agoDoc: Mention several undocumented modules
Martin Mares [Thu, 9 Feb 2012 22:36:36 +0000 (23:36 +0100)]
Doc: Mention several undocumented modules

12 years agoMoved memory allocation functions together and document them
Martin Mares [Thu, 9 Feb 2012 22:33:00 +0000 (23:33 +0100)]
Moved memory allocation functions together and document them

12 years agoThe `prefetch' module has been removed.
Martin Mares [Thu, 9 Feb 2012 22:29:52 +0000 (23:29 +0100)]
The `prefetch' module has been removed.

In recent years, GCC builtin_prefetch() is much more useful.

12 years agoThe rest of sighandler separation
Martin Mares [Thu, 9 Feb 2012 22:29:10 +0000 (23:29 +0100)]
The rest of sighandler separation

12 years agoSeparated out sighandler module
Martin Mares [Thu, 9 Feb 2012 22:24:07 +0000 (23:24 +0100)]
Separated out sighandler module

For years, it was used only in lizard-safe and its use makes
signal handling even more complicated than it's usual.

Scheduled for removal, will replace it by a lizard-specific hack.

12 years agoMoved process-related functions to ucw/process.h
Martin Mares [Thu, 9 Feb 2012 22:16:51 +0000 (23:16 +0100)]
Moved process-related functions to ucw/process.h

12 years agoio.h: Fixed guard macro
Martin Mares [Thu, 9 Feb 2012 22:12:08 +0000 (23:12 +0100)]
io.h: Fixed guard macro

12 years agoMore modules moved to io.h and renamed to io-*.c
Martin Mares [Thu, 9 Feb 2012 22:09:46 +0000 (23:09 +0100)]
More modules moved to io.h and renamed to io-*.c

This includes carefulio, mmap, file_size() and sync.

12 years agoMoved ucw/lfs.h to ucw/io.h
Martin Mares [Thu, 9 Feb 2012 22:02:17 +0000 (23:02 +0100)]
Moved ucw/lfs.h to ucw/io.h

More I/O functions will follow.

12 years agoThe `randomkey' module has been removed.
Martin Mares [Thu, 9 Feb 2012 21:54:43 +0000 (22:54 +0100)]
The `randomkey' module has been removed.

Obsolete, no real use in years.

12 years agoThe `profile' module has been removed
Martin Mares [Thu, 9 Feb 2012 21:48:31 +0000 (22:48 +0100)]
The `profile' module has been removed

It was obsolete and I do not know of any use in last 5 years.

12 years agoMain: hook_add() is guaranteed to reschedule the hook
Martin Mares [Thu, 9 Feb 2012 21:24:54 +0000 (22:24 +0100)]
Main: hook_add() is guaranteed to reschedule the hook

12 years agoMain: Removing an already removed event is always safe.
Martin Mares [Thu, 9 Feb 2012 19:20:34 +0000 (20:20 +0100)]
Main: Removing an already removed event is always safe.

Also adding an already added hook is always safe. For other event
types, we still refuse repeated adds.

12 years agoMain: Fixed miscalculated memory allocation
Martin Mares [Tue, 7 Feb 2012 09:10:11 +0000 (10:10 +0100)]
Main: Fixed miscalculated memory allocation

12 years agostrtonum: str_to_<signed> now implicitly allows signs
Martin Mares [Fri, 27 Jan 2012 14:05:47 +0000 (15:05 +0100)]
strtonum: str_to_<signed> now implicitly allows signs

12 years agoString: Added str_starts_with() and str_ends_with()
Martin Mares [Sat, 7 Jan 2012 14:25:47 +0000 (15:25 +0100)]
String: Added str_starts_with() and str_ends_with()

12 years agoLogging: Use log_set_default_stream().
Martin Mares [Sat, 7 Jan 2012 13:33:52 +0000 (14:33 +0100)]
Logging: Use log_set_default_stream().

12 years agoLogging: Added log_set_default_stream()
Martin Mares [Sat, 7 Jan 2012 13:33:43 +0000 (14:33 +0100)]
Logging: Added log_set_default_stream()

12 years ago<ucw/sha1.h> is a part of the public API, do not forget to install it
Martin Mares [Thu, 5 Jan 2012 17:35:39 +0000 (18:35 +0100)]
<ucw/sha1.h> is a part of the public API, do not forget to install it

12 years agomempool: Fixed a memory leak in mp_pop().
Pavel Charvat [Mon, 5 Dec 2011 10:21:42 +0000 (11:21 +0100)]
mempool: Fixed a memory leak in mp_pop().

12 years agoUCW::CGI: Updated copyright
Martin Mares [Tue, 22 Nov 2011 16:15:09 +0000 (17:15 +0100)]
UCW::CGI: Updated copyright

12 years agoUCW::CGI: Use "//" instead of "||" where appropriate
Martin Mares [Tue, 22 Nov 2011 16:14:18 +0000 (17:14 +0100)]
UCW::CGI: Use "//" instead of "||" where appropriate

12 years agoUCW::CGI: Report all errors by proper HTTP status codes
Martin Mares [Tue, 22 Nov 2011 16:13:32 +0000 (17:13 +0100)]
UCW::CGI: Report all errors by proper HTTP status codes

All calls to die have been replaced by returning a proper HTTP status
code. (A sole exception is if we fail, because we were not run as a CGI
script at all.)

Also, the set of supported HTTP methods now includes HEAD.

12 years agolog output: Fix of a bug introduced during cleanups
Martin Mares [Thu, 20 Oct 2011 07:16:53 +0000 (09:16 +0200)]
log output: Fix of a bug introduced during cleanups

12 years agologoutput: A few cleanups
Martin Mares [Tue, 18 Oct 2011 16:17:15 +0000 (18:17 +0200)]
logoutput: A few cleanups

12 years agoAdded a utility for logging of program output
Martin Mares [Tue, 18 Oct 2011 16:12:16 +0000 (18:12 +0200)]
Added a utility for logging of program output

Contributed by Tomas Ebenlendr <ebik@ucw.cz>.

12 years agoMerge branch 'dev-mainloop' of ssh://git.ucw.cz/projects/libucw/GIT/libucw into dev...
Martin Mares [Sun, 25 Sep 2011 12:03:38 +0000 (14:03 +0200)]
Merge branch 'dev-mainloop' of ssh://git.ucw.cz/projects/libucw/GIT/libucw into dev-mainloop

12 years agoTODO: A few remarks...
Martin Mares [Sun, 25 Sep 2011 12:03:28 +0000 (14:03 +0200)]
TODO: A few remarks...

12 years agoMain recio: Killed an ASSERT, which triggered under legitimate conditions
Martin Mares [Wed, 14 Sep 2011 13:19:58 +0000 (15:19 +0200)]
Main recio: Killed an ASSERT, which triggered under legitimate conditions

12 years agoLet setproctitle() recalculate program_invocation_name
Martin Mares [Fri, 19 Aug 2011 15:17:45 +0000 (17:17 +0200)]
Let setproctitle() recalculate program_invocation_name

Otherwise, syslog() and other functions which try to log the name
of the current programs are confused.

12 years agoMain: Complete the fix in HEAD^^
Martin Mares [Fri, 19 Aug 2011 10:38:59 +0000 (12:38 +0200)]
Main: Complete the fix in HEAD^^

12 years agoMain: Better reporting of fio errors in main-test
Martin Mares [Fri, 19 Aug 2011 10:38:11 +0000 (12:38 +0200)]
Main: Better reporting of fio errors in main-test

12 years agoMain: Clean up handling of poll flags
Martin Mares [Fri, 19 Aug 2011 10:29:34 +0000 (12:29 +0200)]
Main: Clean up handling of poll flags

- We no longer include POLLERR and POLLHUP in the set of requested
  events. The standard (SUSv2) says they will be delivered regardless
  of the event mask chosen.

- POLLERR is an output event, so we call only the write handler.

- POLLHUP is documented as an output event, but it sometimes signals
  events which we would like to process by the input handler. The
  situations when POLLHUP is generated include:

    *  on reading end of a pipe when the writing end has been closed
       -> we would like to call read handler and get EOF (write handler
       does not exist)

    *  on writing end of a pipe when the reading end has been closed
       -> we would like to call write handler (read handler does not
       exist)

    *  on a R/W socket when the other end has been closed -> better
       call read handler to get an EOF

    *  on a tty which has been hanged up -> probably the same as a R/W
       socket

  We have therefore decided to call the read handler, but fall back to
  the write handler if the read handler does not exist.

- When a handler decided to remove itself (but keep the main_file),
  we could have entered an infinite loop. This no longer happens.

12 years agoUCW::CGI: "; boundary=..." is also valid syntax
Martin Mares [Mon, 15 Aug 2011 11:27:50 +0000 (13:27 +0200)]
UCW::CGI: "; boundary=..." is also valid syntax

12 years agoUCW::CGI: Cosmetic changes in capitalization of HTTP headers
Martin Mares [Mon, 15 Aug 2011 08:27:54 +0000 (10:27 +0200)]
UCW::CGI: Cosmetic changes in capitalization of HTTP headers

12 years agofb-socket: Support shared fd's
Martin Mares [Sun, 31 Jul 2011 15:15:37 +0000 (17:15 +0200)]
fb-socket: Support shared fd's

12 years agoDoc: Updated release notes
Martin Mares [Sun, 31 Jul 2011 12:55:41 +0000 (14:55 +0200)]
Doc: Updated release notes

12 years agoUCW::CGI: Implemented UTF-8 mode (compatible with `use utf8')
Martin Mares [Sun, 31 Jul 2011 12:55:17 +0000 (14:55 +0200)]
UCW::CGI: Implemented UTF-8 mode (compatible with `use utf8')

12 years agoMerge branch 'dev-mainloop'
Martin Mares [Sun, 31 Jul 2011 12:44:25 +0000 (14:44 +0200)]
Merge branch 'dev-mainloop'

12 years agoMain recio: Constants seem to be OK, deleted FIXME
Martin Mares [Sun, 31 Jul 2011 12:42:59 +0000 (14:42 +0200)]
Main recio: Constants seem to be OK, deleted FIXME

13 years agoMain: Introduce functions for telling whether an object is active
Martin Mares [Thu, 9 Jun 2011 16:16:33 +0000 (18:16 +0200)]
Main: Introduce functions for telling whether an object is active

This is an useful idiom and it helps avoid calling clist_is_linked()
on private parts of the objects.

13 years agoMain recio: Allow rec_io_(start|stop)_read from the read_handler
Martin Mares [Thu, 9 Jun 2011 16:04:26 +0000 (18:04 +0200)]
Main recio: Allow rec_io_(start|stop)_read from the read_handler

This involves rescanning the read buffer on rec_io_start_read()
as there might be leftover data from previous invokations of the
read_handler.

However, we have to be careful to avoid arbitrarily deep recursion
of various handlers. We do that by deferring the actual start of
reading to a main_hook.

13 years agoMain: Moved hooks before recio
Martin Mares [Thu, 9 Jun 2011 15:15:08 +0000 (17:15 +0200)]
Main: Moved hooks before recio

13 years agoMain record-based I/O: documentation
Martin Mares [Thu, 9 Jun 2011 15:12:22 +0000 (17:12 +0200)]
Main record-based I/O: documentation

13 years agoMain record-based I/O: allow freeing of recio from read handlers
Martin Mares [Thu, 9 Jun 2011 14:51:15 +0000 (16:51 +0200)]
Main record-based I/O: allow freeing of recio from read handlers

13 years agoRemoved invalid usage on .NOTPARALLEL keyword in makefiles.
Pavel Charvat [Mon, 6 Jun 2011 08:49:31 +0000 (10:49 +0200)]
Removed invalid usage on .NOTPARALLEL keyword in makefiles.

13 years agoWhitespace cleanup.
Pavel Charvat [Wed, 18 May 2011 09:46:18 +0000 (11:46 +0200)]
Whitespace cleanup.

13 years agoMain record I/O: Flow control and a few bits of documentation
Martin Mares [Sun, 1 May 2011 23:49:59 +0000 (01:49 +0200)]
Main record I/O: Flow control and a few bits of documentation

13 years agoMain: Preliminary implementation of record-based I/O
Martin Mares [Sun, 1 May 2011 23:23:42 +0000 (01:23 +0200)]
Main: Preliminary implementation of record-based I/O

13 years agoAutomatic tests can't run in parallel.
Pavel Charvat [Tue, 29 Mar 2011 13:54:56 +0000 (15:54 +0200)]
Automatic tests can't run in parallel.

13 years agoMerge branch 'master' of ssh://git.ucw.cz/projects/libucw/GIT/libucw
Martin Mares [Tue, 29 Mar 2011 10:53:37 +0000 (12:53 +0200)]
Merge branch 'master' of ssh://git.ucw.cz/projects/libucw/GIT/libucw

13 years agolibucw: OFFSETOF returns an unsigned int again
Pavel Charvat [Wed, 10 Sep 2008 09:56:19 +0000 (11:56 +0200)]
libucw: OFFSETOF returns an unsigned int again

13 years agoucwlib: -- use offsetof() from C99
Pavel Charvat [Wed, 10 Sep 2008 09:27:32 +0000 (11:27 +0200)]
ucwlib: -- use offsetof() from C99

13 years agoUse size_t in xmalloc_zero.
Pavel Charvat [Wed, 3 Sep 2008 13:10:38 +0000 (15:10 +0200)]
Use size_t in xmalloc_zero.

13 years agoUse size_t in xmalloc() and xrealloc().
Martin Mares [Tue, 2 Sep 2008 20:09:44 +0000 (22:09 +0200)]
Use size_t in xmalloc() and xrealloc().

13 years agoFixed a typo in guard macro name.
Martin Mares [Sun, 31 Aug 2008 16:59:57 +0000 (18:59 +0200)]
Fixed a typo in guard macro name.

13 years agoredblack: Improved customization of memory allocator
Pavel Charvat [Wed, 9 Mar 2011 21:29:46 +0000 (22:29 +0100)]
redblack: Improved customization of memory allocator

13 years agoMain: Add main_step()
Martin Mares [Tue, 1 Mar 2011 13:07:51 +0000 (14:07 +0100)]
Main: Add main_step()

13 years agoMain: Allow main_loop() to be re-entered after shutdown
Martin Mares [Tue, 1 Mar 2011 12:59:26 +0000 (13:59 +0100)]
Main: Allow main_loop() to be re-entered after shutdown

13 years agoMerge branch 'dev-mainloop'
Martin Mares [Sun, 27 Feb 2011 12:13:18 +0000 (13:13 +0100)]
Merge branch 'dev-mainloop'

13 years agoMain: One more relnote
Martin Mares [Sun, 27 Feb 2011 12:12:42 +0000 (13:12 +0100)]
Main: One more relnote

13 years agoPreliminary release notes for LibUCW 4.1
Martin Mares [Sun, 27 Feb 2011 12:11:47 +0000 (13:11 +0100)]
Preliminary release notes for LibUCW 4.1

13 years agoMain: Updated documentation
Martin Mares [Sun, 27 Feb 2011 11:30:18 +0000 (12:30 +0100)]
Main: Updated documentation

13 years agoMain: file_recalc_list need not be empty upon main_destroy()
Martin Mares [Sun, 27 Feb 2011 10:57:13 +0000 (11:57 +0100)]
Main: file_recalc_list need not be empty upon main_destroy()

13 years agoMain: Separate debug functions for all types of objects
Martin Mares [Sun, 27 Feb 2011 10:54:35 +0000 (11:54 +0100)]
Main: Separate debug functions for all types of objects

13 years agoMain: Proofreading docs
Martin Mares [Sat, 26 Feb 2011 23:09:13 +0000 (00:09 +0100)]
Main: Proofreading docs

13 years agoMain: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs
Martin Mares [Sat, 26 Feb 2011 22:51:53 +0000 (23:51 +0100)]
Main: Let main-block use HOOK_RETRY / HOOK_IDLE as suggested by the docs

13 years agoMain: Add block_io_set_timeout() as promised in the docs
Martin Mares [Sat, 26 Feb 2011 22:50:16 +0000 (23:50 +0100)]
Main: Add block_io_set_timeout() as promised in the docs

13 years agoMain: Renamed MFERR_xxx to BIO_ERR_xxx
Martin Mares [Sat, 26 Feb 2011 22:45:18 +0000 (23:45 +0100)]
Main: Renamed MFERR_xxx to BIO_ERR_xxx

13 years agoMain: Update documentation
Martin Mares [Sat, 26 Feb 2011 22:44:06 +0000 (23:44 +0100)]
Main: Update documentation

Needs proof-reading.

13 years agoMain: Added main_teardown() and main_destroy()
Martin Mares [Sat, 26 Feb 2011 11:11:16 +0000 (12:11 +0100)]
Main: Added main_teardown() and main_destroy()

There are now two possibilities how to get rid of a main loop
context. Either you call main_delete(), which is gentle and fails
whenever there are any active files/hooks/etc. Or you call main_destroy(),
which forcibly removes all such objects; it also closes all files.

main_teardown() just calls main_destroy() on the current context,
just as main_cleanup() calls main_delete().

Also, file_close_all() is no longer available -- the only known use
cases are after fork(), but closing files is no longer sufficient
there. All calls to file_close_all() should be therefore replaced
by main_teardown().

13 years agoMain: Internal operations on non-current contexts
Martin Mares [Sat, 26 Feb 2011 10:26:19 +0000 (11:26 +0100)]
Main: Internal operations on non-current contexts

Introduced an (internal) *_ctx() variant of several functions, working
on an explicit context which need not be current.

Changed main_delete(), so that it does not make the context temporarily
current.

13 years agoMain: Tests now include main_cleanup()
Martin Mares [Fri, 25 Feb 2011 23:32:21 +0000 (00:32 +0100)]
Main: Tests now include main_cleanup()

13 years agoMain: Plugged memory leaks of internal structures
Martin Mares [Fri, 25 Feb 2011 23:26:22 +0000 (00:26 +0100)]
Main: Plugged memory leaks of internal structures

13 years agoMain: main_delete() must make the soon-to-be-deleted context current
Martin Mares [Fri, 25 Feb 2011 23:23:25 +0000 (00:23 +0100)]
Main: main_delete() must make the soon-to-be-deleted context current

Otherwise, it might call signal_del() and file_del() on another
(or even undefined) context.

13 years agoMain: Moved testing code to a separate file
Martin Mares [Fri, 25 Feb 2011 18:33:59 +0000 (19:33 +0100)]
Main: Moved testing code to a separate file

13 years agoMain: Fixed a bug in looping over files that need not exist any longer
Martin Mares [Fri, 25 Feb 2011 18:14:15 +0000 (19:14 +0100)]
Main: Fixed a bug in looping over files that need not exist any longer

13 years agoMain: Update copyrights and remove debug dumps
Martin Mares [Fri, 25 Feb 2011 18:07:43 +0000 (19:07 +0100)]
Main: Update copyrights and remove debug dumps

13 years agolibcharset: Added missing picsuffix to libcharset.pc.
Pavel Charvat [Sun, 7 Nov 2010 23:04:06 +0000 (00:04 +0100)]
libcharset: Added missing picsuffix to libcharset.pc.

13 years agohashtable: Bugfix.
Pavel Charvat [Sun, 7 Nov 2010 18:41:03 +0000 (19:41 +0100)]
hashtable: Bugfix.

13 years agoSimplified stdupping of NULL strings.
Pavel Charvat [Sun, 7 Nov 2010 14:08:01 +0000 (15:08 +0100)]
Simplified stdupping of NULL strings.

13 years agohashtable: Updated docs.
Pavel Charvat [Sun, 7 Nov 2010 13:39:46 +0000 (14:39 +0100)]
hashtable: Updated docs.

13 years agohashtable: Corrections.
Pavel Charvat [Sun, 7 Nov 2010 12:10:58 +0000 (13:10 +0100)]
hashtable: Corrections.

13 years agohashtable: More options about memory management.
Pavel Charvat [Sun, 7 Nov 2010 12:00:50 +0000 (13:00 +0100)]
hashtable: More options about memory management.

13 years agohashtable: Documented HASH_TABLE_VARS.
Pavel Charvat [Sun, 7 Nov 2010 10:45:19 +0000 (11:45 +0100)]
hashtable: Documented HASH_TABLE_VARS.

13 years agohashtable: Implemented new HASH_TABLE_VARS parameter.
Pavel Charvat [Sun, 7 Nov 2010 10:42:25 +0000 (11:42 +0100)]
hashtable: Implemented new HASH_TABLE_VARS parameter.

13 years agohashtable: Only fixed whitespace.
Pavel Charvat [Sun, 7 Nov 2010 10:36:36 +0000 (11:36 +0100)]
hashtable: Only fixed whitespace.

13 years agoThreads: The master mutex was not initialized in some cases
Martin Mares [Mon, 1 Nov 2010 19:18:27 +0000 (20:18 +0100)]
Threads: The master mutex was not initialized in some cases

13 years agoMain: No more calls to GARY_SIZE on an empty timer array
Martin Mares [Fri, 8 Oct 2010 13:01:12 +0000 (15:01 +0200)]
Main: No more calls to GARY_SIZE on an empty timer array

13 years agoUCW::Configure::C: de-reference CPU_ARCH in COPT
Martin Mares [Thu, 7 Oct 2010 14:58:43 +0000 (16:58 +0200)]
UCW::Configure::C: de-reference CPU_ARCH in COPT

Originally, when CONFIG_EXACT_CPU was enabled, COPT contained `-march=$(CPU_ARCH)',
which worked when it was used in a Makefile, but not when doing a test
compile in the configure script.

I changed it to dereference the variable immediately.

13 years agoAdded a clean way for building of static PIC libraries
Martin Mares [Fri, 1 Oct 2010 18:57:25 +0000 (20:57 +0200)]
Added a clean way for building of static PIC libraries

Defining CONFIG_STATIC_PIC adds a dependency on *-pic.a
to every pkg-config file. In addition to that, the .pc
files now contain a "picsuffix" variable which can be
overridden by the user to enable the PIC mode.

13 years agoUCW::CGI: Fixed a regression in processing of multiple controls with the same name
Martin Mares [Tue, 31 Aug 2010 14:39:18 +0000 (16:39 +0200)]
UCW::CGI: Fixed a regression in processing of multiple controls with the same name

13 years agoAdded a script for checking different configurations of LibUCW
Martin Mares [Fri, 30 Jul 2010 18:53:53 +0000 (20:53 +0200)]
Added a script for checking different configurations of LibUCW

Adapted from Sherlock's check-customs.

13 years agoUCW: Document CONFIG_UCW_EPOLL
Martin Mares [Fri, 30 Jul 2010 18:52:48 +0000 (20:52 +0200)]
UCW: Document CONFIG_UCW_EPOLL