]> mj.ucw.cz Git - libucw.git/log
libucw.git
10 years agoGary: GARY_PUSH and GARY_POP have lost the 2nd argument
Martin Mares [Tue, 28 Jan 2014 15:27:54 +0000 (16:27 +0100)]
Gary: GARY_PUSH and GARY_POP have lost the 2nd argument

Having to tell "yessir, just one element" on each call was just too
inconvenient.

10 years agoGary: Remove unused gary_free()
Martin Mares [Tue, 28 Jan 2014 15:13:01 +0000 (16:13 +0100)]
Gary: Remove unused gary_free()

10 years agoPrepared for release of Libucw 6.0
Martin Mares [Mon, 27 Jan 2014 23:51:11 +0000 (00:51 +0100)]
Prepared for release of Libucw 6.0

10 years agoOpt: Added missing reference
Martin Mares [Mon, 27 Jan 2014 23:41:02 +0000 (00:41 +0100)]
Opt: Added missing reference

10 years agoOpt: Forgot to describe help columns
Martin Mares [Mon, 27 Jan 2014 23:39:44 +0000 (00:39 +0100)]
Opt: Forgot to describe help columns

10 years agoMerge branch 'dev-opt'
Martin Mares [Mon, 27 Jan 2014 23:24:57 +0000 (00:24 +0100)]
Merge branch 'dev-opt'

10 years agoOpt: Documented opt and its interaction with conf
Martin Mares [Mon, 27 Jan 2014 23:24:27 +0000 (00:24 +0100)]
Opt: Documented opt and its interaction with conf

10 years agoDoc: Newer versions of AsciiDoc require [footer-text]
Martin Mares [Mon, 27 Jan 2014 20:32:22 +0000 (21:32 +0100)]
Doc: Newer versions of AsciiDoc require [footer-text]

10 years agoOpt: State of opt-conf moved to opt_context
Martin Mares [Mon, 27 Jan 2014 20:03:50 +0000 (21:03 +0100)]
Opt: State of opt-conf moved to opt_context

It gives a better feeling to get rid of magical static variables
in functions :)

10 years agoOpt: OPT_HELP_OPTION does not need passing pointer to current definitions
Martin Mares [Mon, 27 Jan 2014 19:59:02 +0000 (20:59 +0100)]
Opt: OPT_HELP_OPTION does not need passing pointer to current definitions

I have introduced a new flag OPT_INTERNAL / OPT_HOOK_INTERNAL, which
can be used by internal handlers and hooks to get the pointer to the
current opt_context.

10 years agoLet <ucw/lib.h> include <stdbool.h> automatically
Martin Mares [Mon, 27 Jan 2014 19:45:28 +0000 (20:45 +0100)]
Let <ucw/lib.h> include <stdbool.h> automatically

10 years agoOpt: TODO cleared
Martin Mares [Mon, 27 Jan 2014 19:29:04 +0000 (20:29 +0100)]
Opt: TODO cleared

10 years agoOpt: opt_failure() is public, opt_usage() not so
Martin Mares [Mon, 27 Jan 2014 19:28:16 +0000 (20:28 +0100)]
Opt: opt_failure() is public, opt_usage() not so

10 years agoOpt: Generalization of hooks
Martin Mares [Mon, 27 Jan 2014 19:23:18 +0000 (20:23 +0100)]
Opt: Generalization of hooks

Hooks can specify a subset of events they wish to receive.
Helps to get rid of lots of special-casing.

In particular, the end of parsing is also an event, so that we
can load configuration if it has not been loaded yet. (This was
a bug in the original implementation, which never turned up,
because opt-test has mandatory arguments.)

10 years agoOpt: Cleaned up opt-conf
Martin Mares [Mon, 27 Jan 2014 19:05:15 +0000 (20:05 +0100)]
Opt: Cleaned up opt-conf

First of all, the names of configuration options are no longer
fixed. Each of these options has its own handler and as long as
OPT_CONF_HOOK is used, the caller is free to define configuration
options with the names and help texts of his choice.

The same applies to --help.

To achieve these goals, the OPT_BEFORE_CONFIG flag has been
introduced.

