]> mj.ucw.cz Git - libucw.git/log
libucw.git
18 years agocleanup of new configuration: operation :unset replaced by :remove
Robert Spalek [Sun, 7 May 2006 18:43:35 +0000 (20:43 +0200)]
cleanup of new configuration: operation :unset replaced by :remove

Why to create a new operations?  Also, cleaned up the procedures so that
have unified interface.

18 years agoconfiguration mechanism: added support for bitmaps
Robert Spalek [Fri, 5 May 2006 13:18:23 +0000 (15:18 +0200)]
configuration mechanism: added support for bitmaps

18 years agoCONST is not PURE. Thanks to Pavel for spotting that.
Martin Mares [Thu, 4 May 2006 20:58:57 +0000 (22:58 +0200)]
CONST is not PURE. Thanks to Pavel for spotting that.

18 years agoUse LIKE_MALLOC and SENTINEL_CHECK for mempool operations.
Martin Mares [Thu, 4 May 2006 20:55:57 +0000 (22:55 +0200)]
Use LIKE_MALLOC and SENTINEL_CHECK for mempool operations.

18 years agoCorrected definition of the PURE attribute.
Martin Mares [Thu, 4 May 2006 20:55:42 +0000 (22:55 +0200)]
Corrected definition of the PURE attribute.
Added LIKE_MALLOC and SENTINEL_CHECK attributes.
Polished a comment.

18 years agoconf: forgot to initialize a local variable
Robert Spalek [Wed, 3 May 2006 13:20:07 +0000 (15:20 +0200)]
conf: forgot to initialize a local variable

18 years agojust playing with multidimensional Hilbert curves
Pavel Charvat [Wed, 3 May 2006 12:18:37 +0000 (14:18 +0200)]
just playing with multidimensional Hilbert curves
(trying to optimize duplicates search)

18 years agoadded missing include
Pavel Charvat [Tue, 2 May 2006 07:15:47 +0000 (09:15 +0200)]
added missing include

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git
Pavel Charvat [Tue, 2 May 2006 07:05:41 +0000 (09:05 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git

18 years ago- parts of duplicates search, still very slow and full of insects
Pavel Charvat [Tue, 2 May 2006 06:56:56 +0000 (08:56 +0200)]
- parts of duplicates search, still very slow and full of insects
- signature vector converted from u16 to byte
- several improvements and fixes... and new bugs of course :-)

18 years agoremoved trailing spaces, fixed speed test, some moves
Pavel Charvat [Mon, 1 May 2006 10:25:41 +0000 (12:25 +0200)]
removed trailing spaces, fixed speed test, some moves

18 years agoFaster sRGB -> Luv colorspace conversion.
Pavel Charvat [Mon, 1 May 2006 08:56:40 +0000 (10:56 +0200)]
Faster sRGB -> Luv colorspace conversion.
I tried to implement two different algorithms. The first
one directly evaluates the conversion formula while the second
one is general interpolation of continous 3-dimensional function
f: [0,255]^3 -> [0,255]^3 given by a grid of sample values.

18 years agoconf: don't die in bgets() on too long lines
Robert Spalek [Sun, 30 Apr 2006 21:19:33 +0000 (23:19 +0200)]
conf: don't die in bgets() on too long lines

18 years agoWhen allocating dynamic arrays, respect alignment. I hope this is the
Martin Mares [Sun, 30 Apr 2006 17:47:37 +0000 (19:47 +0200)]
When allocating dynamic arrays, respect alignment. I hope this is the
final revision :-)

Also, restrictions on dary element size shouldn't be necessary any longer.

18 years agoconf: move the initialization of dynamic arrays from commit- to init-hook
Robert Spalek [Sun, 30 Apr 2006 16:58:20 +0000 (18:58 +0200)]
conf: move the initialization of dynamic arrays from commit- to init-hook