10 years agoOpt: Make OPT_LAST_ARG actually work and document interface of opt_parse()
Martin Mares [Mon, 27 Jan 2014 18:38:25 +0000 (19:38 +0100)]
Opt: Make OPT_LAST_ARG actually work and document interface of opt_parse()

10 years agoOpt: Split to three separate modules
Martin Mares [Mon, 27 Jan 2014 18:23:30 +0000 (19:23 +0100)]
Opt: Split to three separate modules

One handles parsing, one displaying of help, and one interfaces
with conf.

10 years agoOpt: Rewritten formatting of help
Martin Mares [Mon, 27 Jan 2014 17:42:01 +0000 (18:42 +0100)]
Opt: Rewritten formatting of help

Previous implementation of opt_help() had several drawbacks:
First, it formatted each section separately, so the columns
did not aligh. Second, it did produced incorrect output for
options which possess only the short form.

I hope that the new implementation is cleaner and easier to extend.

10 years agoOpt: exit() does not return, no need to call va_end() afterwards
Martin Mares [Mon, 27 Jan 2014 16:18:02 +0000 (17:18 +0100)]
Opt: exit() does not return, no need to call va_end() afterwards

10 years agoOpt: Simpified and corrected processing of OPT_SINGLE
Martin Mares [Mon, 27 Jan 2014 16:13:46 +0000 (17:13 +0100)]
Opt: Simpified and corrected processing of OPT_SINGLE

OPT_SINGLE is now checked in opt_parse_value(). Previously, short,
long, and positional options had their own checks.

OPT_CL_SWITCH did not allow changing the value of the switch once
it is set, although documentation in opt.h claimed quite the opposite.
Changes are currently allowed unless OPT_SINGLE is set.

Test cases have been updated accordingly.

10 years agoOpt: Fix bug introduced by my cleanups
Martin Mares [Mon, 27 Jan 2014 16:03:19 +0000 (17:03 +0100)]
Opt: Fix bug introduced by my cleanups

10 years agoOpt: Improved reporting of errors
Martin Mares [Mon, 27 Jan 2014 15:59:13 +0000 (16:59 +0100)]
Opt: Improved reporting of errors

Introduced opt_name() and THIS_OPT, which can be used in error
messages whenever you have a pointer to struct opt_precomputed ready.

10 years agoOpt: Streamlined opt_parse_value()
Martin Mares [Mon, 27 Jan 2014 15:43:52 +0000 (16:43 +0100)]
Opt: Streamlined opt_parse_value()

10 years agoOpt: Streamlined parsing of long options
Martin Mares [Mon, 27 Jan 2014 15:14:56 +0000 (16:14 +0100)]
Opt: Streamlined parsing of long options

Also, in error messages, we call them options, not arguments.

10 years agoOpt: Accept arguments for short options even in bundles
Martin Mares [Mon, 27 Jan 2014 14:57:32 +0000 (15:57 +0100)]
Opt: Accept arguments for short options even in bundles

Traditional getopt() seems to support this, so we should, too.

10 years agoOpt: Updated test case
Martin Mares [Mon, 27 Jan 2014 14:55:20 +0000 (15:55 +0100)]
Opt: Updated test case

Printing non-ASCII characters for positional arguments is a little
bit crazy, I will hopefully clean it up later.

10 years agoOpt: Streamlined opt_shortopt()
Martin Mares [Mon, 27 Jan 2014 14:51:47 +0000 (15:51 +0100)]
Opt: Streamlined opt_shortopt()

Also, we reject non-ASCII short options, which enabled us to lower
OPT_POSITIONAL_TAIL to 128 and thus save memory.

10 years agoOpt: Start of positional arguments is not hard-wired
Martin Mares [Mon, 27 Jan 2014 14:37:07 +0000 (15:37 +0100)]
Opt: Start of positional arguments is not hard-wired

10 years agoOpt: Checking of required arguments simplified
Martin Mares [Mon, 27 Jan 2014 14:31:03 +0000 (15:31 +0100)]
Opt: Checking of required arguments simplified

10 years agoOpt: Cosmetics
Martin Mares [Mon, 27 Jan 2014 14:23:01 +0000 (15:23 +0100)]
Opt: Cosmetics

10 years agoOpt: Streamlined setting of default options
Martin Mares [Mon, 27 Jan 2014 14:18:47 +0000 (15:18 +0100)]
Opt: Streamlined setting of default options

OPT_ADD_DEFAULT_FLAGS has been replaced by a function,
OPT_ITEM_FLAGS is gone.

10 years agoOpt: Updated symbol renames
Martin Mares [Mon, 27 Jan 2014 14:09:18 +0000 (15:09 +0100)]
Opt: Updated symbol renames

10 years agoOpt: Simplified preprocessing of options
Martin Mares [Mon, 27 Jan 2014 14:04:07 +0000 (15:04 +0100)]
Opt: Simplified preprocessing of options

Replaced OPT_TRAVERSE_SECTIONS by proper recursion.

oc->opts now contains struct opt_precomputed's directly instead
of pointers to them, so that we need not allocate each struct
separately (and leak memory).

Counting of each OPT_CL_BOOL option twice has been removed, I hope
it is not necessary any longer as the "no-" prefix does not need
its own entry.

10 years agoOpt: Fixed a test case
Martin Mares [Mon, 27 Jan 2014 13:42:58 +0000 (14:42 +0100)]
Opt: Fixed a test case

10 years agoBuild: Make sure that we link against the locally compiled dynamic libraries.
Pavel Charvat [Wed, 15 Jan 2014 16:08:12 +0000 (17:08 +0100)]
Build: Make sure that we link against the locally compiled dynamic libraries.

10 years agoMerge branch 'master' into dev-opt
Pavel Charvat [Wed, 15 Jan 2014 12:33:15 +0000 (13:33 +0100)]
Merge branch 'master' into dev-opt

10 years agoPackages: Install subset of UCW utilities to /usr/sbin instead of /usr/bin.
Pavel Charvat [Wed, 15 Jan 2014 12:32:05 +0000 (13:32 +0100)]
Packages: Install subset of UCW utilities to /usr/sbin instead of /usr/bin.

10 years agoTrie: Improved Tom's warning about hell
Martin Mares [Wed, 15 Jan 2014 11:49:26 +0000 (12:49 +0100)]
Trie: Improved Tom's warning about hell

10 years agoOpt: Merged fixes from Gigamail.
Pavel Charvat [Tue, 14 Jan 2014 21:15:21 +0000 (22:15 +0100)]
Opt: Merged fixes from Gigamail.

10 years agoMerge branch 'master' into dev-opt
Pavel Charvat [Tue, 14 Jan 2014 19:51:05 +0000 (20:51 +0100)]
Merge branch 'master' into dev-opt

Conflicts:
ucw/ff-varint.c
ucw/varint.c

10 years agoDocs: Checked for problems with common var-len-arrays and alloca() (written by Tom).
Pavel Charvat [Tue, 14 Jan 2014 19:48:31 +0000 (20:48 +0100)]
Docs: Checked for problems with common var-len-arrays and alloca() (written by Tom).

10 years agoLibUCW: Fixed a bug in fb-atomic.
Pavel Charvat [Tue, 14 Jan 2014 17:33:41 +0000 (18:33 +0100)]
LibUCW: Fixed a bug in fb-atomic.

10 years agoLibUCW: Added missing includes in <ucw/io.h>
Pavel Charvat [Tue, 14 Jan 2014 16:08:32 +0000 (17:08 +0100)]
LibUCW: Added missing includes in <ucw/io.h>

10 years agoPackages: Fixed installation of obsolete ucw-daemon-helper.
Pavel Charvat [Tue, 14 Jan 2014 16:06:42 +0000 (17:06 +0100)]
Packages: Fixed installation of obsolete ucw-daemon-helper.

10 years agoPCRE regex: Fixed a harmless compilation warning.
Pavel Charvat [Tue, 14 Jan 2014 12:19:58 +0000 (13:19 +0100)]
PCRE regex: Fixed a harmless compilation warning.

10 years agovarints: Fixed format strings.
Tomas Valla [Tue, 14 Jan 2014 11:33:05 +0000 (12:33 +0100)]
varints: Fixed format strings.