18 years agoconf: redesign dynamic arrays; things get cleaner and start to work now
Robert Spalek [Sun, 30 Apr 2006 16:53:19 +0000 (18:53 +0200)]
conf: redesign dynamic arrays; things get cleaner and start to work now

18 years agoconf: clearing a dynamic array allocates a zero-length array
Robert Spalek [Sun, 30 Apr 2006 11:30:48 +0000 (13:30 +0200)]
conf: clearing a dynamic array allocates a zero-length array

18 years agoconf: fix one journalling call
Robert Spalek [Sun, 30 Apr 2006 11:16:06 +0000 (13:16 +0200)]
conf: fix one journalling call

18 years agoconf: expand a macro call, because it's used only once
Robert Spalek [Sun, 30 Apr 2006 11:14:40 +0000 (13:14 +0200)]
conf: expand a macro call, because it's used only once

18 years agoRenamed conf-test.t to conf-test.cf, because .t usually denotes inputs
Martin Mares [Sun, 30 Apr 2006 10:02:55 +0000 (12:02 +0200)]
Renamed conf-test.t to conf-test.cf, because .t usually denotes inputs
for build/tester.

18 years agoWhen diffing for mail reports, detect renames and copies.
Martin Mares [Sun, 30 Apr 2006 10:00:10 +0000 (12:00 +0200)]
When diffing for mail reports, detect renames and copies.

18 years agoReplaced the DARY_ALLOC by a comment explaining when it doesn't work.
Martin Mares [Sun, 30 Apr 2006 09:47:05 +0000 (11:47 +0200)]
Replaced the DARY_ALLOC by a comment explaining when it doesn't work.

I think that we no longer need to worry about this macro, because the only
DARY initializations we needed so far were to an empty array and they are
done automatically now. When the need arises, we can add a simple function
for creating a DARY of a given length.

18 years agoconf: handle NULL dynamic arrays before calling commit-hooks
Robert Spalek [Sun, 30 Apr 2006 08:19:16 +0000 (10:19 +0200)]
conf: handle NULL dynamic arrays before calling commit-hooks

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config
Martin Mares [Sat, 29 Apr 2006 22:47:55 +0000 (00:47 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config

(Merged the dev-config branch with the mainline.)

18 years agoRemoved trailing whitespaces.
Martin Mares [Sat, 29 Apr 2006 22:16:00 +0000 (00:16 +0200)]
Removed trailing whitespaces.

Please fix your editors not to generate such things, especially when
auto-indenting.

18 years agoconf2: improved error messages (# of item in a list added)
Robert Spalek [Sat, 29 Apr 2006 12:07:33 +0000 (14:07 +0200)]
conf2: improved error messages (# of item in a list added)

18 years agoconf2: initialize dynamic arrays so that they are not NULL
Robert Spalek [Sat, 29 Apr 2006 11:24:30 +0000 (13:24 +0200)]
conf2: initialize dynamic arrays so that they are not NULL

18 years agoIntroduced a configuration post-processor sherlock/autoconf.cfg, which
Martin Mares [Fri, 28 Apr 2006 22:12:57 +0000 (00:12 +0200)]
Introduced a configuration post-processor sherlock/autoconf.cfg, which
works similarly to lib/autoconf.cfg, but generates settings specific
to Sherlock.

CONFIG_GATHERER and CONFIG_ANALYSER are now automatically decided upon,
but they still can be overridden manually or set by the custom config file.

18 years agoconf2: allow :clear on string attributes
Robert Spalek [Fri, 28 Apr 2006 16:51:22 +0000 (18:51 +0200)]
conf2: allow :clear on string attributes

18 years agoconf2 header: added (c) and #ifdef
Robert Spalek [Fri, 28 Apr 2006 14:47:12 +0000 (16:47 +0200)]
conf2 header: added (c) and #ifdef

18 years agoconf2: source files references in header files, and advanced journaling moved
Robert Spalek [Fri, 28 Apr 2006 14:44:13 +0000 (16:44 +0200)]
conf2: source files references in header files, and advanced journaling moved

18 years agoconf2.c split into 7 smaller modules conf-*.c with include conf-internal.h
Robert Spalek [Fri, 28 Apr 2006 14:31:02 +0000 (16:31 +0200)]
conf2.c split into 7 smaller modules conf-*.c with include conf-internal.h

18 years agotypo
Pavel Charvat [Fri, 28 Apr 2006 11:49:20 +0000 (13:49 +0200)]
typo

18 years agoThe --dumpconfig option stops the program after dumping.
Martin Mares [Fri, 28 Apr 2006 09:22:27 +0000 (11:22 +0200)]
The --dumpconfig option stops the program after dumping.

18 years agoImproved comments.
Martin Mares [Fri, 28 Apr 2006 09:20:15 +0000 (11:20 +0200)]
Improved comments.

18 years agoAdded stk_strjoin() as well.
Martin Mares [Fri, 28 Apr 2006 08:56:36 +0000 (10:56 +0200)]
Added stk_strjoin() as well.

18 years agoAdded a function for joining an array of strings, using an optional
Martin Mares [Fri, 28 Apr 2006 08:35:38 +0000 (10:35 +0200)]
Added a function for joining an array of strings, using an optional
separator.

18 years agoconf2: fixed 2 bugs in parsing nested configuration files
Robert Spalek [Fri, 28 Apr 2006 07:16:34 +0000 (09:16 +0200)]
conf2: fixed 2 bugs in parsing nested configuration files

18 years agosplit conf2.h into conf.h and getopt.h
Robert Spalek [Thu, 27 Apr 2006 23:31:57 +0000 (01:31 +0200)]
split conf2.h into conf.h and getopt.h

18 years agoconf: remove the old configuration mechanism whatsoever
Robert Spalek [Thu, 27 Apr 2006 22:41:36 +0000 (00:41 +0200)]
conf: remove the old configuration mechanism whatsoever

18 years agoRemoved the cf/sherlock2 hack (will move the config files in a minute).
Martin Mares [Thu, 27 Apr 2006 20:16:46 +0000 (22:16 +0200)]
Removed the cf/sherlock2 hack (will move the config files in a minute).

Also fixed a bug in parsing Includes. Robert, please verify the fix,
I am not sure I've done the right thing.

18 years agoconf2: postponing of commits fixed
Robert Spalek [Thu, 27 Apr 2006 16:33:09 +0000 (18:33 +0200)]
conf2: postponing of commits fixed

18 years agoconf2: fix appending to a dynamic array set to NULL
Robert Spalek [Thu, 27 Apr 2006 16:28:12 +0000 (18:28 +0200)]
conf2: fix appending to a dynamic array set to NULL

18 years agoconf2: when loading the initial configuration, commit only once at the end
Robert Spalek [Thu, 27 Apr 2006 16:26:15 +0000 (18:26 +0200)]
conf2: when loading the initial configuration, commit only once at the end

18 years agoconf2: polished error messages of commit-hooks
Robert Spalek [Thu, 27 Apr 2006 16:14:30 +0000 (18:14 +0200)]
conf2: polished error messages of commit-hooks

18 years agoshell/config: check the default value from the command-line
Robert Spalek [Thu, 27 Apr 2006 13:47:56 +0000 (15:47 +0200)]
shell/config: check the default value from the command-line

18 years agoshell/config: upgraded to use conf2 instead of conf
Robert Spalek [Thu, 27 Apr 2006 13:44:56 +0000 (15:44 +0200)]
shell/config: upgraded to use conf2 instead of conf

18 years agoCleaned up access-lists.
Martin Mares [Thu, 27 Apr 2006 12:23:58 +0000 (14:23 +0200)]
Cleaned up access-lists.

18 years agoconf2: unified clist operations with the rest of Sherlock
Robert Spalek [Thu, 27 Apr 2006 12:22:12 +0000 (14:22 +0200)]
conf2: unified clist operations with the rest of Sherlock

18 years agoconf2: list operation duplicate -> copy, and support for copying all nodes
Robert Spalek [Thu, 27 Apr 2006 10:48:55 +0000 (12:48 +0200)]
conf2: list operation duplicate -> copy, and support for copying all nodes

18 years agoconf2: implemented list operation duplicate
Robert Spalek [Thu, 27 Apr 2006 10:32:37 +0000 (12:32 +0200)]
conf2: implemented list operation duplicate

18 years agoadd a name of the user-defined type
Robert Spalek [Thu, 27 Apr 2006 08:39:57 +0000 (10:39 +0200)]
add a name of the user-defined type

18 years agoconf2: dumper of the configuration polished; support printing names of user types
Robert Spalek [Thu, 27 Apr 2006 08:39:27 +0000 (10:39 +0200)]
conf2: dumper of the configuration polished; support printing names of user types

18 years agoconf2: dumping of NULL strings polished
Robert Spalek [Thu, 27 Apr 2006 08:07:07 +0000 (10:07 +0200)]
conf2: dumping of NULL strings polished

18 years agoconf2: export low-level journalling functions for the filters
Robert Spalek [Wed, 26 Apr 2006 15:41:33 +0000 (17:41 +0200)]
conf2: export low-level journalling functions for the filters

18 years agoThe addrmask type has its own dumper now.
Martin Mares [Wed, 26 Apr 2006 09:48:47 +0000 (11:48 +0200)]
The addrmask type has its own dumper now.

18 years agoLookup lists are no longer char**, but byte**.
Martin Mares [Wed, 26 Apr 2006 09:48:14 +0000 (11:48 +0200)]
Lookup lists are no longer char**, but byte**.

18 years agoDumpers don't return anything, especially not a void pointer :-)
Martin Mares [Wed, 26 Apr 2006 09:47:44 +0000 (11:47 +0200)]
Dumpers don't return anything, especially not a void pointer :-)

18 years agoIf CONFIG_DEBUG is enabled, all programs support a --dumpconfig switch,
Martin Mares [Wed, 26 Apr 2006 09:38:39 +0000 (11:38 +0200)]
If CONFIG_DEBUG is enabled, all programs support a --dumpconfig switch,
which dumps the current configuration.

18 years agoconf2: lookup tables are byte** instead of char**
Robert Spalek [Wed, 26 Apr 2006 09:09:17 +0000 (11:09 +0200)]
conf2: lookup tables are byte** instead of char**

18 years agoconf2: include <getopt.h> again, it's tedious to write it everywhere
Robert Spalek [Tue, 25 Apr 2006 22:23:49 +0000 (00:23 +0200)]
conf2: include <getopt.h> again, it's tedious to write it everywhere

Polish a comment too.

18 years agoCF_LOOKUP lists must end with NULL.
Martin Mares [Tue, 25 Apr 2006 22:06:50 +0000 (00:06 +0200)]
CF_LOOKUP lists must end with NULL.

18 years agoipaccess filters now use CF_USER for (addr,mask) pairs, operations
Martin Mares [Tue, 25 Apr 2006 22:03:13 +0000 (00:03 +0200)]
ipaccess filters now use CF_USER for (addr,mask) pairs, operations
on lists now work fine.

18 years agoUse CF_LOOKUP.
Martin Mares [Tue, 25 Apr 2006 21:53:15 +0000 (23:53 +0200)]
Use CF_LOOKUP.

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config
Martin Mares [Tue, 25 Apr 2006 21:47:15 +0000 (23:47 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config

18 years agoDon't end error messages with a comma.
Martin Mares [Tue, 25 Apr 2006 21:46:56 +0000 (23:46 +0200)]
Don't end error messages with a comma.

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config
Robert Spalek [Tue, 25 Apr 2006 21:40:13 +0000 (23:40 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config
Martin Mares [Tue, 25 Apr 2006 21:39:48 +0000 (23:39 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config

18 years agoconf2: dynamic arrays allow negative maximal length
Robert Spalek [Tue, 25 Apr 2006 21:39:03 +0000 (23:39 +0200)]
conf2: dynamic arrays allow negative maximal length

18 years agoMore ipaccess work-arounds (will be gone soon).
Martin Mares [Tue, 25 Apr 2006 21:37:28 +0000 (23:37 +0200)]
More ipaccess work-arounds (will be gone soon).

18 years agoconf: parsing IP address fixed
Robert Spalek [Tue, 25 Apr 2006 21:31:46 +0000 (23:31 +0200)]
conf: parsing IP address fixed

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config
Robert Spalek [Tue, 25 Apr 2006 21:29:35 +0000 (23:29 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-config

18 years agoconf2: add 2 ASSERT's on checking the user-defined type size
Robert Spalek [Tue, 25 Apr 2006 21:28:04 +0000 (23:28 +0200)]
conf2: add 2 ASSERT's on checking the user-defined type size

18 years agoconf2: added support for user-defined types (tested on u16)
Robert Spalek [Tue, 25 Apr 2006 21:25:11 +0000 (23:25 +0200)]
conf2: added support for user-defined types (tested on u16)

18 years agoFixed operator priorities in cf_parse_ip().
Martin Mares [Tue, 25 Apr 2006 21:21:48 +0000 (23:21 +0200)]
Fixed operator priorities in cf_parse_ip().

18 years agoconf2: add basic type CT_LOOKUP that maps strings to integers
Robert Spalek [Tue, 25 Apr 2006 20:25:27 +0000 (22:25 +0200)]
conf2: add basic type CT_LOOKUP that maps strings to integers

Since I need to store both type==CT_LOOKUP and a pointer to the lookup
table, I moved the type out the union.  However, I have not blown up the
size of struct cf_item, because I have compressed class and type to 16
bits.

18 years agoA preliminary version of the new ipaccess module.
Martin Mares [Tue, 25 Apr 2006 12:08:34 +0000 (14:08 +0200)]
A preliminary version of the new ipaccess module.

18 years agoAdded CF_ARY_NUM and CF_JOURNAL_VAR.
Martin Mares [Tue, 25 Apr 2006 10:53:35 +0000 (12:53 +0200)]
Added CF_ARY_NUM and CF_JOURNAL_VAR.

18 years ago- fixed accepted double 0x prefix ("0x0x12345678") and
Pavel Charvat [Tue, 25 Apr 2006 07:54:00 +0000 (09:54 +0200)]
- fixed accepted double 0x prefix ("0x0x12345678") and
  negative numbers ("-0.-0.-0.-0") in IP parser

18 years agoThe "don't cf_load on error exit" optimization was wrong.
Martin Mares [Mon, 24 Apr 2006 21:53:48 +0000 (23:53 +0200)]
The "don't cf_load on error exit" optimization was wrong.

18 years agobopen_safe() in conf2 was leaking file descriptors. I've replaced it
Martin Mares [Mon, 24 Apr 2006 21:49:55 +0000 (23:49 +0200)]
bopen_safe() in conf2 was leaking file descriptors. I've replaced it
by a new bopen_try() in the fastbuf library and also cleaned up error
messages on unsuccessful file opens.

18 years agoStarted moving configuration sections to cf/sherlock2.
Martin Mares [Mon, 24 Apr 2006 21:38:47 +0000 (23:38 +0200)]
Started moving configuration sections to cf/sherlock2.

18 years agoDon't load the default config file when an invalid option error is going
Martin Mares [Mon, 24 Apr 2006 21:32:06 +0000 (23:32 +0200)]
Don't load the default config file when an invalid option error is going
to be reported.

18 years agoconf2: damn, I of course forgot to get rid of a debug message
Robert Spalek [Mon, 24 Apr 2006 18:02:34 +0000 (20:02 +0200)]
conf2: damn, I of course forgot to get rid of a debug message

18 years agoconf2: implemented committing only dirty sections
Robert Spalek [Mon, 24 Apr 2006 17:59:47 +0000 (19:59 +0200)]
conf2: implemented committing only dirty sections

This is now needed very much, because several commit-hooks allocate tens
of kilobytes of memory in the journal at each commit (e.g. alphabet.c)

18 years agoconf2: correct unescaping of C-strings
Robert Spalek [Mon, 24 Apr 2006 13:58:28 +0000 (15:58 +0200)]
conf2: correct unescaping of C-strings

18 years agofixed escape sequences parser
Pavel Charvat [Mon, 24 Apr 2006 13:02:54 +0000 (15:02 +0200)]
fixed escape sequences parser

18 years agoSimple parser for escape sequences.
Pavel Charvat [Mon, 24 Apr 2006 11:56:13 +0000 (13:56 +0200)]
Simple parser for escape sequences.

18 years agoconf2: report a bug when mixing line- and block- syntax improperly
Robert Spalek [Mon, 24 Apr 2006 09:12:44 +0000 (11:12 +0200)]
conf2: report a bug when mixing line- and block- syntax improperly

18 years agoconf2: insert a node into a list as soon as possible instead of at the end
Robert Spalek [Mon, 24 Apr 2006 08:54:15 +0000 (10:54 +0200)]
conf2: insert a node into a list as soon as possible instead of at the end

This allows user-defined parsers to see nodes during processing and they
can easier check for duplicates (see lang/lang.c).

18 years agoPointers to lists should be relative to current section, too.
Martin Mares [Sun, 23 Apr 2006 22:09:25 +0000 (00:09 +0200)]
Pointers to lists should be relative to current section, too.

18 years agoMerge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git
Robert Spalek [Sun, 23 Apr 2006 20:33:45 +0000 (22:33 +0200)]
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git

18 years agolib: revert unwanted commit
Robert Spalek [Sun, 23 Apr 2006 19:41:18 +0000 (21:41 +0200)]
lib: revert unwanted commit

damn, I tried to just delete one unwanted file from the list when
editing the commit-log, but cogito ignored the deletion and committed the
file anyway.  rollback then.

18 years agolib: converted to use conf2.c instead of conf.c
Robert Spalek [Sun, 23 Apr 2006 19:33:56 +0000 (21:33 +0200)]
lib: converted to use conf2.c instead of conf.c

18 years agoconf2: tested a few more test-cases and fixed/polished the code
Robert Spalek [Sun, 23 Apr 2006 19:13:08 +0000 (21:13 +0200)]
conf2: tested a few more test-cases and fixed/polished the code

- journal blocks are "transactions", don't overload the word "sections" too much
- added 2 long-term TODO's and 1 short-term FIXME
- the include command must be the last one on a line

18 years ago- removed alpha channel
Pavel Charvat [Sun, 23 Apr 2006 14:17:12 +0000 (16:17 +0200)]
- removed alpha channel
- added a simple algorithm for fast repeated image comparisions (will be
  used in duplicates finder)
- some small fixes

18 years agoconf2: sorry, fix the commit-hook messages
Robert Spalek [Sun, 23 Apr 2006 13:04:20 +0000 (15:04 +0200)]
conf2: sorry, fix the commit-hook messages

18 years agoconf2: fix commit hooks
Robert Spalek [Sun, 23 Apr 2006 13:00:22 +0000 (15:00 +0200)]
conf2: fix commit hooks

18 years agoconf2: MJ's objections taken care of
Robert Spalek [Sun, 23 Apr 2006 12:44:40 +0000 (14:44 +0200)]
conf2: MJ's objections taken care of

18 years agoconf2: bugfixes in journaling
Robert Spalek [Sun, 23 Apr 2006 12:14:21 +0000 (14:14 +0200)]
conf2: bugfixes in journaling

- commented usage of cf_malloc() vs. xmalloc() in init-hooks
- commented buggy DYN_ALLOC(double) macro
- don't bzero() static sections
- use bopen_safe()