10 years agoOpt: ABI cleanup
Martin Mares [Tue, 14 Jan 2014 11:13:37 +0000 (12:13 +0100)]
Opt: ABI cleanup

10 years agoMerge branch 'master' into dev-opt
Martin Mares [Tue, 14 Jan 2014 11:11:58 +0000 (12:11 +0100)]
Merge branch 'master' into dev-opt

Conflicts:
ucw/Makefile

10 years agoLibUCW: Fixed a stupid typo in the UCW_DIE_BY_ABORT switch.
Pavel Charvat [Tue, 14 Jan 2014 08:00:05 +0000 (09:00 +0100)]
LibUCW: Fixed a stupid typo in the UCW_DIE_BY_ABORT switch.

10 years agoLibUCW: Implemented UCW_DIE_BY_ABORT environment switch.
Pavel Charvat [Tue, 14 Jan 2014 07:58:15 +0000 (08:58 +0100)]
LibUCW: Implemented UCW_DIE_BY_ABORT environment switch.

10 years agoPackages: install-ucw-sorter-api make target moved into install-libucw-api.
Pavel Charvat [Tue, 14 Jan 2014 07:48:14 +0000 (08:48 +0100)]
Packages: install-ucw-sorter-api make target moved into install-libucw-api.

10 years agoPackages: Do not forget to install sorter's API.
Pavel Charvat [Tue, 7 Jan 2014 15:47:06 +0000 (16:47 +0100)]
Packages: Do not forget to install sorter's API.

10 years agoPackages: Removed customization of SONAME_SUFFIX to simplify Makefiles.
Pavel Charvat [Tue, 7 Jan 2014 15:19:51 +0000 (16:19 +0100)]
Packages: Removed customization of SONAME_SUFFIX to simplify Makefiles.

10 years agoPackages: Fixes in custom versioning.
Pavel Charvat [Tue, 7 Jan 2014 15:14:01 +0000 (16:14 +0100)]
Packages: Fixes in custom versioning.

10 years agoPackages: Created debian/tag-release script to easily tag new versions.
Pavel Charvat [Tue, 7 Jan 2014 15:00:36 +0000 (16:00 +0100)]
Packages: Created debian/tag-release script to easily tag new versions.

10 years agoPackages: Unit tests must be run sequentially (make -j1 tests).
Pavel Charvat [Tue, 7 Jan 2014 14:52:15 +0000 (15:52 +0100)]
Packages: Unit tests must be run sequentially (make -j1 tests).

10 years agoPackages: Fixed a typo in Makefile causing unnecessary dependencies.
Pavel Charvat [Tue, 7 Jan 2014 13:46:08 +0000 (14:46 +0100)]
Packages: Fixed a typo in Makefile causing unnecessary dependencies.

10 years agoPackages: Added missing dependencies.
Pavel Charvat [Tue, 7 Jan 2014 13:41:09 +0000 (14:41 +0100)]
Packages: Added missing dependencies.

10 years agoPackages: Fixed static linking.
Pavel Charvat [Tue, 7 Jan 2014 13:35:04 +0000 (14:35 +0100)]
Packages: Fixed static linking.

10 years agoPackages: pkg-config dependencies moved to Requires.private.
Pavel Charvat [Tue, 7 Jan 2014 13:30:53 +0000 (14:30 +0100)]
Packages: pkg-config dependencies moved to Requires.private.

10 years agoPackages: Dependencies on external dynamic libraries are now in pkg-config's Libs...
Pavel Charvat [Tue, 7 Jan 2014 13:00:26 +0000 (14:00 +0100)]
Packages: Dependencies on external dynamic libraries are now in pkg-config's Libs.private.

10 years agoPackages: We need to include SONAME symbolic links to shared libraries in packages.
Pavel Charvat [Tue, 7 Jan 2014 12:02:26 +0000 (13:02 +0100)]
Packages: We need to include SONAME symbolic links to shared libraries in packages.

10 years agoPackages: Do not install picstatic version of libs.
Pavel Charvat [Tue, 7 Jan 2014 09:15:13 +0000 (10:15 +0100)]
Packages: Do not install picstatic version of libs.

But they are still not removed completely from Makefiles and pkgconfig.

10 years agoMerge branch 'dev-api' into dev-package
Pavel Charvat [Tue, 7 Jan 2014 09:11:17 +0000 (10:11 +0100)]
Merge branch 'dev-api' into dev-package

Conflicts:
default.cfg

10 years agoDebug: check-configs tries static linking, too
Martin Mares [Fri, 3 Jan 2014 15:53:01 +0000 (16:53 +0100)]
Debug: check-configs tries static linking, too

10 years agoABI: Fix string.h
Martin Mares [Fri, 3 Jan 2014 15:52:42 +0000 (16:52 +0100)]
ABI: Fix string.h

10 years agoABI: Symbol renames for libimages
Martin Mares [Fri, 3 Jan 2014 15:36:39 +0000 (16:36 +0100)]
ABI: Symbol renames for libimages

10 years agoImages: Added missing include
Martin Mares [Fri, 3 Jan 2014 15:36:30 +0000 (16:36 +0100)]
Images: Added missing include

10 years agoImages: Clean up old-style function declarations
Martin Mares [Fri, 3 Jan 2014 15:36:05 +0000 (16:36 +0100)]
Images: Clean up old-style function declarations

10 years agoTools: It's 2014 now :)
Martin Mares [Fri, 3 Jan 2014 15:08:21 +0000 (16:08 +0100)]
Tools: It's 2014 now :)

10 years agoABI: Manual tweaks for ff-binary.h
Martin Mares [Fri, 3 Jan 2014 15:05:58 +0000 (16:05 +0100)]
ABI: Manual tweaks for ff-binary.h

Function names are generated by macros, thus hidden to tools/map-symbols.

10 years agoABI: rename-symbols does not touch timestamps of unmodified files
Martin Mares [Fri, 3 Jan 2014 15:05:39 +0000 (16:05 +0100)]
ABI: rename-symbols does not touch timestamps of unmodified files

10 years agoABI: Tables used by ucw/chartype.h are prefixed
Martin Mares [Fri, 3 Jan 2014 14:59:07 +0000 (15:59 +0100)]
ABI: Tables used by ucw/chartype.h are prefixed

10 years agoPackages: Added a custom string to names of compiled libraries.
Pavel Charvat [Fri, 3 Jan 2014 13:47:30 +0000 (14:47 +0100)]
Packages: Added a custom string to names of compiled libraries.

10 years agoPackages: Split each UCW library to its own set of packages.
Pavel Charvat [Fri, 3 Jan 2014 13:05:12 +0000 (14:05 +0100)]
Packages: Split each UCW library to its own set of packages.

10 years agoABI: Manual tweaks for strtonum.h
Martin Mares [Fri, 3 Jan 2014 13:01:23 +0000 (14:01 +0100)]
ABI: Manual tweaks for strtonum.h

Function names are generated by macros, thus hidden to tools/map-symbols.

10 years agoABI: ucwlib_ prefix is also safe
Martin Mares [Fri, 3 Jan 2014 12:59:39 +0000 (13:59 +0100)]
ABI: ucwlib_ prefix is also safe

10 years agoABI: Rename internal tables of libcharset
Martin Mares [Fri, 3 Jan 2014 12:57:27 +0000 (13:57 +0100)]
ABI: Rename internal tables of libcharset

10 years agoABI: Avoid macro re-definition
Martin Mares [Fri, 3 Jan 2014 12:55:12 +0000 (13:55 +0100)]
ABI: Avoid macro re-definition

10 years agoABI: Symbol renames for libucw and libcharset
Martin Mares [Fri, 3 Jan 2014 12:54:31 +0000 (13:54 +0100)]
ABI: Symbol renames for libucw and libcharset

All of these have been generated by tools/rename-symbols. Some manual
tweaking will be needed.

10 years agoConfig: By default, debug configuration build shared libraries
Martin Mares [Fri, 3 Jan 2014 12:52:54 +0000 (13:52 +0100)]
Config: By default, debug configuration build shared libraries

10 years agoConfig: Added CONFIG_UCW_CLEAN_ABI
Martin Mares [Fri, 3 Jan 2014 12:52:29 +0000 (13:52 +0100)]
Config: Added CONFIG_UCW_CLEAN_ABI

10 years agoAdded a list of exported symbols, which are subject to renaming
Martin Mares [Fri, 3 Jan 2014 12:50:23 +0000 (13:50 +0100)]
Added a list of exported symbols, which are subject to renaming

10 years agoTools: Added tools for symbol renaming and checking
Martin Mares [Fri, 3 Jan 2014 12:49:49 +0000 (13:49 +0100)]
Tools: Added tools for symbol renaming and checking

10 years agoPackages: Install also obsolete ucw-daemon-helper for now.
Pavel Charvat [Fri, 3 Jan 2014 12:38:32 +0000 (13:38 +0100)]
Packages: Install also obsolete ucw-daemon-helper for now.

10 years agoClean up old-style function declarations split to multiple lines
Martin Mares [Fri, 3 Jan 2014 11:42:31 +0000 (12:42 +0100)]
Clean up old-style function declarations split to multiple lines

10 years agoLibUCW: Added fb-socket.h header to public API.
Pavel Charvat [Tue, 10 Dec 2013 13:20:56 +0000 (14:20 +0100)]
LibUCW: Added fb-socket.h header to public API.

10 years agoPackages: Simplified definition of install targets.
Pavel Charvat [Tue, 10 Dec 2013 12:40:10 +0000 (13:40 +0100)]
Packages: Simplified definition of install targets.

10 years agoPackages: Improved installation of example configs.
Pavel Charvat [Sat, 7 Dec 2013 11:22:14 +0000 (12:22 +0100)]
Packages: Improved installation of example configs.

10 years agoPackages: Added some docs/examples.
Pavel Charvat [Sat, 7 Dec 2013 11:13:23 +0000 (12:13 +0100)]
Packages: Added some docs/examples.

10 years agoPackages: Several fixes in debian packages and their versioning.
Pavel Charvat [Sat, 7 Dec 2013 10:06:12 +0000 (11:06 +0100)]
Packages: Several fixes in debian packages and their versioning.

10 years agoLibUCW: Added `ucw-' prefix to utils.
Pavel Charvat [Fri, 6 Dec 2013 22:32:14 +0000 (23:32 +0100)]
LibUCW: Added `ucw-' prefix to utils.

10 years agoLibucw-images: Added `ucw-' prefix to utils.
Pavel Charvat [Fri, 6 Dec 2013 22:11:57 +0000 (23:11 +0100)]
Libucw-images: Added `ucw-' prefix to utils.

10 years agoPackages: Several fixes in debian packages.
Pavel Charvat [Fri, 6 Dec 2013 21:47:22 +0000 (22:47 +0100)]
Packages: Several fixes in debian packages.

10 years agoPackages: First experiments with Debian packages.
Pavel Charvat [Fri, 6 Dec 2013 19:49:07 +0000 (20:49 +0100)]
Packages: First experiments with Debian packages.

10 years agoRenamed shxml/* to xml/*.
Pavel Charvat [Fri, 6 Dec 2013 14:34:22 +0000 (15:34 +0100)]
Renamed shxml/* to xml/*.

10 years agoSplit install-lib* rules to runtime and dev parts.
Pavel Charvat [Fri, 6 Dec 2013 14:26:52 +0000 (15:26 +0100)]
Split install-lib* rules to runtime and dev parts.

10 years agoAdded libucw-* prefix to some forgotten places.
Pavel Charvat [Fri, 6 Dec 2013 12:18:26 +0000 (13:18 +0100)]
Added libucw-* prefix to some forgotten places.

10 years agoAdded libucw-* prefix to all libraries (libcharset -> libucw-charset, etc.)
Pavel Charvat [Fri, 6 Dec 2013 12:02:07 +0000 (13:02 +0100)]
Added libucw-* prefix to all libraries (libcharset -> libucw-charset, etc.)

10 years agoLibUCW: xrealloc(ptr, 0) should return NULL and not die.
Pavel Charvat [Thu, 28 Nov 2013 12:09:47 +0000 (13:09 +0100)]
LibUCW: xrealloc(ptr, 0) should return NULL and not die.