From 031256ad2e123eec58521f8e3eb9496c197641d2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 14 Jul 2008 22:19:38 +0200 Subject: [PATCH] The big move. Step #1: Move whole lib/ to ucw/. All references within the libucw itself have been updated. --- lib/Makefile | 147 ------------------------- lib/hash-test.t | 13 --- lib/perl/Makefile | 10 -- lib/shell/Makefile | 12 -- lib/string.t | 15 --- lib/trie-test.t | 7 -- ucw/Makefile | 147 +++++++++++++++++++++++++ {lib => ucw}/THREADS | 0 {lib => ucw}/adler32.c | 4 +- {lib => ucw}/alloc.c | 2 +- {lib => ucw}/alloc_str.c | 2 +- {lib => ucw}/arraysort.h | 0 {lib => ucw}/asio.c | 6 +- {lib => ucw}/asio.h | 4 +- {lib => ucw}/asio.t | 2 +- {lib => ucw}/asort-test.c | 4 +- {lib => ucw}/asort-test.t | 2 +- {lib => ucw}/autoconf.cfg | 4 +- {lib => ucw}/base224.c | 4 +- {lib => ucw}/base224.h | 0 {lib => ucw}/base64.c | 4 +- {lib => ucw}/base64.h | 0 {lib => ucw}/basecode.c | 10 +- {lib => ucw}/basecode.t | 6 +- {lib => ucw}/bbuf.c | 4 +- {lib => ucw}/bbuf.h | 2 +- {lib => ucw}/bbuf.t | 2 +- {lib => ucw}/bigalloc.c | 2 +- {lib => ucw}/binheap-node.h | 0 {lib => ucw}/binheap-test.c | 6 +- {lib => ucw}/binheap-test.t | 2 +- {lib => ucw}/binheap.h | 4 +- {lib => ucw}/binsearch.h | 0 {lib => ucw}/bit-ffs.c | 4 +- {lib => ucw}/bit-fls.c | 4 +- {lib => ucw}/bitarray.h | 0 {lib => ucw}/bitops.h | 0 {lib => ucw}/bitops.t | 4 +- {lib => ucw}/bitsig.c | 6 +- {lib => ucw}/bitsig.h | 0 {lib => ucw}/carefulio.c | 2 +- {lib => ucw}/char-cat.c | 4 +- {lib => ucw}/char-lower.c | 4 +- {lib => ucw}/char-map.h | 0 {lib => ucw}/char-upper.c | 4 +- {lib => ucw}/chartype.h | 0 {lib => ucw}/clists.h | 0 {lib => ucw}/conf-alloc.c | 6 +- {lib => ucw}/conf-dump.c | 12 +- {lib => ucw}/conf-input.c | 22 ++-- {lib => ucw}/conf-internal.h | 0 {lib => ucw}/conf-intr.c | 10 +- {lib => ucw}/conf-journal.c | 10 +- {lib => ucw}/conf-parse.c | 6 +- {lib => ucw}/conf-section.c | 14 +-- {lib => ucw}/conf-test.c | 12 +- {lib => ucw}/conf-test.cf | 2 +- {lib => ucw}/conf.h | 0 {lib => ucw}/config.h | 0 {lib => ucw}/ctmatch.c | 4 +- {lib => ucw}/db-emul.c | 4 +- {lib => ucw}/db-test.c | 4 +- {lib => ucw}/db-tool.c | 10 +- {lib => ucw}/db.c | 10 +- {lib => ucw}/db.h | 0 {lib => ucw}/db_internal.h | 0 {lib => ucw}/default.cfg | 0 {lib => ucw}/eltpool.c | 6 +- {lib => ucw}/eltpool.h | 0 {lib => ucw}/eltpool.test | 2 +- {lib => ucw}/exitstatus.c | 2 +- {lib => ucw}/fastbuf.c | 4 +- {lib => ucw}/fastbuf.h | 0 {lib => ucw}/fastbuf.t | 6 +- {lib => ucw}/fb-atomic.c | 6 +- {lib => ucw}/fb-buffer.c | 4 +- {lib => ucw}/fb-direct.c | 14 +-- {lib => ucw}/fb-file.c | 6 +- {lib => ucw}/fb-grow.c | 4 +- {lib => ucw}/fb-limfd.c | 4 +- {lib => ucw}/fb-mem.c | 4 +- {lib => ucw}/fb-mmap.c | 8 +- {lib => ucw}/fb-param.c | 8 +- {lib => ucw}/fb-pool.c | 6 +- {lib => ucw}/fb-socket.c | 6 +- {lib => ucw}/fb-socket.h | 2 +- {lib => ucw}/fb-socket.t | 2 +- {lib => ucw}/fb-temp.c | 10 +- {lib => ucw}/ff-binary.c | 6 +- {lib => ucw}/ff-binary.h | 4 +- {lib => ucw}/ff-printf.c | 4 +- {lib => ucw}/ff-string.c | 8 +- {lib => ucw}/ff-unicode.c | 10 +- {lib => ucw}/ff-unicode.h | 4 +- {lib => ucw}/ff-unicode.t | 16 +-- {lib => ucw}/gbuf.h | 0 {lib => ucw}/getopt.c | 4 +- {lib => ucw}/getopt.h | 2 +- {lib => ucw}/getopt.t | 4 +- {lib => ucw}/getopt/Makefile | 2 +- {lib => ucw}/getopt/README | 0 {lib => ucw}/getopt/getopt-sh.c | 0 {lib => ucw}/getopt/getopt-sh.h | 2 +- {lib => ucw}/getopt/getopt.c | 0 {lib => ucw}/getopt/getopt.h | 0 {lib => ucw}/getopt/getopt1.c | 0 {lib => ucw}/getopt/getopt_init.c | 0 {lib => ucw}/getopt/getopt_int.h | 0 {lib => ucw}/hash-test.c | 16 +-- ucw/hash-test.t | 13 +++ {lib => ucw}/hashfunc-test.c | 2 +- {lib => ucw}/hashfunc.c | 6 +- {lib => ucw}/hashfunc.h | 2 +- {lib => ucw}/hashtable.h | 8 +- {lib => ucw}/heap.h | 0 {lib => ucw}/ipaccess.c | 12 +- {lib => ucw}/ipaccess.h | 2 +- {lib => ucw}/kmp-search.h | 6 +- {lib => ucw}/kmp-test.c | 16 +-- {lib => ucw}/kmp-test.t | 2 +- {lib => ucw}/kmp.h | 18 +-- {lib => ucw}/lfs-test.c | 4 +- {lib => ucw}/lfs.h | 0 {lib => ucw}/lib.h | 2 +- {lib => ucw}/libucw.pc | 0 {lib => ucw}/lists.c | 4 +- {lib => ucw}/lists.h | 2 +- {lib => ucw}/lizard-safe.c | 6 +- {lib => ucw}/lizard-test.c | 10 +- {lib => ucw}/lizard.c | 4 +- {lib => ucw}/lizard.h | 0 {lib => ucw}/log-file.c | 6 +- {lib => ucw}/log.c | 2 +- {lib => ucw}/mainloop.c | 4 +- {lib => ucw}/mainloop.h | 2 +- {lib => ucw}/md5.c | 4 +- {lib => ucw}/md5.h | 2 +- {lib => ucw}/mempool-fmt.c | 4 +- {lib => ucw}/mempool-str.c | 4 +- {lib => ucw}/mempool.c | 6 +- {lib => ucw}/mempool.h | 0 {lib => ucw}/mempool.t | 6 +- {lib => ucw}/mmap.c | 2 +- {lib => ucw}/pagecache.c | 6 +- {lib => ucw}/pagecache.h | 2 +- {lib => ucw}/partmap.c | 6 +- {lib => ucw}/partmap.h | 0 {lib => ucw}/perl/CGI.pm | 0 {lib => ucw}/perl/Config.pm | 0 {lib => ucw}/perl/Configure.pm | 2 +- {lib => ucw}/perl/Filelock/Filelock.pm | 0 {lib => ucw}/perl/Filelock/Filelock.xs | 0 {lib => ucw}/perl/Filelock/MANIFEST | 0 {lib => ucw}/perl/Filelock/Makefile | 10 +- {lib => ucw}/perl/Filelock/Makefile.PL | 0 {lib => ucw}/perl/Log.pm | 0 ucw/perl/Makefile | 10 ++ {lib => ucw}/perl/Ulimit/MANIFEST | 0 {lib => ucw}/perl/Ulimit/Makefile | 10 +- {lib => ucw}/perl/Ulimit/Makefile.PL | 0 {lib => ucw}/perl/Ulimit/Ulimit.pm | 0 {lib => ucw}/perl/Ulimit/Ulimit.xs | 0 {lib => ucw}/prefetch.h | 2 +- {lib => ucw}/prime.c | 2 +- {lib => ucw}/primetable.c | 4 +- {lib => ucw}/proctitle.c | 2 +- {lib => ucw}/profile.c | 4 +- {lib => ucw}/profile.h | 2 +- {lib => ucw}/qache.c | 10 +- {lib => ucw}/qache.h | 0 {lib => ucw}/random.c | 2 +- {lib => ucw}/randomkey.c | 2 +- {lib => ucw}/realloc.c | 2 +- {lib => ucw}/redblack-test.c | 6 +- {lib => ucw}/redblack-test.t | 2 +- {lib => ucw}/redblack.h | 2 +- {lib => ucw}/regex.c | 10 +- {lib => ucw}/regex.h | 0 {lib => ucw}/regex.t | 16 +-- {lib => ucw}/runcmd.c | 2 +- {lib => ucw}/semaphore.h | 0 {lib => ucw}/sha1-hmac.c | 6 +- {lib => ucw}/sha1.c | 8 +- {lib => ucw}/sha1.h | 0 {lib => ucw}/sha1.t | 22 ++-- ucw/shell/Makefile | 12 ++ {lib => ucw}/shell/config.c | 18 +-- {lib => ucw}/shell/config.t | 10 +- {lib => ucw}/shell/libucw.sh | 0 {lib => ucw}/shell/logger.c | 2 +- {lib => ucw}/sighandler.c | 4 +- {lib => ucw}/simple-lists.c | 8 +- {lib => ucw}/simple-lists.h | 2 +- {lib => ucw}/slists.c | 4 +- {lib => ucw}/slists.h | 0 {lib => ucw}/slists.t | 2 +- {lib => ucw}/sorter/Makefile | 6 +- {lib => ucw}/sorter/TODO | 2 +- {lib => ucw}/sorter/array.c | 10 +- {lib => ucw}/sorter/array.h | 4 +- {lib => ucw}/sorter/common.h | 2 +- {lib => ucw}/sorter/config.c | 8 +- {lib => ucw}/sorter/govern.c | 10 +- {lib => ucw}/sorter/s-fixint.h | 4 +- {lib => ucw}/sorter/s-internal.h | 4 +- {lib => ucw}/sorter/s-multiway.h | 0 {lib => ucw}/sorter/s-radix.h | 0 {lib => ucw}/sorter/s-twoway.h | 0 {lib => ucw}/sorter/sbuck.c | 10 +- {lib => ucw}/sorter/sort-test.c | 36 +++--- {lib => ucw}/sorter/sorter.h | 14 +-- {lib => ucw}/stkstring.c | 6 +- {lib => ucw}/stkstring.h | 0 {lib => ucw}/stkstring.t | 2 +- {lib => ucw}/str-esc.c | 6 +- {lib => ucw}/str-hex.c | 6 +- {lib => ucw}/str-imatch.c | 6 +- {lib => ucw}/str-match.c | 4 +- {lib => ucw}/str-match.h | 2 +- {lib => ucw}/str-split.c | 6 +- {lib => ucw}/string.c | 4 +- {lib => ucw}/string.h | 0 ucw/string.t | 15 +++ {lib => ucw}/sync.c | 2 +- {lib => ucw}/threads-conf.c | 6 +- {lib => ucw}/threads.c | 4 +- {lib => ucw}/threads.h | 0 {lib => ucw}/timer.c | 2 +- {lib => ucw}/trie-test.c | 10 +- ucw/trie-test.t | 7 ++ {lib => ucw}/trie.h | 4 +- {lib => ucw}/unaligned.h | 0 {lib => ucw}/unicode.c | 4 +- {lib => ucw}/unicode.h | 2 +- {lib => ucw}/unicode.t | 28 ++--- {lib => ucw}/url.c | 8 +- {lib => ucw}/url.h | 0 {lib => ucw}/wildmatch.c | 6 +- {lib => ucw}/wildmatch.h | 0 {lib => ucw}/workqueue.c | 8 +- {lib => ucw}/workqueue.h | 4 +- 241 files changed, 704 insertions(+), 704 deletions(-) delete mode 100644 lib/Makefile delete mode 100644 lib/hash-test.t delete mode 100644 lib/perl/Makefile delete mode 100644 lib/shell/Makefile delete mode 100644 lib/string.t delete mode 100644 lib/trie-test.t create mode 100644 ucw/Makefile rename {lib => ucw}/THREADS (100%) rename {lib => ucw}/adler32.c (96%) rename {lib => ucw}/alloc.c (97%) rename {lib => ucw}/alloc_str.c (93%) rename {lib => ucw}/arraysort.h (100%) rename {lib => ucw}/asio.c (98%) rename {lib => ucw}/asio.h (98%) rename {lib => ucw}/asio.t (58%) rename {lib => ucw}/asort-test.c (96%) rename {lib => ucw}/asort-test.t (55%) rename {lib => ucw}/autoconf.cfg (99%) rename {lib => ucw}/base224.c (98%) rename {lib => ucw}/base224.h (100%) rename {lib => ucw}/base64.c (98%) rename {lib => ucw}/base64.h (100%) rename {lib => ucw}/basecode.c (95%) rename {lib => ucw}/basecode.t (75%) rename {lib => ucw}/bbuf.c (97%) rename {lib => ucw}/bbuf.h (96%) rename {lib => ucw}/bbuf.t (82%) rename {lib => ucw}/bigalloc.c (99%) rename {lib => ucw}/binheap-node.h (100%) rename {lib => ucw}/binheap-test.c (95%) rename {lib => ucw}/binheap-test.t (65%) rename {lib => ucw}/binheap.h (97%) rename {lib => ucw}/binsearch.h (100%) rename {lib => ucw}/bit-ffs.c (96%) rename {lib => ucw}/bit-fls.c (93%) rename {lib => ucw}/bitarray.h (100%) rename {lib => ucw}/bitops.h (100%) rename {lib => ucw}/bitops.t (84%) rename {lib => ucw}/bitsig.c (98%) rename {lib => ucw}/bitsig.h (100%) rename {lib => ucw}/carefulio.c (97%) rename {lib => ucw}/char-cat.c (85%) rename {lib => ucw}/char-lower.c (85%) rename {lib => ucw}/char-map.h (100%) rename {lib => ucw}/char-upper.c (85%) rename {lib => ucw}/chartype.h (100%) rename {lib => ucw}/clists.h (100%) rename {lib => ucw}/conf-alloc.c (91%) rename {lib => ucw}/conf-dump.c (95%) rename {lib => ucw}/conf-input.c (97%) rename {lib => ucw}/conf-internal.h (100%) rename {lib => ucw}/conf-intr.c (99%) rename {lib => ucw}/conf-journal.c (94%) rename {lib => ucw}/conf-parse.c (97%) rename {lib => ucw}/conf-section.c (96%) rename {lib => ucw}/conf-test.c (96%) rename {lib => ucw}/conf-test.cf (96%) rename {lib => ucw}/conf.h (100%) rename {lib => ucw}/config.h (100%) rename {lib => ucw}/ctmatch.c (94%) rename {lib => ucw}/db-emul.c (98%) rename {lib => ucw}/db-test.c (99%) rename {lib => ucw}/db-tool.c (97%) rename {lib => ucw}/db.c (99%) rename {lib => ucw}/db.h (100%) rename {lib => ucw}/db_internal.h (100%) rename {lib => ucw}/default.cfg (100%) rename {lib => ucw}/eltpool.c (97%) rename {lib => ucw}/eltpool.h (100%) rename {lib => ucw}/eltpool.test (53%) rename {lib => ucw}/exitstatus.c (97%) rename {lib => ucw}/fastbuf.c (98%) rename {lib => ucw}/fastbuf.h (100%) rename {lib => ucw}/fastbuf.t (81%) rename {lib => ucw}/fb-atomic.c (98%) rename {lib => ucw}/fb-buffer.c (96%) rename {lib => ucw}/fb-direct.c (97%) rename {lib => ucw}/fb-file.c (98%) rename {lib => ucw}/fb-grow.c (98%) rename {lib => ucw}/fb-limfd.c (97%) rename {lib => ucw}/fb-mem.c (98%) rename {lib => ucw}/fb-mmap.c (98%) rename {lib => ucw}/fb-param.c (98%) rename {lib => ucw}/fb-pool.c (95%) rename {lib => ucw}/fb-socket.c (97%) rename {lib => ucw}/fb-socket.h (96%) rename {lib => ucw}/fb-socket.t (71%) rename {lib => ucw}/fb-temp.c (93%) rename {lib => ucw}/ff-binary.c (92%) rename {lib => ucw}/ff-binary.h (97%) rename {lib => ucw}/ff-printf.c (96%) rename {lib => ucw}/ff-string.c (98%) rename {lib => ucw}/ff-unicode.c (98%) rename {lib => ucw}/ff-unicode.h (98%) rename {lib => ucw}/ff-unicode.t (71%) rename {lib => ucw}/gbuf.h (100%) rename {lib => ucw}/getopt.c (95%) rename {lib => ucw}/getopt.h (98%) rename {lib => ucw}/getopt.t (76%) rename {lib => ucw}/getopt/Makefile (86%) rename {lib => ucw}/getopt/README (100%) rename {lib => ucw}/getopt/getopt-sh.c (100%) rename {lib => ucw}/getopt/getopt-sh.h (89%) rename {lib => ucw}/getopt/getopt.c (100%) rename {lib => ucw}/getopt/getopt.h (100%) rename {lib => ucw}/getopt/getopt1.c (100%) rename {lib => ucw}/getopt/getopt_init.c (100%) rename {lib => ucw}/getopt/getopt_int.h (100%) rename {lib => ucw}/hash-test.c (96%) create mode 100644 ucw/hash-test.t rename {lib => ucw}/hashfunc-test.c (99%) rename {lib => ucw}/hashfunc.c (98%) rename {lib => ucw}/hashfunc.h (98%) rename {lib => ucw}/hashtable.h (99%) rename {lib => ucw}/heap.h (100%) rename {lib => ucw}/ipaccess.c (94%) rename {lib => ucw}/ipaccess.h (95%) rename {lib => ucw}/kmp-search.h (96%) rename {lib => ucw}/kmp-test.c (96%) rename {lib => ucw}/kmp-test.t (52%) rename {lib => ucw}/kmp.h (97%) rename {lib => ucw}/lfs-test.c (96%) rename {lib => ucw}/lfs.h (100%) rename {lib => ucw}/lib.h (99%) rename {lib => ucw}/libucw.pc (100%) rename {lib => ucw}/lists.c (96%) rename {lib => ucw}/lists.h (98%) rename {lib => ucw}/lizard-safe.c (97%) rename {lib => ucw}/lizard-test.c (95%) rename {lib => ucw}/lizard.c (99%) rename {lib => ucw}/lizard.h (100%) rename {lib => ucw}/log-file.c (97%) rename {lib => ucw}/log.c (99%) rename {lib => ucw}/mainloop.c (99%) rename {lib => ucw}/mainloop.h (99%) rename {lib => ucw}/md5.c (99%) rename {lib => ucw}/md5.h (91%) rename {lib => ucw}/mempool-fmt.c (97%) rename {lib => ucw}/mempool-str.c (97%) rename {lib => ucw}/mempool.c (99%) rename {lib => ucw}/mempool.h (100%) rename {lib => ucw}/mempool.t (68%) rename {lib => ucw}/mmap.c (97%) rename {lib => ucw}/pagecache.c (99%) rename {lib => ucw}/pagecache.h (98%) rename {lib => ucw}/partmap.c (97%) rename {lib => ucw}/partmap.h (100%) rename {lib => ucw}/perl/CGI.pm (100%) rename {lib => ucw}/perl/Config.pm (100%) rename {lib => ucw}/perl/Configure.pm (98%) rename {lib => ucw}/perl/Filelock/Filelock.pm (100%) rename {lib => ucw}/perl/Filelock/Filelock.xs (100%) rename {lib => ucw}/perl/Filelock/MANIFEST (100%) rename {lib => ucw}/perl/Filelock/Makefile (70%) rename {lib => ucw}/perl/Filelock/Makefile.PL (100%) rename {lib => ucw}/perl/Log.pm (100%) create mode 100644 ucw/perl/Makefile rename {lib => ucw}/perl/Ulimit/MANIFEST (100%) rename {lib => ucw}/perl/Ulimit/Makefile (70%) rename {lib => ucw}/perl/Ulimit/Makefile.PL (100%) rename {lib => ucw}/perl/Ulimit/Ulimit.pm (100%) rename {lib => ucw}/perl/Ulimit/Ulimit.xs (100%) rename {lib => ucw}/prefetch.h (91%) rename {lib => ucw}/prime.c (98%) rename {lib => ucw}/primetable.c (97%) rename {lib => ucw}/proctitle.c (98%) rename {lib => ucw}/profile.c (97%) rename {lib => ucw}/profile.h (99%) rename {lib => ucw}/qache.c (99%) rename {lib => ucw}/qache.h (100%) rename {lib => ucw}/random.c (97%) rename {lib => ucw}/randomkey.c (96%) rename {lib => ucw}/realloc.c (96%) rename {lib => ucw}/redblack-test.c (98%) rename {lib => ucw}/redblack-test.t (51%) rename {lib => ucw}/redblack.h (99%) rename {lib => ucw}/regex.c (98%) rename {lib => ucw}/regex.h (100%) rename {lib => ucw}/regex.t (77%) rename {lib => ucw}/runcmd.c (99%) rename {lib => ucw}/semaphore.h (100%) rename {lib => ucw}/sha1-hmac.c (96%) rename {lib => ucw}/sha1.c (98%) rename {lib => ucw}/sha1.h (100%) rename {lib => ucw}/sha1.t (87%) create mode 100644 ucw/shell/Makefile rename {lib => ucw}/shell/config.c (97%) rename {lib => ucw}/shell/config.t (78%) rename {lib => ucw}/shell/libucw.sh (100%) rename {lib => ucw}/shell/logger.c (97%) rename {lib => ucw}/sighandler.c (96%) rename {lib => ucw}/simple-lists.c (90%) rename {lib => ucw}/simple-lists.h (97%) rename {lib => ucw}/slists.c (96%) rename {lib => ucw}/slists.h (100%) rename {lib => ucw}/slists.t (66%) rename {lib => ucw}/sorter/Makefile (71%) rename {lib => ucw}/sorter/TODO (87%) rename {lib => ucw}/sorter/array.c (98%) rename {lib => ucw}/sorter/array.h (98%) rename {lib => ucw}/sorter/common.h (99%) rename {lib => ucw}/sorter/config.c (94%) rename {lib => ucw}/sorter/govern.c (98%) rename {lib => ucw}/sorter/s-fixint.h (98%) rename {lib => ucw}/sorter/s-internal.h (99%) rename {lib => ucw}/sorter/s-multiway.h (100%) rename {lib => ucw}/sorter/s-radix.h (100%) rename {lib => ucw}/sorter/s-twoway.h (100%) rename {lib => ucw}/sorter/sbuck.c (96%) rename {lib => ucw}/sorter/sort-test.c (96%) rename {lib => ucw}/sorter/sorter.h (97%) rename {lib => ucw}/stkstring.c (97%) rename {lib => ucw}/stkstring.h (100%) rename {lib => ucw}/stkstring.t (78%) rename {lib => ucw}/str-esc.c (96%) rename {lib => ucw}/str-hex.c (95%) rename {lib => ucw}/str-imatch.c (82%) rename {lib => ucw}/str-match.c (86%) rename {lib => ucw}/str-match.h (97%) rename {lib => ucw}/str-split.c (92%) rename {lib => ucw}/string.c (91%) rename {lib => ucw}/string.h (100%) create mode 100644 ucw/string.t rename {lib => ucw}/sync.c (95%) rename {lib => ucw}/threads-conf.c (88%) rename {lib => ucw}/threads.c (97%) rename {lib => ucw}/threads.h (100%) rename {lib => ucw}/timer.c (97%) rename {lib => ucw}/trie-test.c (97%) create mode 100644 ucw/trie-test.t rename {lib => ucw}/trie.h (99%) rename {lib => ucw}/unaligned.h (100%) rename {lib => ucw}/unicode.c (98%) rename {lib => ucw}/unicode.h (99%) rename {lib => ucw}/unicode.t (79%) rename {lib => ucw}/url.c (99%) rename {lib => ucw}/url.h (100%) rename {lib => ucw}/wildmatch.c (98%) rename {lib => ucw}/wildmatch.h (100%) rename {lib => ucw}/workqueue.c (98%) rename {lib => ucw}/workqueue.h (98%) diff --git a/lib/Makefile b/lib/Makefile deleted file mode 100644 index 4177f51e..00000000 --- a/lib/Makefile +++ /dev/null @@ -1,147 +0,0 @@ -# Makefile for the UCW Library (c) 1997--2008 Martin Mares - -DIRS+=lib -LIBUCW=$(o)/lib/libucw.pc - -ifdef CONFIG_UCW_DBTOOL -PROGS+=$(o)/lib/db-tool -endif - -PROGS+=$(o)/lib/basecode - -LIBUCW_MODS= \ - threads \ - alloc alloc_str realloc bigalloc mempool mempool-str mempool-fmt eltpool \ - mmap pagecache partmap hashfunc \ - lists slists simple-lists bitsig \ - log log-file proctitle \ - conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \ - ipaccess \ - profile \ - fastbuf ff-binary ff-string ff-printf ff-unicode \ - fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \ - char-cat char-upper char-lower unicode stkstring \ - wildmatch ctmatch regex \ - prime primetable random timer randomkey \ - bit-ffs bit-fls \ - db \ - url \ - mainloop exitstatus runcmd sighandler \ - lizard lizard-safe adler32 \ - md5 sha1 sha1-hmac \ - base64 base224 \ - sync \ - qache \ - string str-esc str-split str-match str-imatch str-hex \ - bbuf \ - getopt - -LIBUCW_INCLUDES= \ - lib.h config.h threads.h \ - mempool.h pagecache.h \ - arraysort.h \ - lists.h clists.h slists.h simple-lists.h \ - string.h stkstring.h unicode.h chartype.h regex.h \ - wildmatch.h \ - unaligned.h prefetch.h \ - bbuf.h gbuf.h bitarray.h bitsig.h \ - hashfunc.h hashtable.h \ - heap.h binheap.h binheap-node.h \ - redblack.h \ - binsearch.h \ - bitops.h \ - conf.h getopt.h ipaccess.h \ - profile.h \ - fastbuf.h lfs.h ff-unicode.h ff-binary.h \ - db.h \ - url.h \ - mainloop.h \ - lizard.h \ - md5.h \ - base64.h base224.h \ - qache.h \ - kmp.h kmp-search.h binsearch.h \ - partmap.h - -ifdef CONFIG_UCW_THREADS -# Some modules require threading -LIBUCW_MODS+=threads-conf workqueue asio fb-direct -LIBUCW_INCLUDES+=workqueue.h semaphore.h asio.h -endif - -ifdef CONFIG_OWN_GETOPT -include $(s)/lib/getopt/Makefile -endif - -include $(s)/lib/sorter/Makefile - -LIBUCW_MOD_PATHS=$(addprefix $(o)/lib/,$(LIBUCW_MODS)) - -$(o)/lib/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS)) -$(o)/lib/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS)) - -$(o)/lib/hashfunc.o $(o)/lib/hashfunc.oo: CFLAGS += -funroll-loops -$(o)/lib/lizard.o: CFLAGS += $(COPT2) -funroll-loops - -$(o)/lib/db-test: $(o)/lib/db-test.o $(LIBUCW) -$(o)/lib/db-tool: $(o)/lib/db-tool.o $(LIBUCW) -$(o)/lib/conf-test: $(o)/lib/conf-test.o $(LIBUCW) -$(o)/lib/lfs-test: $(o)/lib/lfs-test.o $(LIBUCW) -$(o)/lib/hash-test: $(o)/lib/hash-test.o $(LIBUCW) -$(o)/lib/hashfunc-test: $(o)/lib/hashfunc-test.o $(LIBUCW) -$(o)/lib/asort-test: $(o)/lib/asort-test.o $(LIBUCW) -$(o)/lib/redblack-test: $(o)/lib/redblack-test.o $(LIBUCW) -$(o)/lib/binheap-test: $(o)/lib/binheap-test.o $(LIBUCW) -$(o)/lib/lizard-test: $(o)/lib/lizard-test.o $(LIBUCW) -$(o)/lib/kmp-test: $(o)/lib/kmp-test.o $(LIBUCW) $(LIBCHARSET) -$(o)/lib/ipaccess-test: $(o)/lib/ipaccess-test.o $(LIBUCW) -$(o)/lib/trie-test: $(o)/lib/trie-test.o $(LIBUCW) -$(o)/lib/basecode: $(o)/lib/basecode.o $(LIBUCW) - -TESTS+=$(addprefix $(o)/lib/,regex.test unicode.test hash-test.test mempool.test stkstring.test \ - slists.test kmp-test.test bbuf.test getopt.test fastbuf.test ff-unicode.test eltpool.test \ - fb-socket.test trie-test.test string.test sha1.test asort-test.test binheap-test.test \ - redblack-test.test basecode.test) - -$(o)/lib/regex.test: $(o)/lib/regex-t -$(o)/lib/unicode.test: $(o)/lib/unicode-t -$(o)/lib/hash-test.test: $(o)/lib/hash-test -$(o)/lib/mempool.test: $(o)/lib/mempool-t $(o)/lib/mempool-fmt-t $(o)/lib/mempool-str-t -$(o)/lib/stkstring.test: $(o)/lib/stkstring-t -$(o)/lib/bitops.test: $(o)/lib/bit-ffs-t $(o)/lib/bit-fls-t -$(o)/lib/slists.test: $(o)/lib/slists-t -$(o)/lib/kmp-test.test: $(o)/lib/kmp-test -$(o)/lib/bbuf.test: $(o)/lib/bbuf-t -$(o)/lib/getopt.test: $(o)/lib/getopt-t -$(o)/lib/fastbuf.test: $(o)/lib/fb-file-t $(o)/lib/fb-grow-t $(o)/lib/fb-pool-t -$(o)/lib/ff-unicode.test: $(o)/lib/ff-unicode-t -$(o)/lib/eltpool.test: $(o)/lib/eltpool-t -$(o)/lib/fb-socket.test: $(o)/lib/fb-socket-t -$(o)/lib/string.test: $(o)/lib/str-hex-t $(o)/lib/str-esc-t -$(o)/lib/sha1.test: $(o)/lib/sha1-t $(o)/lib/sha1-hmac-t -$(o)/lib/trie-test.test: $(o)/lib/trie-test -$(o)/lib/asort-test.test: $(o)/lib/asort-test -$(o)/lib/binheap-test.test: $(o)/lib/binheap-test -$(o)/lib/redblack-test.test: $(o)/lib/redblack-test -$(o)/lib/basecode.test: $(o)/lib/basecode - -ifdef CONFIG_UCW_THREADS -TESTS+=$(addprefix $(o)/lib/,asio.test) -$(o)/lib/asio.test: $(o)/lib/asio-t -endif - -API_LIBS+=libucw -API_INCLUDES+=$(o)/lib/.include-stamp -$(o)/lib/.include-stamp: $(addprefix $(s)/lib/,$(LIBUCW_INCLUDES)) obj/autoconf.h - $(Q)$(s)/build/install-includes $( + +DIRS+=ucw +LIBUCW=$(o)/ucw/libucw.pc + +ifdef CONFIG_UCW_DBTOOL +PROGS+=$(o)/ucw/db-tool +endif + +PROGS+=$(o)/ucw/basecode + +LIBUCW_MODS= \ + threads \ + alloc alloc_str realloc bigalloc mempool mempool-str mempool-fmt eltpool \ + mmap pagecache partmap hashfunc \ + lists slists simple-lists bitsig \ + log log-file proctitle \ + conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \ + ipaccess \ + profile \ + fastbuf ff-binary ff-string ff-printf ff-unicode \ + fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \ + char-cat char-upper char-lower unicode stkstring \ + wildmatch ctmatch regex \ + prime primetable random timer randomkey \ + bit-ffs bit-fls \ + db \ + url \ + mainloop exitstatus runcmd sighandler \ + lizard lizard-safe adler32 \ + md5 sha1 sha1-hmac \ + base64 base224 \ + sync \ + qache \ + string str-esc str-split str-match str-imatch str-hex \ + bbuf \ + getopt + +LIBUCW_INCLUDES= \ + lib.h config.h threads.h \ + mempool.h pagecache.h \ + arraysort.h \ + lists.h clists.h slists.h simple-lists.h \ + string.h stkstring.h unicode.h chartype.h regex.h \ + wildmatch.h \ + unaligned.h prefetch.h \ + bbuf.h gbuf.h bitarray.h bitsig.h \ + hashfunc.h hashtable.h \ + heap.h binheap.h binheap-node.h \ + redblack.h \ + binsearch.h \ + bitops.h \ + conf.h getopt.h ipaccess.h \ + profile.h \ + fastbuf.h lfs.h ff-unicode.h ff-binary.h \ + db.h \ + url.h \ + mainloop.h \ + lizard.h \ + md5.h \ + base64.h base224.h \ + qache.h \ + kmp.h kmp-search.h binsearch.h \ + partmap.h + +ifdef CONFIG_UCW_THREADS +# Some modules require threading +LIBUCW_MODS+=threads-conf workqueue asio fb-direct +LIBUCW_INCLUDES+=workqueue.h semaphore.h asio.h +endif + +ifdef CONFIG_OWN_GETOPT +include $(s)/ucw/getopt/Makefile +endif + +include $(s)/ucw/sorter/Makefile + +LIBUCW_MOD_PATHS=$(addprefix $(o)/ucw/,$(LIBUCW_MODS)) + +$(o)/ucw/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS)) +$(o)/ucw/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS)) + +$(o)/ucw/hashfunc.o $(o)/ucw/hashfunc.oo: CFLAGS += -funroll-loops +$(o)/ucw/lizard.o: CFLAGS += $(COPT2) -funroll-loops + +$(o)/ucw/db-test: $(o)/ucw/db-test.o $(LIBUCW) +$(o)/ucw/db-tool: $(o)/ucw/db-tool.o $(LIBUCW) +$(o)/ucw/conf-test: $(o)/ucw/conf-test.o $(LIBUCW) +$(o)/ucw/lfs-test: $(o)/ucw/lfs-test.o $(LIBUCW) +$(o)/ucw/hash-test: $(o)/ucw/hash-test.o $(LIBUCW) +$(o)/ucw/hashfunc-test: $(o)/ucw/hashfunc-test.o $(LIBUCW) +$(o)/ucw/asort-test: $(o)/ucw/asort-test.o $(LIBUCW) +$(o)/ucw/redblack-test: $(o)/ucw/redblack-test.o $(LIBUCW) +$(o)/ucw/binheap-test: $(o)/ucw/binheap-test.o $(LIBUCW) +$(o)/ucw/lizard-test: $(o)/ucw/lizard-test.o $(LIBUCW) +$(o)/ucw/kmp-test: $(o)/ucw/kmp-test.o $(LIBUCW) $(LIBCHARSET) +$(o)/ucw/ipaccess-test: $(o)/ucw/ipaccess-test.o $(LIBUCW) +$(o)/ucw/trie-test: $(o)/ucw/trie-test.o $(LIBUCW) +$(o)/ucw/basecode: $(o)/ucw/basecode.o $(LIBUCW) + +TESTS+=$(addprefix $(o)/ucw/,regex.test unicode.test hash-test.test mempool.test stkstring.test \ + slists.test kmp-test.test bbuf.test getopt.test fastbuf.test ff-unicode.test eltpool.test \ + fb-socket.test trie-test.test string.test sha1.test asort-test.test binheap-test.test \ + redblack-test.test basecode.test) + +$(o)/ucw/regex.test: $(o)/ucw/regex-t +$(o)/ucw/unicode.test: $(o)/ucw/unicode-t +$(o)/ucw/hash-test.test: $(o)/ucw/hash-test +$(o)/ucw/mempool.test: $(o)/ucw/mempool-t $(o)/ucw/mempool-fmt-t $(o)/ucw/mempool-str-t +$(o)/ucw/stkstring.test: $(o)/ucw/stkstring-t +$(o)/ucw/bitops.test: $(o)/ucw/bit-ffs-t $(o)/ucw/bit-fls-t +$(o)/ucw/slists.test: $(o)/ucw/slists-t +$(o)/ucw/kmp-test.test: $(o)/ucw/kmp-test +$(o)/ucw/bbuf.test: $(o)/ucw/bbuf-t +$(o)/ucw/getopt.test: $(o)/ucw/getopt-t +$(o)/ucw/fastbuf.test: $(o)/ucw/fb-file-t $(o)/ucw/fb-grow-t $(o)/ucw/fb-pool-t +$(o)/ucw/ff-unicode.test: $(o)/ucw/ff-unicode-t +$(o)/ucw/eltpool.test: $(o)/ucw/eltpool-t +$(o)/ucw/fb-socket.test: $(o)/ucw/fb-socket-t +$(o)/ucw/string.test: $(o)/ucw/str-hex-t $(o)/ucw/str-esc-t +$(o)/ucw/sha1.test: $(o)/ucw/sha1-t $(o)/ucw/sha1-hmac-t +$(o)/ucw/trie-test.test: $(o)/ucw/trie-test +$(o)/ucw/asort-test.test: $(o)/ucw/asort-test +$(o)/ucw/binheap-test.test: $(o)/ucw/binheap-test +$(o)/ucw/redblack-test.test: $(o)/ucw/redblack-test +$(o)/ucw/basecode.test: $(o)/ucw/basecode + +ifdef CONFIG_UCW_THREADS +TESTS+=$(addprefix $(o)/ucw/,asio.test) +$(o)/ucw/asio.test: $(o)/ucw/asio-t +endif + +API_LIBS+=libucw +API_INCLUDES+=$(o)/ucw/.include-stamp +$(o)/ucw/.include-stamp: $(addprefix $(s)/ucw/,$(LIBUCW_INCLUDES)) obj/autoconf.h + $(Q)$(s)/build/install-includes $( #include diff --git a/lib/alloc_str.c b/ucw/alloc_str.c similarity index 93% rename from lib/alloc_str.c rename to ucw/alloc_str.c index 05e803c7..5b3d8392 100644 --- a/lib/alloc_str.c +++ b/ucw/alloc_str.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include diff --git a/lib/arraysort.h b/ucw/arraysort.h similarity index 100% rename from lib/arraysort.h rename to ucw/arraysort.h diff --git a/lib/asio.c b/ucw/asio.c similarity index 98% rename from lib/asio.c rename to ucw/asio.c index e33e03eb..038bc181 100644 --- a/lib/asio.c +++ b/ucw/asio.c @@ -9,9 +9,9 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/asio.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/asio.h" +#include "ucw/threads.h" #include #include diff --git a/lib/asio.h b/ucw/asio.h similarity index 98% rename from lib/asio.h rename to ucw/asio.h index 6773c81f..f80cc699 100644 --- a/lib/asio.h +++ b/ucw/asio.h @@ -10,8 +10,8 @@ #ifndef _UCW_ASIO_H #define _UCW_ASIO_H -#include "lib/workqueue.h" -#include "lib/clists.h" +#include "ucw/workqueue.h" +#include "ucw/clists.h" /* * This module takes care of scheduling and executing asynchronous I/O requests diff --git a/lib/asio.t b/ucw/asio.t similarity index 58% rename from lib/asio.t rename to ucw/asio.t index b660657e..a98974b7 100644 --- a/lib/asio.t +++ b/ucw/asio.t @@ -1,4 +1,4 @@ # Tests for asynchronous I/O -Run: echo y | ../obj/lib/asio-t +Run: echo y | ../obj/ucw/asio-t Out: ABCDEFGHIJ diff --git a/lib/asort-test.c b/ucw/asort-test.c similarity index 96% rename from lib/asort-test.c rename to ucw/asort-test.c index 5eaf9e14..aa600735 100644 --- a/lib/asort-test.c +++ b/ucw/asort-test.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include @@ -62,7 +62,7 @@ static int qs_comp(const struct elt *X, const struct elt *Y) } #define ASORT_PREFIX(x) as_##x -#include "lib/arraysort.h" +#include "ucw/arraysort.h" int main(void) { diff --git a/lib/asort-test.t b/ucw/asort-test.t similarity index 55% rename from lib/asort-test.t rename to ucw/asort-test.t index f84993db..5325080c 100644 --- a/lib/asort-test.t +++ b/ucw/asort-test.t @@ -1,3 +1,3 @@ # Test for the arraysort module -Run: ../obj/lib/asort-test +Run: ../obj/ucw/asort-test diff --git a/lib/autoconf.cfg b/ucw/autoconf.cfg similarity index 99% rename from lib/autoconf.cfg rename to ucw/autoconf.cfg index 277855fc..83743a57 100644 --- a/lib/autoconf.cfg +++ b/ucw/autoconf.cfg @@ -282,10 +282,10 @@ if (IsSet("CONFIG_LARGE_FILES") && IsSet("CONFIG_LINUX")) { Set("CONFIG_LFS"); } -# Decide how will lib/partmap.c work +# Decide how will ucw/partmap.c work Set("PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS"); -# Option for lib/mempool.c +# Option for ucw/mempool.c Set("POOL_IS_MMAP"); # Guess optimal bit width of the radix-sorter diff --git a/lib/base224.c b/ucw/base224.c similarity index 98% rename from lib/base224.c rename to ucw/base224.c index 15a40243..8e5cec3d 100644 --- a/lib/base224.c +++ b/ucw/base224.c @@ -25,8 +25,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/base224.h" +#include "ucw/lib.h" +#include "ucw/base224.h" static void encode_block(byte *w, u32 hi, u32 lo) diff --git a/lib/base224.h b/ucw/base224.h similarity index 100% rename from lib/base224.h rename to ucw/base224.h diff --git a/lib/base64.c b/ucw/base64.c similarity index 98% rename from lib/base64.c rename to ucw/base64.c index ef8faa45..9865f4c6 100644 --- a/lib/base64.c +++ b/ucw/base64.c @@ -9,8 +9,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/base64.h" +#include "ucw/lib.h" +#include "ucw/base64.h" #include diff --git a/lib/base64.h b/ucw/base64.h similarity index 100% rename from lib/base64.h rename to ucw/base64.h diff --git a/lib/basecode.c b/ucw/basecode.c similarity index 95% rename from lib/basecode.c rename to ucw/basecode.c index 3c7f0c48..5c6bbb60 100644 --- a/lib/basecode.c +++ b/ucw/basecode.c @@ -11,11 +11,11 @@ #include #include -#include "lib/lib.h" -#include "lib/base64.h" -#include "lib/base224.h" -#include "lib/fastbuf.h" -#include "lib/getopt.h" +#include "ucw/lib.h" +#include "ucw/base64.h" +#include "ucw/base224.h" +#include "ucw/fastbuf.h" +#include "ucw/getopt.h" static struct option opts[] = { { "encode64", 0, 0, 'e' }, diff --git a/lib/basecode.t b/ucw/basecode.t similarity index 75% rename from lib/basecode.t rename to ucw/basecode.t index d0cb249a..a7048135 100644 --- a/lib/basecode.t +++ b/ucw/basecode.t @@ -1,16 +1,16 @@ # Tests for base64 and base224 modules Name: Base64 encode -Run: ../obj/lib/basecode -e +Run: ../obj/ucw/basecode -e Input: Here are some test data Output: SGVyZSBhcmUgc29tZSB0ZXN0IGRhdGEK Name: Base64 decode -Run: ../obj/lib/basecode -d +Run: ../obj/ucw/basecode -d Input: SGVyZSBhcmUgc29tZSB0ZXN0IGRhdGEK Output: Here are some test data Name: Base224 encode & decode -Run: ../obj/lib/basecode -E | ../obj/lib/basecode -D +Run: ../obj/ucw/basecode -E | ../obj/ucw/basecode -D Input: Some more test data for 224 encoding Output: Some more test data for 224 encoding diff --git a/lib/bbuf.c b/ucw/bbuf.c similarity index 97% rename from lib/bbuf.c rename to ucw/bbuf.c index 9d4af26f..61c2a272 100644 --- a/lib/bbuf.c +++ b/ucw/bbuf.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/bbuf.h" +#include "ucw/lib.h" +#include "ucw/bbuf.h" #include diff --git a/lib/bbuf.h b/ucw/bbuf.h similarity index 96% rename from lib/bbuf.h rename to ucw/bbuf.h index 22e62bb0..24c2c0b9 100644 --- a/lib/bbuf.h +++ b/ucw/bbuf.h @@ -12,7 +12,7 @@ #define GBUF_TYPE byte #define GBUF_PREFIX(x) bb_##x -#include "lib/gbuf.h" +#include "ucw/gbuf.h" char *bb_vprintf(bb_t *bb, const char *fmt, va_list args); char *bb_printf(bb_t *bb, const char *fmt, ...); diff --git a/lib/bbuf.t b/ucw/bbuf.t similarity index 82% rename from lib/bbuf.t rename to ucw/bbuf.t index ebf9ecce..ca8f64fe 100644 --- a/lib/bbuf.t +++ b/ucw/bbuf.t @@ -1,4 +1,4 @@ # Tests for growing buffers -Run: ../obj/lib/bbuf-t +Run: ../obj/ucw/bbuf-t Out: diff --git a/lib/bigalloc.c b/ucw/bigalloc.c similarity index 99% rename from lib/bigalloc.c rename to ucw/bigalloc.c index 9581188c..7532a446 100644 --- a/lib/bigalloc.c +++ b/ucw/bigalloc.c @@ -8,7 +8,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/binheap-node.h b/ucw/binheap-node.h similarity index 100% rename from lib/binheap-node.h rename to ucw/binheap-node.h diff --git a/lib/binheap-test.c b/ucw/binheap-test.c similarity index 95% rename from lib/binheap-test.c rename to ucw/binheap-test.c index bfd28a01..9589b07b 100644 --- a/lib/binheap-test.c +++ b/ucw/binheap-test.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include @@ -16,7 +16,7 @@ #define BH_WANT_INSERT #define BH_WANT_FINDMIN #define BH_WANT_DELETEMIN -#include "lib/binheap-node.h" +#include "ucw/binheap-node.h" struct item { struct bh_node n; @@ -52,7 +52,7 @@ bht_dump(struct bh_heap *h) bht_do_dump(b, b->last_son, 1); } -#include "lib/binheap.h" +#include "ucw/binheap.h" int main(void) { diff --git a/lib/binheap-test.t b/ucw/binheap-test.t similarity index 65% rename from lib/binheap-test.t rename to ucw/binheap-test.t index 1447de1d..109d6e94 100644 --- a/lib/binheap-test.t +++ b/ucw/binheap-test.t @@ -1,5 +1,5 @@ # Test for the binheap module -Run: ../obj/lib/binheap-test +Run: ../obj/ucw/binheap-test Out: cnt=1048576 root diff --git a/lib/binheap.h b/ucw/binheap.h similarity index 97% rename from lib/binheap.h rename to ucw/binheap.h index 0c6ee5a5..bc498e41 100644 --- a/lib/binheap.h +++ b/ucw/binheap.h @@ -20,7 +20,7 @@ * names mentioned here except for macro names will be * implicitly prefixed. * - * Then you continue by including "lib/binheap-node.h" which defines struct bh_node + * Then you continue by including "ucw/binheap-node.h" which defines struct bh_node * and struct bh_root (both without prefix). The heap elements are always allocated by * you and they must include struct bh_node which serves as a handle used for all * the heap functions and it contains all information needed for heap-keeping. @@ -38,7 +38,7 @@ * BH_WANT_FINDMIN node *findmin(heap*) -- find node with minimum key. * BH_WANT_DELETEMIN node *deletemin(heap*) -- findmin and delete the node. * - * Then include "lib/binheap.h" and voila, you have a binomial heap + * Then include "ucw/binheap.h" and voila, you have a binomial heap * suiting all your needs (at least those which you've revealed :) ). * * You also get a iterator macro at no extra charge: diff --git a/lib/binsearch.h b/ucw/binsearch.h similarity index 100% rename from lib/binsearch.h rename to ucw/binsearch.h diff --git a/lib/bit-ffs.c b/ucw/bit-ffs.c similarity index 96% rename from lib/bit-ffs.c rename to ucw/bit-ffs.c index 8a9198d1..0775f536 100644 --- a/lib/bit-ffs.c +++ b/ucw/bit-ffs.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/bitops.h" +#include "ucw/lib.h" +#include "ucw/bitops.h" /* Just a table, the rest is in bitops.h */ diff --git a/lib/bit-fls.c b/ucw/bit-fls.c similarity index 93% rename from lib/bit-fls.c rename to ucw/bit-fls.c index 6a6227dd..ef38df30 100644 --- a/lib/bit-fls.c +++ b/ucw/bit-fls.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/bitops.h" +#include "ucw/lib.h" +#include "ucw/bitops.h" int bit_fls(u32 x) diff --git a/lib/bitarray.h b/ucw/bitarray.h similarity index 100% rename from lib/bitarray.h rename to ucw/bitarray.h diff --git a/lib/bitops.h b/ucw/bitops.h similarity index 100% rename from lib/bitops.h rename to ucw/bitops.h diff --git a/lib/bitops.t b/ucw/bitops.t similarity index 84% rename from lib/bitops.t rename to ucw/bitops.t index 97b2b358..42240665 100644 --- a/lib/bitops.t +++ b/ucw/bitops.t @@ -1,6 +1,6 @@ # Tests for bitops modules -Run: ../obj/lib/bit-ffs-t +Run: ../obj/ucw/bit-ffs-t In: 1 2 3 @@ -26,7 +26,7 @@ Out: 0 30 31 -Run: ../obj/lib/bit-fls-t +Run: ../obj/ucw/bit-fls-t In: 1 2 3 diff --git a/lib/bitsig.c b/ucw/bitsig.c similarity index 98% rename from lib/bitsig.c rename to ucw/bitsig.c index cb00f6bd..85b18a6b 100644 --- a/lib/bitsig.c +++ b/ucw/bitsig.c @@ -41,9 +41,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/bitsig.h" -#include "lib/md5.h" +#include "ucw/lib.h" +#include "ucw/bitsig.h" +#include "ucw/md5.h" #include diff --git a/lib/bitsig.h b/ucw/bitsig.h similarity index 100% rename from lib/bitsig.h rename to ucw/bitsig.h diff --git a/lib/carefulio.c b/ucw/carefulio.c similarity index 97% rename from lib/carefulio.c rename to ucw/carefulio.c index b8d865d4..44e01e14 100644 --- a/lib/carefulio.c +++ b/ucw/carefulio.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include diff --git a/lib/char-cat.c b/ucw/char-cat.c similarity index 85% rename from lib/char-cat.c rename to ucw/char-cat.c index 1b8e223b..5a984bea 100644 --- a/lib/char-cat.c +++ b/ucw/char-cat.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/chartype.h" +#include "ucw/chartype.h" const unsigned char _c_cat[256] = { #define CHAR(code,upper,lower,cat) cat, -#include "lib/char-map.h" +#include "ucw/char-map.h" #undef CHAR }; diff --git a/lib/char-lower.c b/ucw/char-lower.c similarity index 85% rename from lib/char-lower.c rename to ucw/char-lower.c index 05921072..700ae370 100644 --- a/lib/char-lower.c +++ b/ucw/char-lower.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/chartype.h" +#include "ucw/chartype.h" const unsigned char _c_lower[256] = { #define CHAR(code,upper,lower,cat) lower, -#include "lib/char-map.h" +#include "ucw/char-map.h" #undef CHAR }; diff --git a/lib/char-map.h b/ucw/char-map.h similarity index 100% rename from lib/char-map.h rename to ucw/char-map.h diff --git a/lib/char-upper.c b/ucw/char-upper.c similarity index 85% rename from lib/char-upper.c rename to ucw/char-upper.c index 3b164d29..9b08809f 100644 --- a/lib/char-upper.c +++ b/ucw/char-upper.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/chartype.h" +#include "ucw/chartype.h" const unsigned char _c_upper[256] = { #define CHAR(code,upper,lower,cat) upper, -#include "lib/char-map.h" +#include "ucw/char-map.h" #undef CHAR }; diff --git a/lib/chartype.h b/ucw/chartype.h similarity index 100% rename from lib/chartype.h rename to ucw/chartype.h diff --git a/lib/clists.h b/ucw/clists.h similarity index 100% rename from lib/clists.h rename to ucw/clists.h diff --git a/lib/conf-alloc.c b/ucw/conf-alloc.c similarity index 91% rename from lib/conf-alloc.c rename to ucw/conf-alloc.c index 9f02fd56..1a0de4f2 100644 --- a/lib/conf-alloc.c +++ b/ucw/conf-alloc.c @@ -8,9 +8,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/mempool.h" struct mempool *cf_pool; // current pool for loading new configuration diff --git a/lib/conf-dump.c b/ucw/conf-dump.c similarity index 95% rename from lib/conf-dump.c rename to ucw/conf-dump.c index 0d409240..a2a92df2 100644 --- a/lib/conf-dump.c +++ b/ucw/conf-dump.c @@ -8,12 +8,12 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/conf-internal.h" -#include "lib/clists.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/conf-internal.h" +#include "ucw/clists.h" +#include "ucw/fastbuf.h" static void spaces(struct fastbuf *fb, uns nr) diff --git a/lib/conf-input.c b/ucw/conf-input.c similarity index 97% rename from lib/conf-input.c rename to ucw/conf-input.c index 08e5b098..59468de6 100644 --- a/lib/conf-input.c +++ b/ucw/conf-input.c @@ -8,15 +8,15 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/conf-internal.h" -#include "lib/mempool.h" -#include "lib/fastbuf.h" -#include "lib/chartype.h" -#include "lib/string.h" -#include "lib/stkstring.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/conf-internal.h" +#include "ucw/mempool.h" +#include "ucw/fastbuf.h" +#include "ucw/chartype.h" +#include "ucw/string.h" +#include "ucw/stkstring.h" #include #include @@ -32,13 +32,13 @@ static uns line_num; static char line_buf[MAX_LINE]; static char *line = line_buf; -#include "lib/bbuf.h" +#include "ucw/bbuf.h" static bb_t copy_buf; static uns copied; #define GBUF_TYPE uns #define GBUF_PREFIX(x) split_##x -#include "lib/gbuf.h" +#include "ucw/gbuf.h" static split_t word_buf; static uns words; static uns ends_by_brace; // the line is ended by "{" diff --git a/lib/conf-internal.h b/ucw/conf-internal.h similarity index 100% rename from lib/conf-internal.h rename to ucw/conf-internal.h diff --git a/lib/conf-intr.c b/ucw/conf-intr.c similarity index 99% rename from lib/conf-intr.c rename to ucw/conf-intr.c index 407861d0..f7b678e1 100644 --- a/lib/conf-intr.c +++ b/ucw/conf-intr.c @@ -8,11 +8,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/conf-internal.h" -#include "lib/clists.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/conf-internal.h" +#include "ucw/clists.h" #include #include diff --git a/lib/conf-journal.c b/ucw/conf-journal.c similarity index 94% rename from lib/conf-journal.c rename to ucw/conf-journal.c index 591aa8a5..b0b90134 100644 --- a/lib/conf-journal.c +++ b/ucw/conf-journal.c @@ -8,11 +8,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/conf-internal.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/conf-internal.h" +#include "ucw/mempool.h" #include diff --git a/lib/conf-parse.c b/ucw/conf-parse.c similarity index 97% rename from lib/conf-parse.c rename to ucw/conf-parse.c index c828462b..4cfeee14 100644 --- a/lib/conf-parse.c +++ b/ucw/conf-parse.c @@ -8,9 +8,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/chartype.h" #include #include diff --git a/lib/conf-section.c b/ucw/conf-section.c similarity index 96% rename from lib/conf-section.c rename to ucw/conf-section.c index 1a9ae171..31b82a5c 100644 --- a/lib/conf-section.c +++ b/ucw/conf-section.c @@ -8,11 +8,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/conf-internal.h" -#include "lib/clists.h" -#include "lib/binsearch.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/conf-internal.h" +#include "ucw/clists.h" +#include "ucw/binsearch.h" #include @@ -24,7 +24,7 @@ struct dirty_section { }; #define GBUF_TYPE struct dirty_section #define GBUF_PREFIX(x) dirtsec_##x -#include "lib/gbuf.h" +#include "ucw/gbuf.h" static dirtsec_t dirty; static uns dirties; @@ -44,7 +44,7 @@ cf_add_dirty(struct cf_section *sec, void *ptr) #define ASORT_KEY_TYPE struct dirty_section #define ASORT_ELT(i) dirty.ptr[i] #define ASORT_LT(x,y) x.sec < y.sec || x.sec == y.sec && x.ptr < y.ptr -#include "lib/arraysort.h" +#include "ucw/arraysort.h" static void sort_dirty(void) diff --git a/lib/conf-test.c b/ucw/conf-test.c similarity index 96% rename from lib/conf-test.c rename to ucw/conf-test.c index 61ba4bc9..26e0887e 100644 --- a/lib/conf-test.c +++ b/ucw/conf-test.c @@ -4,11 +4,11 @@ * (c) 2006 Robert Spalek */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/clists.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/clists.h" +#include "ucw/fastbuf.h" #include #include @@ -193,7 +193,7 @@ main(int argc, char *argv[]) { log_init(argv[0]); cf_declare_section("top", &cf_top, 0); - cf_def_file = "lib/conf-test.cf"; + cf_def_file = "ucw/conf-test.cf"; int opt; while ((opt = cf_getopt(argc, argv, short_opts, long_opts, NULL)) >= 0) diff --git a/lib/conf-test.cf b/ucw/conf-test.cf similarity index 96% rename from lib/conf-test.cf rename to ucw/conf-test.cf index 91e6cc3b..51bacd4a 100644 --- a/lib/conf-test.cf +++ b/ucw/conf-test.cf @@ -1,5 +1,5 @@ # test config file -#include lib/conf-test.t ; top.xa=1 +#include ucw/conf-test.t ; top.xa=1 #include 'non-existent file'; #top.xa=1 Top { \ diff --git a/lib/conf.h b/ucw/conf.h similarity index 100% rename from lib/conf.h rename to ucw/conf.h diff --git a/lib/config.h b/ucw/config.h similarity index 100% rename from lib/config.h rename to ucw/config.h diff --git a/lib/ctmatch.c b/ucw/ctmatch.c similarity index 94% rename from lib/ctmatch.c rename to ucw/ctmatch.c index 7e807760..6e5aed3f 100644 --- a/lib/ctmatch.c +++ b/ucw/ctmatch.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/chartype.h" int match_ct_patt(const char *p, const char *t) diff --git a/lib/db-emul.c b/ucw/db-emul.c similarity index 98% rename from lib/db-emul.c rename to ucw/db-emul.c index 62540de8..c2f5e832 100644 --- a/lib/db-emul.c +++ b/ucw/db-emul.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/db.h" +#include "ucw/lib.h" +#include "ucw/db.h" #include #include diff --git a/lib/db-test.c b/ucw/db-test.c similarity index 99% rename from lib/db-test.c rename to ucw/db-test.c index 9a6f3bb6..4450eb4a 100644 --- a/lib/db-test.c +++ b/ucw/db-test.c @@ -8,10 +8,10 @@ */ #if 1 -#include "lib/db.c" +#include "ucw/db.c" #define NAME "SDBM" #else -#include "lib/db-emul.c" +#include "ucw/db-emul.c" #define NAME "GDBM" #endif diff --git a/lib/db-tool.c b/ucw/db-tool.c similarity index 97% rename from lib/db-tool.c rename to ucw/db-tool.c index bbb419ab..c2c02bfb 100644 --- a/lib/db-tool.c +++ b/ucw/db-tool.c @@ -7,11 +7,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/db.h" -#include "lib/db_internal.h" -#include "lib/fastbuf.h" -#include "lib/ff-binary.h" +#include "ucw/lib.h" +#include "ucw/db.h" +#include "ucw/db_internal.h" +#include "ucw/fastbuf.h" +#include "ucw/ff-binary.h" #include #include diff --git a/lib/db.c b/ucw/db.c similarity index 99% rename from lib/db.c rename to ucw/db.c index d9c984b7..122fbd35 100644 --- a/lib/db.c +++ b/ucw/db.c @@ -24,11 +24,11 @@ * This gives us page_size*2^32 limit for file size which should be enough. */ -#include "lib/lib.h" -#include "lib/lfs.h" -#include "lib/pagecache.h" -#include "lib/db.h" -#include "lib/db_internal.h" +#include "ucw/lib.h" +#include "ucw/lfs.h" +#include "ucw/pagecache.h" +#include "ucw/db.h" +#include "ucw/db_internal.h" #include #include diff --git a/lib/db.h b/ucw/db.h similarity index 100% rename from lib/db.h rename to ucw/db.h diff --git a/lib/db_internal.h b/ucw/db_internal.h similarity index 100% rename from lib/db_internal.h rename to ucw/db_internal.h diff --git a/lib/default.cfg b/ucw/default.cfg similarity index 100% rename from lib/default.cfg rename to ucw/default.cfg diff --git a/lib/eltpool.c b/ucw/eltpool.c similarity index 97% rename from lib/eltpool.c rename to ucw/eltpool.c index b32843fc..99f353bc 100644 --- a/lib/eltpool.c +++ b/ucw/eltpool.c @@ -18,8 +18,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/eltpool.h" +#include "ucw/lib.h" +#include "ucw/eltpool.h" struct eltpool * ep_new(uns elt_size, uns elts_per_chunk) @@ -73,7 +73,7 @@ ep_total_size(struct eltpool *pool) #ifdef TEST #include -#include "lib/clists.h" +#include "ucw/clists.h" struct argh { cnode n; diff --git a/lib/eltpool.h b/ucw/eltpool.h similarity index 100% rename from lib/eltpool.h rename to ucw/eltpool.h diff --git a/lib/eltpool.test b/ucw/eltpool.test similarity index 53% rename from lib/eltpool.test rename to ucw/eltpool.test index 85bed694..7f08626d 100644 --- a/lib/eltpool.test +++ b/ucw/eltpool.test @@ -1,4 +1,4 @@ # Tests for eltpools -Run: ../obj/lib/eltpool-t +Run: ../obj/ucw/eltpool-t Out: OK diff --git a/lib/exitstatus.c b/ucw/exitstatus.c similarity index 97% rename from lib/exitstatus.c rename to ucw/exitstatus.c index 1095c7ff..4c04d49c 100644 --- a/lib/exitstatus.c +++ b/ucw/exitstatus.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/fastbuf.c b/ucw/fastbuf.c similarity index 98% rename from lib/fastbuf.c rename to ucw/fastbuf.c index be7e9790..3ab8b826 100644 --- a/lib/fastbuf.c +++ b/ucw/fastbuf.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/fastbuf.h b/ucw/fastbuf.h similarity index 100% rename from lib/fastbuf.h rename to ucw/fastbuf.h diff --git a/lib/fastbuf.t b/ucw/fastbuf.t similarity index 81% rename from lib/fastbuf.t rename to ucw/fastbuf.t index 6f8681a0..af00f9bf 100644 --- a/lib/fastbuf.t +++ b/ucw/fastbuf.t @@ -1,15 +1,15 @@ # Tests for fastbufs -Run: ../obj/lib/fb-file-t +Run: ../obj/ucw/fb-file-t Out: 112 112 116 -Run: ../obj/lib/fb-grow-t +Run: ../obj/ucw/fb-grow-t Out: <10><10><0>1234512345<10><9>5<10> <10><10><0>1234512345<10><9>5<10> <10><10><0>1234512345<10><9>5<10> <10><10><0>1234512345<10><9>5<10> <10><10><0>1234512345<10><9>5<10> -Run: ../obj/lib/fb-pool-t +Run: ../obj/ucw/fb-pool-t diff --git a/lib/fb-atomic.c b/ucw/fb-atomic.c similarity index 98% rename from lib/fb-atomic.c rename to ucw/fb-atomic.c index 234d920d..c6ab7c1b 100644 --- a/lib/fb-atomic.c +++ b/ucw/fb-atomic.c @@ -34,9 +34,9 @@ #define LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/lfs.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/lfs.h" #include #include diff --git a/lib/fb-buffer.c b/ucw/fb-buffer.c similarity index 96% rename from lib/fb-buffer.c rename to ucw/fb-buffer.c index d8094eb0..3c377e06 100644 --- a/lib/fb-buffer.c +++ b/ucw/fb-buffer.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/fb-direct.c b/ucw/fb-direct.c similarity index 97% rename from lib/fb-direct.c rename to ucw/fb-direct.c index 865bbb44..1c4409ac 100644 --- a/lib/fb-direct.c +++ b/ucw/fb-direct.c @@ -25,12 +25,12 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/lfs.h" -#include "lib/asio.h" -#include "lib/conf.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/lfs.h" +#include "ucw/asio.h" +#include "ucw/conf.h" +#include "ucw/threads.h" #include #include @@ -311,7 +311,7 @@ fbdir_open_fd_internal(int fd, const char *name, struct asio_queue *q, uns buffe #ifdef TEST -#include "lib/getopt.h" +#include "ucw/getopt.h" int main(int argc, char **argv) { diff --git a/lib/fb-file.c b/ucw/fb-file.c similarity index 98% rename from lib/fb-file.c rename to ucw/fb-file.c index 30f8eac5..7e3e73e4 100644 --- a/lib/fb-file.c +++ b/ucw/fb-file.c @@ -8,9 +8,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/lfs.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/lfs.h" #include #include diff --git a/lib/fb-grow.c b/ucw/fb-grow.c similarity index 98% rename from lib/fb-grow.c rename to ucw/fb-grow.c index f9a654a4..4d98d315 100644 --- a/lib/fb-grow.c +++ b/ucw/fb-grow.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/fb-limfd.c b/ucw/fb-limfd.c similarity index 97% rename from lib/fb-limfd.c rename to ucw/fb-limfd.c index 50bc5215..a1c218aa 100644 --- a/lib/fb-limfd.c +++ b/ucw/fb-limfd.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include diff --git a/lib/fb-mem.c b/ucw/fb-mem.c similarity index 98% rename from lib/fb-mem.c rename to ucw/fb-mem.c index c304e16d..40b9f1e5 100644 --- a/lib/fb-mem.c +++ b/ucw/fb-mem.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include diff --git a/lib/fb-mmap.c b/ucw/fb-mmap.c similarity index 98% rename from lib/fb-mmap.c rename to ucw/fb-mmap.c index a57d1034..0932814f 100644 --- a/lib/fb-mmap.c +++ b/ucw/fb-mmap.c @@ -9,10 +9,10 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/lfs.h" -#include "lib/conf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/lfs.h" +#include "ucw/conf.h" #include #include diff --git a/lib/fb-param.c b/ucw/fb-param.c similarity index 98% rename from lib/fb-param.c rename to ucw/fb-param.c index 8c51927f..bde4b58f 100644 --- a/lib/fb-param.c +++ b/ucw/fb-param.c @@ -8,10 +8,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/lfs.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/lfs.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/fb-pool.c b/ucw/fb-pool.c similarity index 95% rename from lib/fb-pool.c rename to ucw/fb-pool.c index e847b7d0..b55f0903 100644 --- a/lib/fb-pool.c +++ b/ucw/fb-pool.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/fb-socket.c b/ucw/fb-socket.c similarity index 97% rename from lib/fb-socket.c rename to ucw/fb-socket.c index 841e0cf0..dce8fffd 100644 --- a/lib/fb-socket.c +++ b/ucw/fb-socket.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/fb-socket.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/fb-socket.h" #include #include diff --git a/lib/fb-socket.h b/ucw/fb-socket.h similarity index 96% rename from lib/fb-socket.h rename to ucw/fb-socket.h index ff5ae7d0..b8008604 100644 --- a/lib/fb-socket.h +++ b/ucw/fb-socket.h @@ -10,7 +10,7 @@ #ifndef _UCW_FB_SOCKET_H #define _UCW_FB_SOCKET_H -#include "lib/fastbuf.h" +#include "ucw/fastbuf.h" struct fbsock_params { int fd; diff --git a/lib/fb-socket.t b/ucw/fb-socket.t similarity index 71% rename from lib/fb-socket.t rename to ucw/fb-socket.t index 32f49acb..91c8d5e4 100644 --- a/lib/fb-socket.t +++ b/ucw/fb-socket.t @@ -1,5 +1,5 @@ # Tests for the fb-socket module Name: fb-socket -Run: ../obj/lib/fb-socket-t +Run: ../obj/ucw/fb-socket-t Out: WRITE TIMEOUT diff --git a/lib/fb-temp.c b/ucw/fb-temp.c similarity index 93% rename from lib/fb-temp.c rename to ucw/fb-temp.c index 1975c8cc..d6546e38 100644 --- a/lib/fb-temp.c +++ b/ucw/fb-temp.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/fastbuf.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/fastbuf.h" +#include "ucw/threads.h" #include #include @@ -69,7 +69,7 @@ void bfix_tmp_file(struct fastbuf *fb, const char *name) #ifdef TEST -#include "lib/getopt.h" +#include "ucw/getopt.h" int main(int argc, char **argv) { diff --git a/lib/ff-binary.c b/ucw/ff-binary.c similarity index 92% rename from lib/ff-binary.c rename to ucw/ff-binary.c index 81d36dfa..47163f29 100644 --- a/lib/ff-binary.c +++ b/ucw/ff-binary.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/ff-binary.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/ff-binary.h" #define GEN(type, name, size, endian) \ type bget##name##_##endian##_slow(struct fastbuf *f) \ diff --git a/lib/ff-binary.h b/ucw/ff-binary.h similarity index 97% rename from lib/ff-binary.h rename to ucw/ff-binary.h index 171ff811..edba770c 100644 --- a/lib/ff-binary.h +++ b/ucw/ff-binary.h @@ -11,8 +11,8 @@ #ifndef _UCW_FF_BINARY_H #define _UCW_FF_BINARY_H -#include "lib/fastbuf.h" -#include "lib/unaligned.h" +#include "ucw/fastbuf.h" +#include "ucw/unaligned.h" #ifdef CPU_BIG_ENDIAN #define FF_ENDIAN be diff --git a/lib/ff-printf.c b/ucw/ff-printf.c similarity index 96% rename from lib/ff-printf.c rename to ucw/ff-printf.c index 0493092e..ad80e413 100644 --- a/lib/ff-printf.c +++ b/ucw/ff-printf.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/ff-string.c b/ucw/ff-string.c similarity index 98% rename from lib/ff-string.c rename to ucw/ff-string.c index 913c3353..5b4b8b9c 100644 --- a/lib/ff-string.c +++ b/ucw/ff-string.c @@ -8,10 +8,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/mempool.h" -#include "lib/bbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/mempool.h" +#include "ucw/bbuf.h" char * /* Non-standard */ bgets(struct fastbuf *f, char *b, uns l) diff --git a/lib/ff-unicode.c b/ucw/ff-unicode.c similarity index 98% rename from lib/ff-unicode.c rename to ucw/ff-unicode.c index 6057e240..6de5a107 100644 --- a/lib/ff-unicode.c +++ b/ucw/ff-unicode.c @@ -8,11 +8,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/unicode.h" -#include "lib/ff-unicode.h" -#include "lib/ff-binary.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/unicode.h" +#include "ucw/ff-unicode.h" +#include "ucw/ff-binary.h" /*** UTF-8 ***/ diff --git a/lib/ff-unicode.h b/ucw/ff-unicode.h similarity index 98% rename from lib/ff-unicode.h rename to ucw/ff-unicode.h index af39bbda..58c75d85 100644 --- a/lib/ff-unicode.h +++ b/ucw/ff-unicode.h @@ -12,8 +12,8 @@ #ifndef _UCW_FF_UNICODE_H #define _UCW_FF_UNICODE_H -#include "lib/fastbuf.h" -#include "lib/unicode.h" +#include "ucw/fastbuf.h" +#include "ucw/unicode.h" /*** UTF-8 ***/ diff --git a/lib/ff-unicode.t b/ucw/ff-unicode.t similarity index 71% rename from lib/ff-unicode.t rename to ucw/ff-unicode.t index 2a8b3df5..ec089a66 100644 --- a/lib/ff-unicode.t +++ b/ucw/ff-unicode.t @@ -1,41 +1,41 @@ # Tests for the Unicode module Name: bput_utf8 -Run: ../obj/lib/ff-unicode-t bput_utf8 +Run: ../obj/ucw/ff-unicode-t bput_utf8 In: 0041 0048 004f 004a Out: 41 48 4f 4a Name: bget_utf8_32 -Run: ../obj/lib/ff-unicode-t bget_utf8_32 +Run: ../obj/ucw/ff-unicode-t bget_utf8_32 In: fe 83 81 Out: fffc Name: bput_utf16_be -Run: ../obj/lib/ff-unicode-t bput_utf16_be +Run: ../obj/ucw/ff-unicode-t bput_utf16_be In: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Out: 00 41 00 4a 2a 5f fe ff 00 00 db ff df ff ff ff d8 00 dc 00 Name: bput_utf16_le -Run: ../obj/lib/ff-unicode-t bput_utf16_le +Run: ../obj/ucw/ff-unicode-t bput_utf16_le In: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Out: 41 00 4a 00 5f 2a ff fe 00 00 ff db ff df ff ff 00 d8 00 dc Name: bget_utf16_be (1) -Run: ../obj/lib/ff-unicode-t bget_utf16_be +Run: ../obj/ucw/ff-unicode-t bget_utf16_be In: 00 41 00 4a 2a 5f fe ff 00 00 db ff df ff ff ff d8 00 dc 00 Out: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Name: bget_utf16_be (2) -Run: ../obj/lib/ff-unicode-t bget_utf16_be +Run: ../obj/ucw/ff-unicode-t bget_utf16_be In: dc 1a 2a 5f d8 01 d8 01 2a 5f d8 01 Out: fffc 2a5f fffc 2a5f fffc Name: bget_utf16_le (1) -Run: ../obj/lib/ff-unicode-t bget_utf16_le +Run: ../obj/ucw/ff-unicode-t bget_utf16_le In: 41 00 4a 00 5f 2a ff fe 00 00 ff db ff df ff ff 00 d8 00 dc Out: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Name: bget_utf16_le (2) -Run: ../obj/lib/ff-unicode-t bget_utf16_le +Run: ../obj/ucw/ff-unicode-t bget_utf16_le In: 1a dc 5f 2a 01 d8 01 d8 5f 2a 01 d8 Out: fffc 2a5f fffc 2a5f fffc diff --git a/lib/gbuf.h b/ucw/gbuf.h similarity index 100% rename from lib/gbuf.h rename to ucw/gbuf.h diff --git a/lib/getopt.c b/ucw/getopt.c similarity index 95% rename from lib/getopt.c rename to ucw/getopt.c index a15c9355..61857184 100644 --- a/lib/getopt.c +++ b/ucw/getopt.c @@ -1,5 +1,5 @@ -#include "lib/lib.h" -#include "lib/getopt.h" +#include "ucw/lib.h" +#include "ucw/getopt.h" void reset_getopt(void) diff --git a/lib/getopt.h b/ucw/getopt.h similarity index 98% rename from lib/getopt.h rename to ucw/getopt.h index b4ff823f..531d2582 100644 --- a/lib/getopt.h +++ b/ucw/getopt.h @@ -12,7 +12,7 @@ #define _UCW_GETOPT_H #ifdef CONFIG_OWN_GETOPT -#include "lib/getopt/getopt-sh.h" +#include "ucw/getopt/getopt-sh.h" #else #include #endif diff --git a/lib/getopt.t b/ucw/getopt.t similarity index 76% rename from lib/getopt.t rename to ucw/getopt.t index 79e7fe2c..1fd2c742 100644 --- a/lib/getopt.t +++ b/ucw/getopt.t @@ -1,6 +1,6 @@ # Tests for getopt -Run: ../obj/lib/getopt-t -a -b --longc 2819 -d -a 1 2 3 +Run: ../obj/ucw/getopt-t -a -b --longc 2819 -d -a 1 2 3 Out: option a option b option c with value `2819' @@ -13,7 +13,7 @@ Out: option a option d with value `-a' 3 nonoption arguments -Run: ../obj/lib/getopt-t -a -x +Run: ../obj/ucw/getopt-t -a -x Out: option a unknown option reset diff --git a/lib/getopt/Makefile b/ucw/getopt/Makefile similarity index 86% rename from lib/getopt/Makefile rename to ucw/getopt/Makefile index 97692a27..bd5ab18e 100644 --- a/lib/getopt/Makefile +++ b/ucw/getopt/Makefile @@ -1,5 +1,5 @@ # Makefile for the UCW GetOpt Library (c) 2007 Pavel Charvat -DIRS+=lib/getopt +DIRS+=ucw/getopt LIBUCW_MODS+=getopt/getopt-sh diff --git a/lib/getopt/README b/ucw/getopt/README similarity index 100% rename from lib/getopt/README rename to ucw/getopt/README diff --git a/lib/getopt/getopt-sh.c b/ucw/getopt/getopt-sh.c similarity index 100% rename from lib/getopt/getopt-sh.c rename to ucw/getopt/getopt-sh.c diff --git a/lib/getopt/getopt-sh.h b/ucw/getopt/getopt-sh.h similarity index 89% rename from lib/getopt/getopt-sh.h rename to ucw/getopt/getopt-sh.h index 4597aca9..a1b24fbc 100644 --- a/lib/getopt/getopt-sh.h +++ b/ucw/getopt/getopt-sh.h @@ -9,6 +9,6 @@ #define opterr sh_opterr #define optopt sh_optopt -#include "lib/getopt/getopt.h" +#include "ucw/getopt/getopt.h" #endif diff --git a/lib/getopt/getopt.c b/ucw/getopt/getopt.c similarity index 100% rename from lib/getopt/getopt.c rename to ucw/getopt/getopt.c diff --git a/lib/getopt/getopt.h b/ucw/getopt/getopt.h similarity index 100% rename from lib/getopt/getopt.h rename to ucw/getopt/getopt.h diff --git a/lib/getopt/getopt1.c b/ucw/getopt/getopt1.c similarity index 100% rename from lib/getopt/getopt1.c rename to ucw/getopt/getopt1.c diff --git a/lib/getopt/getopt_init.c b/ucw/getopt/getopt_init.c similarity index 100% rename from lib/getopt/getopt_init.c rename to ucw/getopt/getopt_init.c diff --git a/lib/getopt/getopt_int.h b/ucw/getopt/getopt_int.h similarity index 100% rename from lib/getopt/getopt_int.h rename to ucw/getopt/getopt_int.h diff --git a/lib/hash-test.c b/ucw/hash-test.c similarity index 96% rename from lib/hash-test.c rename to ucw/hash-test.c index 803a0302..1f7aa711 100644 --- a/lib/hash-test.c +++ b/ucw/hash-test.c @@ -1,7 +1,7 @@ /* Tests for hash table routines */ -#include "lib/lib.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" #include #include @@ -30,7 +30,7 @@ static inline void test1_init_data(struct node1 *n) #define HASH_WANT_LOOKUP #define HASH_WANT_REMOVE -#include "lib/hashtable.h" +#include "ucw/hashtable.h" static void test1(void) { @@ -79,7 +79,7 @@ struct node2 { #define HASH_WANT_FIND #define HASH_WANT_NEW -#include "lib/hashtable.h" +#include "ucw/hashtable.h" static void test2(void) { @@ -122,7 +122,7 @@ struct node3 { #define HASH_USE_POOL pool3 -#include "lib/hashtable.h" +#include "ucw/hashtable.h" static void test3(void) { @@ -150,7 +150,7 @@ static void test3(void) /* TEST 4: complex keys */ -#include "lib/hashfunc.h" +#include "ucw/hashfunc.h" struct node4 { int port; @@ -195,7 +195,7 @@ static inline void test4_init_key(struct node4 *n, char *host, int port) n->port = port; } -#include "lib/hashtable.h" +#include "ucw/hashtable.h" static void test4(void) { @@ -266,7 +266,7 @@ static inline void test5_init_data(struct test5_table *table UNUSED, struct node #define HASH_WANT_NEW #define HASH_WANT_DELETE -#include "lib/hashtable.h" +#include "ucw/hashtable.h" static void test5(void) { diff --git a/ucw/hash-test.t b/ucw/hash-test.t new file mode 100644 index 00000000..ffa6a504 --- /dev/null +++ b/ucw/hash-test.t @@ -0,0 +1,13 @@ +# Tests for the hash table modules + +Run: ../obj/ucw/hash-test 1 +Out: OK + +Run: ../obj/ucw/hash-test 2 +Out: OK + +Run: ../obj/ucw/hash-test 3 +Out: OK + +Run: ../obj/ucw/hash-test 4 +Out: OK diff --git a/lib/hashfunc-test.c b/ucw/hashfunc-test.c similarity index 99% rename from lib/hashfunc-test.c rename to ucw/hashfunc-test.c index e289258a..8ff4fc0a 100644 --- a/lib/hashfunc-test.c +++ b/ucw/hashfunc-test.c @@ -3,7 +3,7 @@ * it is faster than the classical version ;-) */ -#include "lib/hashfunc.h" +#include "ucw/hashfunc.h" #include #include diff --git a/lib/hashfunc.c b/ucw/hashfunc.c similarity index 98% rename from lib/hashfunc.c rename to ucw/hashfunc.c index 8fca5f41..bfd76cfe 100644 --- a/lib/hashfunc.c +++ b/ucw/hashfunc.c @@ -11,9 +11,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/hashfunc.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/hashfunc.h" +#include "ucw/chartype.h" /* The number of bits the hash in the function hash_*() is rotated by after * every pass. It should be prime with the word size. */ diff --git a/lib/hashfunc.h b/ucw/hashfunc.h similarity index 98% rename from lib/hashfunc.h rename to ucw/hashfunc.h index a9fb1a31..49572882 100644 --- a/lib/hashfunc.h +++ b/ucw/hashfunc.h @@ -11,7 +11,7 @@ #ifndef _UCW_HASHFUNC_H #define _UCW_HASHFUNC_H -#include "lib/lib.h" +#include "ucw/lib.h" /* The following functions need str to be aligned to uns. */ uns str_len_aligned(const char *str) PURE; diff --git a/lib/hashtable.h b/ucw/hashtable.h similarity index 99% rename from lib/hashtable.h rename to ucw/hashtable.h index 552e88ea..355f83b4 100644 --- a/lib/hashtable.h +++ b/ucw/hashtable.h @@ -113,7 +113,7 @@ * * (For dynamic tables, use HASH_FOR_ALL_DYNAMIC(hash_prefix, hash_table, variable) instead.) * - * Then include "lib/hashtable.h" and voila, you have a hash table + * Then include "ucw/hashtable.h" and voila, you have a hash table * suiting all your needs (at least those which you've revealed :) ). * * After including this file, all parameter macros are automatically @@ -121,7 +121,7 @@ */ #ifndef _UCW_HASHFUNC_H -#include "lib/hashfunc.h" +#include "ucw/hashfunc.h" #endif #include @@ -324,7 +324,7 @@ static inline void P(cleanup_alloc) (TAU) { } #elif defined(HASH_USE_POOL) /* If the caller has requested to use his mempool, do so */ -#include "lib/mempool.h" +#include "ucw/mempool.h" static inline void * P(alloc) (TAUC unsigned int size) { return mp_alloc_fast(HASH_USE_POOL, size); } static inline void P(free) (TAUC void *x UNUSED) { } static inline void P(init_alloc) (TAU) { } @@ -332,7 +332,7 @@ static inline void P(cleanup_alloc) (TAU) { } #elif defined(HASH_AUTO_POOL) /* Use our own pools */ -#include "lib/mempool.h" +#include "ucw/mempool.h" static inline void * P(alloc) (TAUC unsigned int size) { return mp_alloc_fast(T.pool, size); } static inline void P(free) (TAUC void *x UNUSED) { } static inline void P(init_alloc) (TAU) { T.pool = mp_new(HASH_AUTO_POOL); } diff --git a/lib/heap.h b/ucw/heap.h similarity index 100% rename from lib/heap.h rename to ucw/heap.h diff --git a/lib/ipaccess.c b/ucw/ipaccess.c similarity index 94% rename from lib/ipaccess.c rename to ucw/ipaccess.c index 26bd1bb0..a01109c8 100644 --- a/lib/ipaccess.c +++ b/ucw/ipaccess.c @@ -7,12 +7,12 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/clists.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/fastbuf.h" -#include "lib/ipaccess.h" +#include "ucw/lib.h" +#include "ucw/clists.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/fastbuf.h" +#include "ucw/ipaccess.h" #include diff --git a/lib/ipaccess.h b/ucw/ipaccess.h similarity index 95% rename from lib/ipaccess.h rename to ucw/ipaccess.h index b4077838..fa163ea9 100644 --- a/lib/ipaccess.h +++ b/ucw/ipaccess.h @@ -10,7 +10,7 @@ #ifndef _UCW_IPACCESS_H #define _UCW_IPACCESS_H -#include "lib/clists.h" +#include "ucw/clists.h" extern struct cf_section ipaccess_cf; int ipaccess_check(clist *l, u32 ip); diff --git a/lib/kmp-search.h b/ucw/kmp-search.h similarity index 96% rename from lib/kmp-search.h rename to ucw/kmp-search.h index b702acc3..58d4172e 100644 --- a/lib/kmp-search.h +++ b/ucw/kmp-search.h @@ -12,7 +12,7 @@ * This is not a normal header file, it's a generator of KMP algorithm. * Each time you include it with parameters set in the corresponding * preprocessor macros, it generates KMP structures and functions - * with the parameters given. See lib/kmp.h before reading this description. + * with the parameters given. See ucw/kmp.h before reading this description. * * This file defines: * @@ -28,10 +28,10 @@ * * [*] KMPS_PREFIX(x) macro to add a name prefix (used on all global names * defined by the KMP search generator) - * [*] KMPS_KMP_PREFIX(x) prefix used for lib/kmp.h + * [*] KMPS_KMP_PREFIX(x) prefix used for ucw/kmp.h * * KMPS_SOURCE user-defined text source (together with KMPS_GET_CHAR); - * if unset, the one from lib/kmp.h is taken + * if unset, the one from ucw/kmp.h is taken * KMPS_GET_CHAR(kmp,src,search) analogy to KMP_GET_CHAR, but it must store the next character to search->c * * KMPS_ADD_CONTROLS add control characters (see KMP_CONTROL_CHAR in kmp.h) at both ends of the input string diff --git a/lib/kmp-test.c b/ucw/kmp-test.c similarity index 96% rename from lib/kmp-test.c rename to ucw/kmp-test.c index c066e6ea..4e8e3ca8 100644 --- a/lib/kmp-test.c +++ b/ucw/kmp-test.c @@ -4,8 +4,8 @@ * (c) 2006, Pavel Charvat */ -#include "lib/lib.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" #include #if 0 @@ -18,18 +18,18 @@ #define KMP_PREFIX(x) kmp1_##x #define KMP_WANT_CLEANUP -#include "lib/kmp.h" +#include "ucw/kmp.h" #define KMPS_PREFIX(x) kmp1s1_##x #define KMPS_KMP_PREFIX(x) kmp1_##x #define KMPS_WANT_BEST #define KMPS_EXIT(kmp,src,s) TRACE("Best match has %d characters", s->best->len) -#include "lib/kmp-search.h" +#include "ucw/kmp-search.h" #define KMPS_PREFIX(x) kmp1s2_##x #define KMPS_KMP_PREFIX(x) kmp1_##x #define KMPS_VARS uns count; #define KMPS_INIT(kmp,src,s) s->u.count = 0 #define KMPS_FOUND(kmp,src,s) s->u.count++ -#include "lib/kmp-search.h" +#include "ucw/kmp-search.h" static void test1(void) @@ -69,7 +69,7 @@ test1(void) #define KMPS_MERGE_CONTROLS #define KMPS_FOUND(kmp,src,s) TRACE("String %s with id %d found", s->out->u.str, s->out->u.id) #define KMPS_STEP(kmp,src,s) TRACE("Got to state %p after reading %d", s->s, s->c) -#include "lib/kmp.h" +#include "ucw/kmp.h" static void test2(void) @@ -102,7 +102,7 @@ test2(void) #define KMP_WANT_SEARCH #define KMPS_VARS uns sum, *cnt; #define KMPS_FOUND(kmp,src,s) do{ ASSERT(s->u.cnt[s->out->u.index]); s->u.cnt[s->out->u.index]--; s->u.sum--; }while(0) -#include "lib/kmp.h" +#include "ucw/kmp.h" static void test3(void) @@ -181,7 +181,7 @@ kmp4_hash(struct kmp4_struct *kmp UNUSED, struct kmp4_state *s, byte *c) #define KMPS_FOUND(kmp,src,s) TRACE("found") #define KMPS_ADD_CONTROLS #define KMPS_MERGE_CONTROLS -#include "lib/kmp.h" +#include "ucw/kmp.h" static void test4(void) diff --git a/lib/kmp-test.t b/ucw/kmp-test.t similarity index 52% rename from lib/kmp-test.t rename to ucw/kmp-test.t index bfcc1271..200c9ce3 100644 --- a/lib/kmp-test.t +++ b/ucw/kmp-test.t @@ -1,3 +1,3 @@ # Tests for the kmp module -Run: ../obj/lib/kmp-test +Run: ../obj/ucw/kmp-test diff --git a/lib/kmp.h b/ucw/kmp.h similarity index 97% rename from lib/kmp.h rename to ucw/kmp.h index 2c0633cd..629a4c84 100644 --- a/lib/kmp.h +++ b/ucw/kmp.h @@ -15,7 +15,7 @@ * with the parameters given. * * This file contains only construction of the automaton. The search - * itself can be generated by inclusion of file lib/kmp-search.h. + * itself can be generated by inclusion of file ucw/kmp-search.h. * Separeted headers allow the user to define multiple search * routines for one common set of key strings. * @@ -23,9 +23,9 @@ * * #define KMP_PREFIX(x) kmp_##x * #define KMP_WANT_CLEANUP - * #define KMP_WANT_SEARCH // includes lib/kmp-search.h automatically + * #define KMP_WANT_SEARCH // includes ucw/kmp-search.h automatically * #define KMPS_FOUND(kmp,src,s) printf("found\n") - * #include "lib/kmp.h" + * #include "ucw/kmp.h" * * [...] * @@ -88,7 +88,7 @@ * * Other parameters: * KMP_WANT_CLEANUP define cleanup() - * KMP_WANT_SEARCH includes lib/kmp-search.h with the same prefix; + * KMP_WANT_SEARCH includes ucw/kmp-search.h with the same prefix; * there can be multiple search variants for a single KMP automaton * KMP_USE_POOL allocates in a given pool * KMP_CONTROL_CHAR special control character (default is ':') @@ -108,7 +108,7 @@ #error Missing KMP_PREFIX #endif -#include "lib/mempool.h" +#include "ucw/mempool.h" #include #include @@ -240,7 +240,7 @@ P(hash_init_key) (struct P(hash_table) *t UNUSED, struct P(state) *s, struct P(s #endif #define HASH_CONSERVE_SPACE #define HASH_TABLE_DYNAMIC -#include "lib/hashtable.h" +#include "ucw/hashtable.h" #define P(x) KMP_PREFIX(x) struct P(struct) { @@ -267,13 +267,13 @@ P(get_char) (struct P(struct) *kmp UNUSED, P(source_t) *src UNUSED, P(char_t) *c } #else # if defined(KMP_USE_UTF8) -# include "lib/unicode.h" +# include "ucw/unicode.h" # if defined(KMP_ONLYALPHA) || defined(KMP_TOLOWER) || defined(KMP_UNACCENT) # include "charset/unicat.h" # endif # elif defined(KMP_USE_ASCII) # if defined(KMP_ONLYALPHA) || defined(KMP_TOLOWER) -# include "lib/chartype.h" +# include "ucw/chartype.h" # endif # endif static inline int @@ -457,7 +457,7 @@ P(build) (struct P(struct) *kmp) # undef KMP_WANT_SEARCH # define KMPS_PREFIX(x) KMP_PREFIX(x) # define KMPS_KMP_PREFIX(x) KMP_PREFIX(x) -# include "lib/kmp-search.h" +# include "ucw/kmp-search.h" #endif #undef KMP_PREFIX diff --git a/lib/lfs-test.c b/ucw/lfs-test.c similarity index 96% rename from lib/lfs-test.c rename to ucw/lfs-test.c index c92dcd5c..9646c365 100644 --- a/lib/lfs-test.c +++ b/ucw/lfs-test.c @@ -1,7 +1,7 @@ /* Test of large files */ -#include "lib/lib.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/lfs.h b/ucw/lfs.h similarity index 100% rename from lib/lfs.h rename to ucw/lfs.h diff --git a/lib/lib.h b/ucw/lib.h similarity index 99% rename from lib/lib.h rename to ucw/lib.h index 3dfea337..43a777e2 100644 --- a/lib/lib.h +++ b/ucw/lib.h @@ -13,7 +13,7 @@ #ifndef _UCW_LIB_H #define _UCW_LIB_H -#include "lib/config.h" +#include "ucw/config.h" #include /* Macros for handling structurues, offsets and alignment */ diff --git a/lib/libucw.pc b/ucw/libucw.pc similarity index 100% rename from lib/libucw.pc rename to ucw/libucw.pc diff --git a/lib/lists.c b/ucw/lists.c similarity index 96% rename from lib/lists.c rename to ucw/lists.c index 043c3649..c5c5b95f 100644 --- a/lib/lists.c +++ b/ucw/lists.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #define _UCW_LISTS_C -#include "lib/lists.h" +#include "ucw/lists.h" LIST_INLINE void add_tail(list *l, node *n) diff --git a/lib/lists.h b/ucw/lists.h similarity index 98% rename from lib/lists.h rename to ucw/lists.h index 39036913..7f3bf999 100644 --- a/lib/lists.h +++ b/ucw/lists.h @@ -55,7 +55,7 @@ void insert_node(node *, node *); #if !defined(_UCW_LISTS_C) && defined(__GNUC__) #define LIST_INLINE extern inline -#include "lib/lists.c" +#include "ucw/lists.c" #undef LIST_INLINE #else #define LIST_INLINE diff --git a/lib/lizard-safe.c b/ucw/lizard-safe.c similarity index 97% rename from lib/lizard-safe.c rename to ucw/lizard-safe.c index e8e8f6fa..96eeb438 100644 --- a/lib/lizard-safe.c +++ b/ucw/lizard-safe.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/threads.h" -#include "lib/lizard.h" +#include "ucw/lib.h" +#include "ucw/threads.h" +#include "ucw/lizard.h" #include #include diff --git a/lib/lizard-test.c b/ucw/lizard-test.c similarity index 95% rename from lib/lizard-test.c rename to ucw/lizard-test.c index 137cdc79..fb9830a6 100644 --- a/lib/lizard-test.c +++ b/ucw/lizard-test.c @@ -1,8 +1,8 @@ -#include "lib/lib.h" -#include "lib/getopt.h" -#include "lib/fastbuf.h" -#include "lib/ff-binary.h" -#include "lib/lizard.h" +#include "ucw/lib.h" +#include "ucw/getopt.h" +#include "ucw/fastbuf.h" +#include "ucw/ff-binary.h" +#include "ucw/lizard.h" #include #include #include diff --git a/lib/lizard.c b/ucw/lizard.c similarity index 99% rename from lib/lizard.c rename to ucw/lizard.c index 1da67ccd..f505b946 100644 --- a/lib/lizard.c +++ b/ucw/lizard.c @@ -10,8 +10,8 @@ * the compression method is based on zlib. */ -#include "lib/lib.h" -#include "lib/lizard.h" +#include "ucw/lib.h" +#include "ucw/lizard.h" #include diff --git a/lib/lizard.h b/ucw/lizard.h similarity index 100% rename from lib/lizard.h rename to ucw/lizard.h diff --git a/lib/log-file.c b/ucw/log-file.c similarity index 97% rename from lib/log-file.c rename to ucw/log-file.c index 0b22ff24..7bfeaa68 100644 --- a/lib/log-file.c +++ b/ucw/log-file.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/lfs.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/lfs.h" +#include "ucw/threads.h" #include #include diff --git a/lib/log.c b/ucw/log.c similarity index 99% rename from lib/log.c rename to ucw/log.c index f3ab51db..c312b9bf 100644 --- a/lib/log.c +++ b/ucw/log.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/mainloop.c b/ucw/mainloop.c similarity index 99% rename from lib/mainloop.c rename to ucw/mainloop.c index aeb79de4..f7994748 100644 --- a/lib/mainloop.c +++ b/ucw/mainloop.c @@ -9,8 +9,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/mainloop.h" +#include "ucw/lib.h" +#include "ucw/mainloop.h" #include #include diff --git a/lib/mainloop.h b/ucw/mainloop.h similarity index 99% rename from lib/mainloop.h rename to ucw/mainloop.h index 5c3baf68..e4992bc1 100644 --- a/lib/mainloop.h +++ b/ucw/mainloop.h @@ -10,7 +10,7 @@ #ifndef _UCW_MAINLOOP_H #define _UCW_MAINLOOP_H -#include "lib/clists.h" +#include "ucw/clists.h" extern timestamp_t main_now; /* Current time in milliseconds since UNIX epoch */ extern sh_time_t main_now_seconds; /* Current time in seconds since the epoch */ diff --git a/lib/md5.c b/ucw/md5.c similarity index 99% rename from lib/md5.c rename to ucw/md5.c index 24a27633..e692bf84 100644 --- a/lib/md5.c +++ b/ucw/md5.c @@ -15,8 +15,8 @@ * will fill a supplied 16-byte array with the digest. */ -#include "lib/lib.h" -#include "lib/md5.h" +#include "ucw/lib.h" +#include "ucw/md5.h" #include /* for memcpy() */ diff --git a/lib/md5.h b/ucw/md5.h similarity index 91% rename from lib/md5.h rename to ucw/md5.h index 29b61f4d..1ee97cfa 100644 --- a/lib/md5.h +++ b/ucw/md5.h @@ -1,7 +1,7 @@ /* * UCW Library -- MD5 Message Digest * - * This file is in public domain (see lib/md5.c). + * This file is in public domain (see ucw/md5.c). */ #ifndef _UCW_MD5_H diff --git a/lib/mempool-fmt.c b/ucw/mempool-fmt.c similarity index 97% rename from lib/mempool-fmt.c rename to ucw/mempool-fmt.c index 397a7721..e58ce275 100644 --- a/lib/mempool-fmt.c +++ b/ucw/mempool-fmt.c @@ -8,8 +8,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" #include #include diff --git a/lib/mempool-str.c b/ucw/mempool-str.c similarity index 97% rename from lib/mempool-str.c rename to ucw/mempool-str.c index 176ff3e2..136f5b4c 100644 --- a/lib/mempool-str.c +++ b/ucw/mempool-str.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" #include #include diff --git a/lib/mempool.c b/ucw/mempool.c similarity index 99% rename from lib/mempool.c rename to ucw/mempool.c index fee77f03..fe85a8c5 100644 --- a/lib/mempool.c +++ b/ucw/mempool.c @@ -10,8 +10,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/mempool.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" #include @@ -350,7 +350,7 @@ mp_pop(struct mempool *pool) #ifdef TEST -#include "lib/getopt.h" +#include "ucw/getopt.h" #include #include #include diff --git a/lib/mempool.h b/ucw/mempool.h similarity index 100% rename from lib/mempool.h rename to ucw/mempool.h diff --git a/lib/mempool.t b/ucw/mempool.t similarity index 68% rename from lib/mempool.t rename to ucw/mempool.t index 10c396e1..3aeb2558 100644 --- a/lib/mempool.t +++ b/ucw/mempool.t @@ -1,11 +1,11 @@ # Tests for mempool modules -Run: ../obj/lib/mempool-t +Run: ../obj/ucw/mempool-t -Run: ../obj/lib/mempool-fmt-t +Run: ../obj/ucw/mempool-fmt-t Out: -Run: ../obj/lib/mempool-str-t +Run: ../obj/ucw/mempool-str-t Out: <<12345>> bugs.gnats.insects bugsgnatsinsects diff --git a/lib/mmap.c b/ucw/mmap.c similarity index 97% rename from lib/mmap.c rename to ucw/mmap.c index 928da4bc..6b982369 100644 --- a/lib/mmap.c +++ b/ucw/mmap.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/pagecache.c b/ucw/pagecache.c similarity index 99% rename from lib/pagecache.c rename to ucw/pagecache.c index 13ad3660..4f135a46 100644 --- a/lib/pagecache.c +++ b/ucw/pagecache.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/pagecache.h" -#include "lib/lfs.h" +#include "ucw/lib.h" +#include "ucw/pagecache.h" +#include "ucw/lfs.h" #include #include diff --git a/lib/pagecache.h b/ucw/pagecache.h similarity index 98% rename from lib/pagecache.h rename to ucw/pagecache.h index ef4bf5af..36251a5c 100644 --- a/lib/pagecache.h +++ b/ucw/pagecache.h @@ -10,7 +10,7 @@ #ifndef _UCW_PAGECACHE_H #define _UCW_PAGECACHE_H -#include "lib/lists.h" +#include "ucw/lists.h" struct page_cache; diff --git a/lib/partmap.c b/ucw/partmap.c similarity index 97% rename from lib/partmap.c rename to ucw/partmap.c index 2b70f1d9..c2b90f8f 100644 --- a/lib/partmap.c +++ b/ucw/partmap.c @@ -8,9 +8,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/lfs.h" -#include "lib/partmap.h" +#include "ucw/lib.h" +#include "ucw/lfs.h" +#include "ucw/partmap.h" #include #include diff --git a/lib/partmap.h b/ucw/partmap.h similarity index 100% rename from lib/partmap.h rename to ucw/partmap.h diff --git a/lib/perl/CGI.pm b/ucw/perl/CGI.pm similarity index 100% rename from lib/perl/CGI.pm rename to ucw/perl/CGI.pm diff --git a/lib/perl/Config.pm b/ucw/perl/Config.pm similarity index 100% rename from lib/perl/Config.pm rename to ucw/perl/Config.pm diff --git a/lib/perl/Configure.pm b/ucw/perl/Configure.pm similarity index 98% rename from lib/perl/Configure.pm rename to ucw/perl/Configure.pm index a6c30179..69fe3ea9 100644 --- a/lib/perl/Configure.pm +++ b/ucw/perl/Configure.pm @@ -168,7 +168,7 @@ sub Finish() { } `rm -rf obj` if -d "obj"; Fail "Cannot delete old obj directory" if $?; -d "obj" or mkdir("obj", 0777) or Fail "Cannot create obj directory: $!"; - -d "obj/lib" or mkdir("obj/lib", 0777) or Fail "Cannot create obj/lib directory: $!"; + -d "obj/ucw" or mkdir("obj/ucw", 0777) or Fail "Cannot create obj/ucw directory: $!"; Log "done\n"; Log "Generating autoconf.h ... "; diff --git a/lib/perl/Filelock/Filelock.pm b/ucw/perl/Filelock/Filelock.pm similarity index 100% rename from lib/perl/Filelock/Filelock.pm rename to ucw/perl/Filelock/Filelock.pm diff --git a/lib/perl/Filelock/Filelock.xs b/ucw/perl/Filelock/Filelock.xs similarity index 100% rename from lib/perl/Filelock/Filelock.xs rename to ucw/perl/Filelock/Filelock.xs diff --git a/lib/perl/Filelock/MANIFEST b/ucw/perl/Filelock/MANIFEST similarity index 100% rename from lib/perl/Filelock/MANIFEST rename to ucw/perl/Filelock/MANIFEST diff --git a/lib/perl/Filelock/Makefile b/ucw/perl/Filelock/Makefile similarity index 70% rename from lib/perl/Filelock/Makefile rename to ucw/perl/Filelock/Makefile index de94cc0f..3ebd396b 100644 --- a/lib/perl/Filelock/Makefile +++ b/ucw/perl/Filelock/Makefile @@ -1,13 +1,13 @@ # Makefile for the Filelock Perl module (c) 2007 Pavel Chrvat -DIRS+=lib/perl/Filelock/arch/auto/UCW/Filelock -FILELOCK_DIR=lib/perl/Filelock +DIRS+=ucw/perl/Filelock/arch/auto/UCW/Filelock +FILELOCK_DIR=ucw/perl/Filelock -PROGS+=$(o)/lib/perl/Filelock/Filelock.pm +PROGS+=$(o)/ucw/perl/Filelock/Filelock.pm -extras:: $(o)/lib/perl/Filelock/arch/auto/UCW/Filelock/Filelock.$(SOEXT) +extras:: $(o)/ucw/perl/Filelock/arch/auto/UCW/Filelock/Filelock.$(SOEXT) -$(o)/lib/perl/Filelock/arch/auto/UCW/Filelock/Filelock.$(SOEXT): $(o)/$(FILELOCK_DIR)/Filelock.xs $(o)/$(FILELOCK_DIR)/Filelock.pm $(o)/$(FILELOCK_DIR)/Makefile +$(o)/ucw/perl/Filelock/arch/auto/UCW/Filelock/Filelock.$(SOEXT): $(o)/$(FILELOCK_DIR)/Filelock.xs $(o)/$(FILELOCK_DIR)/Filelock.pm $(o)/$(FILELOCK_DIR)/Makefile $(M)MAKE $@ $(Q)cd $(o)/$(FILELOCK_DIR) && $(MAKE) -f Makefile $(MAKESILENT) $(Q)touch $@ diff --git a/lib/perl/Filelock/Makefile.PL b/ucw/perl/Filelock/Makefile.PL similarity index 100% rename from lib/perl/Filelock/Makefile.PL rename to ucw/perl/Filelock/Makefile.PL diff --git a/lib/perl/Log.pm b/ucw/perl/Log.pm similarity index 100% rename from lib/perl/Log.pm rename to ucw/perl/Log.pm diff --git a/ucw/perl/Makefile b/ucw/perl/Makefile new file mode 100644 index 00000000..293ea216 --- /dev/null +++ b/ucw/perl/Makefile @@ -0,0 +1,10 @@ +# Perl modules + +DIRS+=ucw/perl +EXTRA_RUNDIRS+=lib/perl5/UCW +PROGS+=$(addprefix $(o)/ucw/perl/,Config.pm Log.pm CGI.pm) + +ifdef CONFIG_UCW_PERL_MODULES +include $(s)/ucw/perl/Ulimit/Makefile +include $(s)/ucw/perl/Filelock/Makefile +endif diff --git a/lib/perl/Ulimit/MANIFEST b/ucw/perl/Ulimit/MANIFEST similarity index 100% rename from lib/perl/Ulimit/MANIFEST rename to ucw/perl/Ulimit/MANIFEST diff --git a/lib/perl/Ulimit/Makefile b/ucw/perl/Ulimit/Makefile similarity index 70% rename from lib/perl/Ulimit/Makefile rename to ucw/perl/Ulimit/Makefile index 8fc355bb..19064bb4 100644 --- a/lib/perl/Ulimit/Makefile +++ b/ucw/perl/Ulimit/Makefile @@ -1,13 +1,13 @@ # Makefile for the Ulimit Perl module (c) 2003 Tomas Valla -DIRS+=lib/perl/Ulimit/arch/auto/UCW/Ulimit -ULIMIT_DIR=lib/perl/Ulimit +DIRS+=ucw/perl/Ulimit/arch/auto/UCW/Ulimit +ULIMIT_DIR=ucw/perl/Ulimit -PROGS+=$(o)/lib/perl/Ulimit/Ulimit.pm +PROGS+=$(o)/ucw/perl/Ulimit/Ulimit.pm -extras:: $(o)/lib/perl/Ulimit/arch/auto/UCW/Ulimit/Ulimit.$(SOEXT) +extras:: $(o)/ucw/perl/Ulimit/arch/auto/UCW/Ulimit/Ulimit.$(SOEXT) -$(o)/lib/perl/Ulimit/arch/auto/UCW/Ulimit/Ulimit.$(SOEXT): $(o)/$(ULIMIT_DIR)/Ulimit.xs $(o)/$(ULIMIT_DIR)/Ulimit.pm $(o)/$(ULIMIT_DIR)/Makefile +$(o)/ucw/perl/Ulimit/arch/auto/UCW/Ulimit/Ulimit.$(SOEXT): $(o)/$(ULIMIT_DIR)/Ulimit.xs $(o)/$(ULIMIT_DIR)/Ulimit.pm $(o)/$(ULIMIT_DIR)/Makefile $(M)MAKE $@ $(Q)cd $(o)/$(ULIMIT_DIR) && $(MAKE) -f Makefile $(MAKESILENT) $(Q)touch $@ diff --git a/lib/perl/Ulimit/Makefile.PL b/ucw/perl/Ulimit/Makefile.PL similarity index 100% rename from lib/perl/Ulimit/Makefile.PL rename to ucw/perl/Ulimit/Makefile.PL diff --git a/lib/perl/Ulimit/Ulimit.pm b/ucw/perl/Ulimit/Ulimit.pm similarity index 100% rename from lib/perl/Ulimit/Ulimit.pm rename to ucw/perl/Ulimit/Ulimit.pm diff --git a/lib/perl/Ulimit/Ulimit.xs b/ucw/perl/Ulimit/Ulimit.xs similarity index 100% rename from lib/perl/Ulimit/Ulimit.xs rename to ucw/perl/Ulimit/Ulimit.xs diff --git a/lib/prefetch.h b/ucw/prefetch.h similarity index 91% rename from lib/prefetch.h rename to ucw/prefetch.h index 4c9c716b..e3358ce7 100644 --- a/lib/prefetch.h +++ b/ucw/prefetch.h @@ -24,7 +24,7 @@ static inline void prefetch(void *addr) } #else -#warning "Don't know how to prefetch on your CPU. Please fix lib/prefetch.h." +#warning "Don't know how to prefetch on your CPU. Please fix ucw/prefetch.h." #endif #ifndef HAVE_PREFETCH diff --git a/lib/prime.c b/ucw/prime.c similarity index 98% rename from lib/prime.c rename to ucw/prime.c index eec6f5d3..1139aa26 100644 --- a/lib/prime.c +++ b/ucw/prime.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" static int /* Sequential search */ __isprime(uns x) /* We know x != 2 && x != 3 */ diff --git a/lib/primetable.c b/ucw/primetable.c similarity index 97% rename from lib/primetable.c rename to ucw/primetable.c index 2e6fe5d8..efece4f3 100644 --- a/lib/primetable.c +++ b/ucw/primetable.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/binsearch.h" +#include "ucw/lib.h" +#include "ucw/binsearch.h" /* A table of odd primes, each is about 1.2 times the previous one */ static uns prime_table[] = { diff --git a/lib/proctitle.c b/ucw/proctitle.c similarity index 98% rename from lib/proctitle.c rename to ucw/proctitle.c index 4e154184..30e8c05d 100644 --- a/lib/proctitle.c +++ b/ucw/proctitle.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/profile.c b/ucw/profile.c similarity index 97% rename from lib/profile.c rename to ucw/profile.c index 83ff77c2..13af31ed 100644 --- a/lib/profile.c +++ b/ucw/profile.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/profile.h" +#include "ucw/lib.h" +#include "ucw/profile.h" #include diff --git a/lib/profile.h b/ucw/profile.h similarity index 99% rename from lib/profile.h rename to ucw/profile.h index 3704b449..67381060 100644 --- a/lib/profile.h +++ b/ucw/profile.h @@ -10,7 +10,7 @@ /* * Usage: * #define PROFILE_xxx - * #include "lib/profile.h" + * #include "ucw/profile.h" * prof_t cnt; * prof_init(&cnt); * ... diff --git a/lib/qache.c b/ucw/qache.c similarity index 99% rename from lib/qache.c rename to ucw/qache.c index 91536bf7..26b178cb 100644 --- a/lib/qache.c +++ b/ucw/qache.c @@ -6,11 +6,11 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/bitops.h" -#include "lib/fastbuf.h" -#include "lib/ff-binary.h" -#include "lib/qache.h" +#include "ucw/lib.h" +#include "ucw/bitops.h" +#include "ucw/fastbuf.h" +#include "ucw/ff-binary.h" +#include "ucw/qache.h" #include #include diff --git a/lib/qache.h b/ucw/qache.h similarity index 100% rename from lib/qache.h rename to ucw/qache.h diff --git a/lib/random.c b/ucw/random.c similarity index 97% rename from lib/random.c rename to ucw/random.c index a771c97a..bd9a1b30 100644 --- a/lib/random.c +++ b/ucw/random.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include diff --git a/lib/randomkey.c b/ucw/randomkey.c similarity index 96% rename from lib/randomkey.c rename to ucw/randomkey.c index a799a1b0..c1f40e87 100644 --- a/lib/randomkey.c +++ b/ucw/randomkey.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/realloc.c b/ucw/realloc.c similarity index 96% rename from lib/realloc.c rename to ucw/realloc.c index 6d6b0baf..ed3f1a43 100644 --- a/lib/realloc.c +++ b/ucw/realloc.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include diff --git a/lib/redblack-test.c b/ucw/redblack-test.c similarity index 98% rename from lib/redblack-test.c rename to ucw/redblack-test.c index 80a7a000..cd0efee1 100644 --- a/lib/redblack-test.c +++ b/ucw/redblack-test.c @@ -4,9 +4,9 @@ * (c) 2002, Robert Spalek */ -#include "lib/lib.h" -#include "lib/getopt.h" -#include "lib/fastbuf.h" +#include "ucw/lib.h" +#include "ucw/getopt.h" +#include "ucw/fastbuf.h" #include #include diff --git a/lib/redblack-test.t b/ucw/redblack-test.t similarity index 51% rename from lib/redblack-test.t rename to ucw/redblack-test.t index 3c08bbe0..d9aec082 100644 --- a/lib/redblack-test.t +++ b/ucw/redblack-test.t @@ -1,3 +1,3 @@ # Test for the redblack module -Run: ../obj/lib/redblack-test +Run: ../obj/ucw/redblack-test diff --git a/lib/redblack.h b/ucw/redblack.h similarity index 99% rename from lib/redblack.h rename to ucw/redblack.h index a89149b2..ad5ec771 100644 --- a/lib/redblack.h +++ b/ucw/redblack.h @@ -129,7 +129,7 @@ * } * TREE_END_FOR; * - * Then include "lib/redblack.h" and voila, you have a tree suiting all your + * Then include "ucw/redblack.h" and voila, you have a tree suiting all your * needs (at least those which you've revealed :) ). * * After including this file, all parameter macros are automatically diff --git a/lib/regex.c b/ucw/regex.c similarity index 98% rename from lib/regex.c rename to ucw/regex.c index 8eb24432..aa87d2c1 100644 --- a/lib/regex.c +++ b/ucw/regex.c @@ -8,10 +8,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/chartype.h" -#include "lib/hashfunc.h" -#include "lib/regex.h" +#include "ucw/lib.h" +#include "ucw/chartype.h" +#include "ucw/hashfunc.h" +#include "ucw/regex.h" #include #include @@ -209,7 +209,7 @@ rx_subst(regex *r, const char *by, const char *src, char *dest, uns destlen) /* BSD regular expression library */ #ifdef CONFIG_OWN_BSD_REGEX -#include "lib/regex/regex-sh.h" +#include "ucw/regex/regex-sh.h" #else #include #endif diff --git a/lib/regex.h b/ucw/regex.h similarity index 100% rename from lib/regex.h rename to ucw/regex.h diff --git a/lib/regex.t b/ucw/regex.t similarity index 77% rename from lib/regex.t rename to ucw/regex.t index 45b92a5d..f4876d77 100644 --- a/lib/regex.t +++ b/ucw/regex.t @@ -1,6 +1,6 @@ # Tests for the regex module -Run: ../obj/lib/regex-t 'a.*b.*c' +Run: ../obj/ucw/regex-t 'a.*b.*c' In: abc ajkhkbbbbbc Aabc @@ -8,7 +8,7 @@ Out: MATCH MATCH NO MATCH -Run: ../obj/lib/regex-t -i 'a.*b.*c' +Run: ../obj/ucw/regex-t -i 'a.*b.*c' In: aBc ajkhkbBBBBC Aabc @@ -16,7 +16,7 @@ Out: MATCH MATCH MATCH -Run: ../obj/lib/regex-t -i '(ahoj|nebo)' +Run: ../obj/ucw/regex-t -i '(ahoj|nebo)' In: Ahoj nEBo ahoja @@ -26,19 +26,19 @@ Out: MATCH NO MATCH NO MATCH -Run: ../obj/lib/regex-t '\(ahoj\)' +Run: ../obj/ucw/regex-t '\(ahoj\)' In: (ahoj) ahoj Out: MATCH NO MATCH -Run: ../obj/lib/regex-t '(.*b)*' +Run: ../obj/ucw/regex-t '(.*b)*' In: ababababab ababababababababababababababababababababababababababababa Out: MATCH NO MATCH -Run: ../obj/lib/regex-t '(.*)((aabb)|cc)(b.*)' '\1<\3>\4' +Run: ../obj/ucw/regex-t '(.*)((aabb)|cc)(b.*)' '\1<\3>\4' In: aaabbb aabbccb abcabc @@ -48,13 +48,13 @@ Out: ab NO MATCH aa<>bb -Run: ../obj/lib/regex-t '.*\?(.*&)*([a-z_]*sess[a-z_]*|random|sid|S_ID|rnd|timestamp|referer)=.*' +Run: ../obj/ucw/regex-t '.*\?(.*&)*([a-z_]*sess[a-z_]*|random|sid|S_ID|rnd|timestamp|referer)=.*' In: /nemecky/ubytovani/hotel.php?sort=&cislo=26&mena=EUR&typ=Hotel&luz1=ANO&luz2=ANO&luz3=&luz4=&luz5=&maxp1=99999&maxp2=99999&maxp3=99999&maxp4=99999&maxp5=99999&apart=&rada=8,9,10,11,19,22,26,27,28,29,3&cislo=26&mena=EUR&typ=Hotel&luz1=ANO&luz2=ANO&luz3=&luz4=&luz5=&maxp1=99999&maxp2=99999&maxp3=99999&maxp4=99999&maxp5=99999&apart=&rada=8,9,10,11,19,22,26,27,28,29,3&cislo=26&mena=EUR&typ=Hotel&luz1=ANO&luz2=ANO&luz3=&luz4=&luz5=&maxp1=99999&maxp2=99999&maxp3=99999&maxp4=99999&maxp5=99999&apart=&rada=8,9,10,11,19,22,26,27,28,29,3 /test...?f=1&s=3&sid=123&q=3& Out: NO MATCH MATCH -Run: ../obj/lib/regex-t '.*[0-9a-f]{8,16}.*' +Run: ../obj/ucw/regex-t '.*[0-9a-f]{8,16}.*' In: abcdabcdabcd aaaaaaaaaaaaaaaaaaaaaaaaaaaa asddajlkdkajlqwepoiequwiouio diff --git a/lib/runcmd.c b/ucw/runcmd.c similarity index 99% rename from lib/runcmd.c rename to ucw/runcmd.c index 0204e1db..9ea0a1a3 100644 --- a/lib/runcmd.c +++ b/ucw/runcmd.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/semaphore.h b/ucw/semaphore.h similarity index 100% rename from lib/semaphore.h rename to ucw/semaphore.h diff --git a/lib/sha1-hmac.c b/ucw/sha1-hmac.c similarity index 96% rename from lib/sha1-hmac.c rename to ucw/sha1-hmac.c index a2423492..2c4ee124 100644 --- a/lib/sha1-hmac.c +++ b/ucw/sha1-hmac.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/sha1.h" +#include "ucw/lib.h" +#include "ucw/sha1.h" #include @@ -53,7 +53,7 @@ sha1_hmac(byte *outbuf, const byte *key, uns keylen, const byte *data, uns datal #ifdef TEST #include -#include "lib/string.h" +#include "ucw/string.h" static uns rd(char *dest) { diff --git a/lib/sha1.c b/ucw/sha1.c similarity index 98% rename from lib/sha1.c rename to ucw/sha1.c index 74430c75..304cbabc 100644 --- a/lib/sha1.c +++ b/ucw/sha1.c @@ -11,9 +11,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/sha1.h" -#include "lib/unaligned.h" +#include "ucw/lib.h" +#include "ucw/sha1.h" +#include "ucw/unaligned.h" #include @@ -288,7 +288,7 @@ sha1_hash_buffer(byte *outbuf, const byte *buffer, uns length) #include #include -#include "lib/string.h" +#include "ucw/string.h" int main(void) { diff --git a/lib/sha1.h b/ucw/sha1.h similarity index 100% rename from lib/sha1.h rename to ucw/sha1.h diff --git a/lib/sha1.t b/ucw/sha1.t similarity index 87% rename from lib/sha1.t rename to ucw/sha1.t index 62696588..5c47604a 100644 --- a/lib/sha1.t +++ b/ucw/sha1.t @@ -1,65 +1,65 @@ # Tests of the SHA1 module Name: SHA1-1 -Run: echo -n "abc" | ../obj/lib/sha1-t +Run: echo -n "abc" | ../obj/ucw/sha1-t Out: a9993e364706816aba3e25717850c26c9cd0d89d Name: SHA1-2 -Run: echo -n "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" | ../obj/lib/sha1-t +Run: echo -n "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" | ../obj/ucw/sha1-t Out: 84983e441c3bd26ebaae4aa1f95129e5e54670f1 # Tests of SHA-1 HMAC specified in RFC 2202 Name: HMAC1 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b Hi There Out: b617318655057264e28bc0b6fb378c8ef146be00 Name: HMAC2 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: Jefe what do ya want for nothing? Out: effcdf6ae5eb2fa2d27416d5f184df9c259a7c79 Name: HMAC3 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd Out: 125d7342b9ac11cd91a39af48aa17b4f63f175d3 Name: HMAC4 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0x0102030405060708090a0b0c0d0e0f10111213141516171819 0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd Out: 4c9007f4026250c6bc8414f9bf50c86c2d7235da Name: HMAC5 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c Test With Truncation Out: 4c1a03424b55e07fe7f27be1d58bb9324a9a5a04 Name: HMAC6 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Test Using Larger Than Block-Size Key - Hash Key First Out: aa4ae5e15272d00e95705637ce8a3b55ed402112 Name: HMAC7 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data Out: e8e99d0f45237d786d6bbaa7965c7808bbff1a91 Name: HMAC8 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Test Using Larger Than Block-Size Key - Hash Key First Out: aa4ae5e15272d00e95705637ce8a3b55ed402112 Name: HMAC9 -Run: ../obj/lib/sha1-hmac-t +Run: ../obj/ucw/sha1-hmac-t In: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data Out: e8e99d0f45237d786d6bbaa7965c7808bbff1a91 diff --git a/ucw/shell/Makefile b/ucw/shell/Makefile new file mode 100644 index 00000000..f9f6e076 --- /dev/null +++ b/ucw/shell/Makefile @@ -0,0 +1,12 @@ +# Support routines for shell scripts + +DIRS+=ucw/shell +PROGS+=$(o)/ucw/shell/config $(o)/ucw/shell/logger +DATAFILES+=$(o)/ucw/shell/libucw.sh + +$(o)/ucw/shell/config: $(o)/ucw/shell/config.o $(LIBUCW) +$(o)/ucw/shell/logger: $(o)/ucw/shell/logger.o $(LIBUCW) + +TESTS+=$(addprefix $(o)/ucw/shell/,config.test) + +$(o)/ucw/shell/config.test: $(o)/ucw/shell/config diff --git a/lib/shell/config.c b/ucw/shell/config.c similarity index 97% rename from lib/shell/config.c rename to ucw/shell/config.c index 44ca4381..02ae4b07 100644 --- a/lib/shell/config.c +++ b/ucw/shell/config.c @@ -17,15 +17,15 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/getopt.h" -#include "lib/conf-internal.h" -#include "lib/clists.h" -#include "lib/mempool.h" -#include "lib/chartype.h" -#include "lib/bbuf.h" -#include "lib/string.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/getopt.h" +#include "ucw/conf-internal.h" +#include "ucw/clists.h" +#include "ucw/mempool.h" +#include "ucw/chartype.h" +#include "ucw/bbuf.h" +#include "ucw/string.h" #include #include diff --git a/lib/shell/config.t b/ucw/shell/config.t similarity index 78% rename from lib/shell/config.t rename to ucw/shell/config.t index a8aeb727..a90f2744 100644 --- a/lib/shell/config.t +++ b/ucw/shell/config.t @@ -1,6 +1,6 @@ # Tests for configuration parser -Run: ../obj/lib/shell/config -C/dev/null -S 'sec1{int1=23; long1=1234567812345678; long2=4321; str1="s1"; str2="s2"}' 'sec1 {#int1; ##long1; -str1; str2; #int2=123; ##long2=1234; #int3=0x10; #int4; $dbl1=001.100; $dbl2}; sec2{str3}' +Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{int1=23; long1=1234567812345678; long2=4321; str1="s1"; str2="s2"}' 'sec1 {#int1; ##long1; -str1; str2; #int2=123; ##long2=1234; #int3=0x10; #int4; $dbl1=001.100; $dbl2}; sec2{str3}' Out: CF_sec1_int1='23' CF_sec1_long1='1234567812345678' CF_sec1_str2='s2' @@ -12,13 +12,13 @@ Out: CF_sec1_int1='23' CF_sec1_dbl2='0' CF_sec2_str3='' -Run: ../obj/lib/shell/config -C/dev/null -S 'sec1{list1 1 a1 b1; list1:clear; list1 2 a2 b2 3 a3 b3}' 'sec1 {@list1 {#int1; str1; -str2}}' +Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{list1 1 a1 b1; list1:clear; list1 2 a2 b2 3 a3 b3}' 'sec1 {@list1 {#int1; str1; -str2}}' Out: CF_sec1_list1_int1[1]='2' CF_sec1_list1_str1[1]='a2' CF_sec1_list1_int1[2]='3' CF_sec1_list1_str1[2]='a3' -Run: ../obj/lib/shell/config -C/dev/null -S 'sec1{ar1 a b c d; ar1 a b c; ar2 1 2; ar3 1.1}' 'sec1 {ar1[]; #ar2[2]; $ar3[-2]}' +Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{ar1 a b c d; ar1 a b c; ar2 1 2; ar3 1.1}' 'sec1 {ar1[]; #ar2[2]; $ar3[-2]}' Out: CF_sec1_ar1[1]='a' CF_sec1_ar1[2]='b' CF_sec1_ar1[3]='c' @@ -26,7 +26,7 @@ Out: CF_sec1_ar1[1]='a' CF_sec1_ar2[2]='2' CF_sec1_ar3[1]='1.1' -Run: ../obj/lib/shell/config -C/dev/null -S 'sec1{list1 {str1=1; list2=a b c}; list1 {str1=2; list2=d e}}' 'sec1 {@list1 {str1; @list2{str2}}}' +Run: ../obj/ucw/shell/config -C/dev/null -S 'sec1{list1 {str1=1; list2=a b c}; list1 {str1=2; list2=d e}}' 'sec1 {@list1 {str1; @list2{str2}}}' Out: CF_sec1_list1_str1[1]='1' CF_sec1_list1_list2_str2[1]='a' CF_sec1_list1_list2_str2[2]='b' @@ -35,5 +35,5 @@ Out: CF_sec1_list1_str1[1]='1' CF_sec1_list1_list2_str2[4]='d' CF_sec1_list1_list2_str2[5]='e' -Run: ../obj/lib/shell/config -C/dev/null 'sec{str=a'\''b"c'\''d"\\e'\''f"g}' +Run: ../obj/ucw/shell/config -C/dev/null 'sec{str=a'\''b"c'\''d"\\e'\''f"g}' Out: CF_sec_str='ab"cd\e'\''fg' diff --git a/lib/shell/libucw.sh b/ucw/shell/libucw.sh similarity index 100% rename from lib/shell/libucw.sh rename to ucw/shell/libucw.sh diff --git a/lib/shell/logger.c b/ucw/shell/logger.c similarity index 97% rename from lib/shell/logger.c rename to ucw/shell/logger.c index 67315c9e..8d67abec 100644 --- a/lib/shell/logger.c +++ b/ucw/shell/logger.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/sighandler.c b/ucw/sighandler.c similarity index 96% rename from lib/sighandler.c rename to ucw/sighandler.c index 2739ba10..3f7daf22 100644 --- a/lib/sighandler.c +++ b/ucw/sighandler.c @@ -5,8 +5,8 @@ * (c) 2006 Martin Mares */ -#include "lib/lib.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/threads.h" #include #include diff --git a/lib/simple-lists.c b/ucw/simple-lists.c similarity index 90% rename from lib/simple-lists.c rename to ucw/simple-lists.c index 8f14a3fe..bd214b58 100644 --- a/lib/simple-lists.c +++ b/ucw/simple-lists.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" -#include "lib/conf.h" -#include "lib/simple-lists.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" +#include "ucw/conf.h" +#include "ucw/simple-lists.h" simp_node * simp_append(struct mempool *mp, clist *l) diff --git a/lib/simple-lists.h b/ucw/simple-lists.h similarity index 97% rename from lib/simple-lists.h rename to ucw/simple-lists.h index f553a6bf..e8bf6251 100644 --- a/lib/simple-lists.h +++ b/ucw/simple-lists.h @@ -10,7 +10,7 @@ #ifndef _UCW_SIMPLE_LISTS_H #define _UCW_SIMPLE_LISTS_H -#include "lib/clists.h" +#include "ucw/clists.h" typedef struct simp_node { cnode n; diff --git a/lib/slists.c b/ucw/slists.c similarity index 96% rename from lib/slists.c rename to ucw/slists.c index fffc64ec..35b26850 100644 --- a/lib/slists.c +++ b/ucw/slists.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/slists.h" +#include "ucw/lib.h" +#include "ucw/slists.h" static inline snode * slist_raw_prev(slist *l, snode *n) diff --git a/lib/slists.h b/ucw/slists.h similarity index 100% rename from lib/slists.h rename to ucw/slists.h diff --git a/lib/slists.t b/ucw/slists.t similarity index 66% rename from lib/slists.t rename to ucw/slists.t index fe642b1c..cb1b58fe 100644 --- a/lib/slists.t +++ b/ucw/slists.t @@ -1,4 +1,4 @@ # Test for slists module -Run: ../obj/lib/slists-t +Run: ../obj/ucw/slists-t Out: 9/7/3/1/2/4/8/10/ diff --git a/lib/sorter/Makefile b/ucw/sorter/Makefile similarity index 71% rename from lib/sorter/Makefile rename to ucw/sorter/Makefile index b54c05f4..a3e538e1 100644 --- a/lib/sorter/Makefile +++ b/ucw/sorter/Makefile @@ -1,13 +1,13 @@ # Makefile for the UCW Sorter (c) 2007 Martin Mares -DIRS+=lib/sorter +DIRS+=ucw/sorter LIBUCW_MODS+=$(addprefix sorter/, config govern sbuck array) LIBUCW_INCLUDES+=$(addprefix sorter/, array.h common.h s-fixint.h \ s-internal.h s-multiway.h s-radix.h s-twoway.h sorter.h) ifdef CONFIG_DEBUG_TOOLS -PROGS+=$(o)/lib/sorter/sort-test +PROGS+=$(o)/ucw/sorter/sort-test endif -$(o)/lib/sorter/sort-test: $(o)/lib/sorter/sort-test.o $(LIBUCW) +$(o)/ucw/sorter/sort-test: $(o)/ucw/sorter/sort-test.o $(LIBUCW) diff --git a/lib/sorter/TODO b/ucw/sorter/TODO similarity index 87% rename from lib/sorter/TODO rename to ucw/sorter/TODO index bd399e2a..18f885d2 100644 --- a/lib/sorter/TODO +++ b/ucw/sorter/TODO @@ -8,7 +8,7 @@ o When quicksorting a large input (especially in threaded case), invest more time to picking a good pivot. o Overlay presorter I/O with internal sorting. -Users of lib/sorter/array.h which might use radix-sorting: +Users of ucw/sorter/array.h which might use radix-sorting: indexer/chewer.c indexer/lexfreq.c indexer/mkgraph.c diff --git a/lib/sorter/array.c b/ucw/sorter/array.c similarity index 98% rename from lib/sorter/array.c rename to ucw/sorter/array.c index 6d655600..4c733aa3 100644 --- a/lib/sorter/array.c +++ b/ucw/sorter/array.c @@ -9,8 +9,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/sorter/common.h" +#include "ucw/lib.h" +#include "ucw/sorter/common.h" #include #include @@ -67,9 +67,9 @@ asort_radix(struct asort_context *ctx, void *array, void *buffer, uns num_elts, #ifdef CONFIG_UCW_THREADS -#include "lib/threads.h" -#include "lib/workqueue.h" -#include "lib/eltpool.h" +#include "ucw/threads.h" +#include "ucw/workqueue.h" +#include "ucw/eltpool.h" static uns asort_threads_use_count; static uns asort_threads_ready; diff --git a/lib/sorter/array.h b/ucw/sorter/array.h similarity index 98% rename from lib/sorter/array.h rename to ucw/sorter/array.h index 04a27d77..740b9b6e 100644 --- a/lib/sorter/array.h +++ b/ucw/sorter/array.h @@ -9,7 +9,7 @@ /* * This is a generator of routines for sorting huge arrays, similar to the one - * in lib/arraysort.h. It cannot handle discontiguous arrays, but it is able + * in ucw/arraysort.h. It cannot handle discontiguous arrays, but it is able * to employ radix-sorting if a monotone hash function is available and also * use several threads in parallel on SMP systems (this assumes that all * callbacks you provide are thread-safe). @@ -43,7 +43,7 @@ * If you do not use hashing, these parameters should be omitted. */ -#include "lib/sorter/common.h" +#include "ucw/sorter/common.h" #define Q(x) ASORT_PREFIX(x) diff --git a/lib/sorter/common.h b/ucw/sorter/common.h similarity index 99% rename from lib/sorter/common.h rename to ucw/sorter/common.h index ddd7ba6f..b577f3dc 100644 --- a/lib/sorter/common.h +++ b/ucw/sorter/common.h @@ -10,7 +10,7 @@ #ifndef _UCW_SORTER_COMMON_H #define _UCW_SORTER_COMMON_H -#include "lib/clists.h" +#include "ucw/clists.h" /* Configuration variables */ extern uns sorter_trace, sorter_trace_array, sorter_stream_bufsize; diff --git a/lib/sorter/config.c b/ucw/sorter/config.c similarity index 94% rename from lib/sorter/config.c rename to ucw/sorter/config.c index 9ff646b2..4b3bd921 100644 --- a/lib/sorter/config.c +++ b/ucw/sorter/config.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/conf.h" -#include "lib/fastbuf.h" -#include "lib/sorter/common.h" +#include "ucw/lib.h" +#include "ucw/conf.h" +#include "ucw/fastbuf.h" +#include "ucw/sorter/common.h" uns sorter_trace; uns sorter_trace_array; diff --git a/lib/sorter/govern.c b/ucw/sorter/govern.c similarity index 98% rename from lib/sorter/govern.c rename to ucw/sorter/govern.c index dbdbd477..c199381c 100644 --- a/lib/sorter/govern.c +++ b/ucw/sorter/govern.c @@ -7,11 +7,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/mempool.h" -#include "lib/stkstring.h" -#include "lib/sorter/common.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/mempool.h" +#include "ucw/stkstring.h" +#include "ucw/sorter/common.h" #include #include diff --git a/lib/sorter/s-fixint.h b/ucw/sorter/s-fixint.h similarity index 98% rename from lib/sorter/s-fixint.h rename to ucw/sorter/s-fixint.h index 20cce74b..6ab0924b 100644 --- a/lib/sorter/s-fixint.h +++ b/ucw/sorter/s-fixint.h @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/stkstring.h" +#include "ucw/stkstring.h" #define ASORT_PREFIX(x) SORT_PREFIX(array_##x) #define ASORT_KEY_TYPE P(key) @@ -18,7 +18,7 @@ # define ASORT_LONG_HASH # endif #endif -#include "lib/sorter/array.h" +#include "ucw/sorter/array.h" /* * This is a more efficient implementation of the internal sorter, diff --git a/lib/sorter/s-internal.h b/ucw/sorter/s-internal.h similarity index 99% rename from lib/sorter/s-internal.h rename to ucw/sorter/s-internal.h index 8cb869fc..0653a220 100644 --- a/lib/sorter/s-internal.h +++ b/ucw/sorter/s-internal.h @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/stkstring.h" +#include "ucw/stkstring.h" #ifdef SORT_INTERNAL_RADIX /* Keep copies of the items' hashes to save cache misses */ @@ -42,7 +42,7 @@ typedef struct { # define ASORT_LONG_HASH # endif #endif -#include "lib/sorter/array.h" +#include "ucw/sorter/array.h" /* * The big_buf has the following layout: diff --git a/lib/sorter/s-multiway.h b/ucw/sorter/s-multiway.h similarity index 100% rename from lib/sorter/s-multiway.h rename to ucw/sorter/s-multiway.h diff --git a/lib/sorter/s-radix.h b/ucw/sorter/s-radix.h similarity index 100% rename from lib/sorter/s-radix.h rename to ucw/sorter/s-radix.h diff --git a/lib/sorter/s-twoway.h b/ucw/sorter/s-twoway.h similarity index 100% rename from lib/sorter/s-twoway.h rename to ucw/sorter/s-twoway.h diff --git a/lib/sorter/sbuck.c b/ucw/sorter/sbuck.c similarity index 96% rename from lib/sorter/sbuck.c rename to ucw/sorter/sbuck.c index c6ebdeef..7ec26785 100644 --- a/lib/sorter/sbuck.c +++ b/ucw/sorter/sbuck.c @@ -7,11 +7,11 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/fastbuf.h" -#include "lib/mempool.h" -#include "lib/stkstring.h" -#include "lib/sorter/common.h" +#include "ucw/lib.h" +#include "ucw/fastbuf.h" +#include "ucw/mempool.h" +#include "ucw/stkstring.h" +#include "ucw/sorter/common.h" #include diff --git a/lib/sorter/sort-test.c b/ucw/sorter/sort-test.c similarity index 96% rename from lib/sorter/sort-test.c rename to ucw/sorter/sort-test.c index 4571d399..de9bf9a0 100644 --- a/lib/sorter/sort-test.c +++ b/ucw/sorter/sort-test.c @@ -7,14 +7,14 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/getopt.h" -#include "lib/conf.h" -#include "lib/fastbuf.h" -#include "lib/ff-binary.h" -#include "lib/hashfunc.h" -#include "lib/md5.h" -#include "lib/string.h" +#include "ucw/lib.h" +#include "ucw/getopt.h" +#include "ucw/conf.h" +#include "ucw/fastbuf.h" +#include "ucw/ff-binary.h" +#include "ucw/hashfunc.h" +#include "ucw/md5.h" +#include "ucw/string.h" #include #include @@ -62,7 +62,7 @@ struct key1 { #define SORT_INT(k) (k).x #define SORT_DELETE_INPUT 0 -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void test_int(int mode, u64 size) @@ -111,7 +111,7 @@ static inline void s2_write_merged(struct fastbuf *f, struct key2 **k, void **d #define SORT_UNIFY #define SORT_INT(k) (k).x -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void test_counted(int mode, u64 size) @@ -179,7 +179,7 @@ static inline uns s3_hash(struct key3 *x) #define SORT_OUTPUT_FB #define SORT_HASH_BITS 32 -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void gen_hash_key(int mode, struct key3 *k, uns i) @@ -287,7 +287,7 @@ static inline void s4_write_key(struct fastbuf *f, struct key4 *x) #define SORT_INPUT_FB #define SORT_OUTPUT_FB -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" #define s4b_compare s4_compare #define s4b_read_key s4_read_key @@ -305,7 +305,7 @@ static inline uns s4_data_size(struct key4 *x) #define SORT_INPUT_FB #define SORT_OUTPUT_FB -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void gen_key4(struct key4 *k) @@ -410,7 +410,7 @@ static int s5_gen(struct s5_pair *p) #define ASORT_KEY_TYPE u32 #define ASORT_ELT(i) ary[i] #define ASORT_EXTRA_ARGS , u32 *ary -#include "lib/arraysort.h" +#include "ucw/arraysort.h" static void s5_write_merged(struct fastbuf *f, struct key5 **keys, void **data, uns n, void *buf) { @@ -462,7 +462,7 @@ static inline int s5p_lt(struct s5_pair x, struct s5_pair y) #define ASORT_PREFIX(x) s5p_##x #define ASORT_KEY_TYPE struct s5_pair #define ASORT_LT(x,y) s5p_lt(x,y) -#include "lib/sorter/array.h" +#include "ucw/sorter/array.h" static int s5_presort(struct fastbuf *dest, void *buf, size_t bufsize) { @@ -497,7 +497,7 @@ static int s5_presort(struct fastbuf *dest, void *buf, size_t bufsize) #define SORT_OUTPUT_THIS_FB #define SORT_INT(k) (k).x -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" #define SORT_KEY_REGULAR struct key5 #define SORT_PREFIX(x) s5b_##x @@ -510,7 +510,7 @@ static int s5_presort(struct fastbuf *dest, void *buf, size_t bufsize) #define s5b_write_merged s5_write_merged #define s5b_copy_merged s5_copy_merged -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void test_graph(uns mode, u64 size) @@ -579,7 +579,7 @@ struct key6 { #define SORT_UNIQUE #define SORT_INT64(k) (k).x -#include "lib/sorter/sorter.h" +#include "ucw/sorter/sorter.h" static void test_int64(int mode, u64 size) diff --git a/lib/sorter/sorter.h b/ucw/sorter/sorter.h similarity index 97% rename from lib/sorter/sorter.h rename to ucw/sorter/sorter.h index 565a8de8..568ced03 100644 --- a/lib/sorter/sorter.h +++ b/ucw/sorter/sorter.h @@ -114,8 +114,8 @@ * undef'd. */ -#include "lib/sorter/common.h" -#include "lib/fastbuf.h" +#include "ucw/sorter/common.h" +#include "ucw/fastbuf.h" #include @@ -205,17 +205,17 @@ static inline void P(copy_merged)(P(key) **keys, struct fastbuf **data UNUSED, u #if defined(SORT_HASH_BITS) || defined(SORT_INT) #define SORT_INTERNAL_RADIX -#include "lib/sorter/s-radix.h" +#include "ucw/sorter/s-radix.h" #endif #if defined(SORT_VAR_KEY) || defined(SORT_VAR_DATA) || defined(SORT_UNIFY_WORKSPACE) -#include "lib/sorter/s-internal.h" +#include "ucw/sorter/s-internal.h" #else -#include "lib/sorter/s-fixint.h" +#include "ucw/sorter/s-fixint.h" #endif -#include "lib/sorter/s-twoway.h" -#include "lib/sorter/s-multiway.h" +#include "ucw/sorter/s-twoway.h" +#include "ucw/sorter/s-multiway.h" static struct fastbuf *P(sort)( #ifdef SORT_INPUT_FILE diff --git a/lib/stkstring.c b/ucw/stkstring.c similarity index 97% rename from lib/stkstring.c rename to ucw/stkstring.c index 1f087a2e..32bd9743 100644 --- a/lib/stkstring.c +++ b/ucw/stkstring.c @@ -9,9 +9,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/stkstring.h" -#include "lib/string.h" +#include "ucw/lib.h" +#include "ucw/stkstring.h" +#include "ucw/string.h" #include diff --git a/lib/stkstring.h b/ucw/stkstring.h similarity index 100% rename from lib/stkstring.h rename to ucw/stkstring.h diff --git a/lib/stkstring.t b/ucw/stkstring.t similarity index 78% rename from lib/stkstring.t rename to ucw/stkstring.t index bbb3eda5..125766c2 100644 --- a/lib/stkstring.t +++ b/ucw/stkstring.t @@ -1,6 +1,6 @@ # Tests for stkstring modules -Run: ../obj/lib/stkstring-t +Run: ../obj/ucw/stkstring-t Out: Beware the Jabberwock, my son! 42 65 77 The jaws that bite diff --git a/lib/str-esc.c b/ucw/str-esc.c similarity index 96% rename from lib/str-esc.c rename to ucw/str-esc.c index f9df3881..97bbe387 100644 --- a/lib/str-esc.c +++ b/ucw/str-esc.c @@ -10,9 +10,9 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/string.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/string.h" +#include "ucw/chartype.h" #include /* Expands C99-like escape sequences. diff --git a/lib/str-hex.c b/ucw/str-hex.c similarity index 95% rename from lib/str-hex.c rename to ucw/str-hex.c index 2c6946ed..57c3500a 100644 --- a/lib/str-hex.c +++ b/ucw/str-hex.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/string.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/string.h" +#include "ucw/chartype.h" static uns hex_make(uns x) diff --git a/lib/str-imatch.c b/ucw/str-imatch.c similarity index 82% rename from lib/str-imatch.c rename to ucw/str-imatch.c index 9d739efd..9d7de57a 100644 --- a/lib/str-imatch.c +++ b/ucw/str-imatch.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/chartype.h" +#include "ucw/lib.h" +#include "ucw/chartype.h" #define Convert(x) Cupcase(x) #define MATCH_FUNC_NAME str_match_pattern_nocase -#include "lib/str-match.h" +#include "ucw/str-match.h" diff --git a/lib/str-match.c b/ucw/str-match.c similarity index 86% rename from lib/str-match.c rename to ucw/str-match.c index 839da6ca..ca91141b 100644 --- a/lib/str-match.c +++ b/ucw/str-match.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #define Convert(x) (x) #define MATCH_FUNC_NAME str_match_pattern -#include "lib/str-match.h" +#include "ucw/str-match.h" diff --git a/lib/str-match.h b/ucw/str-match.h similarity index 97% rename from lib/str-match.h rename to ucw/str-match.h index ef8508a1..7b000c7c 100644 --- a/lib/str-match.h +++ b/ucw/str-match.h @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/string.h" +#include "ucw/string.h" int MATCH_FUNC_NAME(const char *p, const char *s) diff --git a/lib/str-split.c b/ucw/str-split.c similarity index 92% rename from lib/str-split.c rename to ucw/str-split.c index 97ce242a..0bb23600 100644 --- a/lib/str-split.c +++ b/ucw/str-split.c @@ -8,9 +8,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/chartype.h" -#include "lib/string.h" +#include "ucw/lib.h" +#include "ucw/chartype.h" +#include "ucw/string.h" #include diff --git a/lib/string.c b/ucw/string.c similarity index 91% rename from lib/string.c rename to ucw/string.c index 28fe36ef..c235292a 100644 --- a/lib/string.c +++ b/ucw/string.c @@ -10,8 +10,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/string.h" +#include "ucw/lib.h" +#include "ucw/string.h" char * str_format_flags(char *dest, const char *fmt, uns flags) diff --git a/lib/string.h b/ucw/string.h similarity index 100% rename from lib/string.h rename to ucw/string.h diff --git a/ucw/string.t b/ucw/string.t new file mode 100644 index 00000000..6173026c --- /dev/null +++ b/ucw/string.t @@ -0,0 +1,15 @@ +# Tests of string routines + +Run: ../obj/ucw/str-hex-t +Out: FEEDF00D + fe:ed:f0:0d + feedf00d + +Run: ../obj/ucw/str-esc-t '12\r\n\000\\\xff' +Out: 31 32 0d 0a 00 5c ff + +Run: ../obj/ucw/str-esc-t '\100\10a\1a' +Out: 40 08 61 01 61 + +Run: ../obj/ucw/str-esc-t '\a\b\f\r\n\t\v\?\"'"\\'" +Out: 07 08 0c 0d 0a 09 0b 3f 22 27 diff --git a/lib/sync.c b/ucw/sync.c similarity index 95% rename from lib/sync.c rename to ucw/sync.c index 6341415a..0f3ef788 100644 --- a/lib/sync.c +++ b/ucw/sync.c @@ -4,7 +4,7 @@ * (c) 2004--2005 Martin Mares */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/threads-conf.c b/ucw/threads-conf.c similarity index 88% rename from lib/threads-conf.c rename to ucw/threads-conf.c index f3ac5a2f..36820104 100644 --- a/lib/threads-conf.c +++ b/ucw/threads-conf.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/threads.h" -#include "lib/conf.h" +#include "ucw/lib.h" +#include "ucw/threads.h" +#include "ucw/conf.h" uns default_thread_stack_size = 65556; diff --git a/lib/threads.c b/ucw/threads.c similarity index 97% rename from lib/threads.c rename to ucw/threads.c index c7497f95..ec839f8c 100644 --- a/lib/threads.c +++ b/ucw/threads.c @@ -7,8 +7,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/threads.h" +#include "ucw/lib.h" +#include "ucw/threads.h" #ifdef CONFIG_UCW_THREADS diff --git a/lib/threads.h b/ucw/threads.h similarity index 100% rename from lib/threads.h rename to ucw/threads.h diff --git a/lib/timer.c b/ucw/timer.c similarity index 97% rename from lib/timer.c rename to ucw/timer.c index 761ab30e..54d82779 100644 --- a/lib/timer.c +++ b/ucw/timer.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" +#include "ucw/lib.h" #include #include diff --git a/lib/trie-test.c b/ucw/trie-test.c similarity index 97% rename from lib/trie-test.c rename to ucw/trie-test.c index d2ed9f34..cb9058c4 100644 --- a/lib/trie-test.c +++ b/ucw/trie-test.c @@ -9,8 +9,8 @@ #undef LOCAL_DEBUG -#include "lib/lib.h" -#include "lib/getopt.h" +#include "ucw/lib.h" +#include "ucw/getopt.h" #include #include @@ -26,7 +26,7 @@ #ifdef LOCAL_DEBUG #define TRIE_TRACE #endif -#include "lib/trie.h" +#include "ucw/trie.h" static void basic_test(void) @@ -55,7 +55,7 @@ basic_test(void) #ifdef LOCAL_DEBUG #define TRIE_TRACE #endif -#include "lib/trie.h" +#include "ucw/trie.h" static void dynamic_test(void) @@ -86,7 +86,7 @@ dynamic_test(void) #ifdef LOCAL_DEBUG #define TRIE_TRACE #endif -#include "lib/trie.h" +#include "ucw/trie.h" #define MAX_STRINGS 200 diff --git a/ucw/trie-test.t b/ucw/trie-test.t new file mode 100644 index 00000000..eadadc2a --- /dev/null +++ b/ucw/trie-test.t @@ -0,0 +1,7 @@ +# Tests for tries + +Run: ../obj/ucw/trie-test basic + +Run: ../obj/ucw/trie-test dynamic + +Run: ../obj/ucw/trie-test random diff --git a/lib/trie.h b/ucw/trie.h similarity index 99% rename from lib/trie.h rename to ucw/trie.h index d78d6d38..6363a213 100644 --- a/lib/trie.h +++ b/ucw/trie.h @@ -43,8 +43,8 @@ #ifndef _SHERLOCK_UCW_TRIE_H #define _SHERLOCK_UCW_TRIE_H -#include "lib/eltpool.h" -#include "lib/hashfunc.h" +#include "ucw/eltpool.h" +#include "ucw/hashfunc.h" #include diff --git a/lib/unaligned.h b/ucw/unaligned.h similarity index 100% rename from lib/unaligned.h rename to ucw/unaligned.h diff --git a/lib/unicode.c b/ucw/unicode.c similarity index 98% rename from lib/unicode.c rename to ucw/unicode.c index c5ffb826..8d537f54 100644 --- a/lib/unicode.c +++ b/ucw/unicode.c @@ -8,8 +8,8 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/unicode.h" +#include "ucw/lib.h" +#include "ucw/unicode.h" uns utf8_strlen(const byte *str) diff --git a/lib/unicode.h b/ucw/unicode.h similarity index 99% rename from lib/unicode.h rename to ucw/unicode.h index 9a3fe07a..54a8181d 100644 --- a/lib/unicode.h +++ b/ucw/unicode.h @@ -12,7 +12,7 @@ #ifndef _UCW_UNICODE_H #define _UCW_UNICODE_H -#include "lib/unaligned.h" +#include "ucw/unaligned.h" /* Macros for handling UTF-8 */ diff --git a/lib/unicode.t b/ucw/unicode.t similarity index 79% rename from lib/unicode.t rename to ucw/unicode.t index 1b5549ef..94e55f29 100644 --- a/lib/unicode.t +++ b/ucw/unicode.t @@ -1,71 +1,71 @@ # Tests for the Unicode module Name: utf8_put (1) -Run: ../obj/lib/unicode-t utf8_put +Run: ../obj/ucw/unicode-t utf8_put In: 0041 0048 004f 004a Out: 41 48 4f 4a Name: utf8_put (2) -Run: ../obj/lib/unicode-t utf8_put +Run: ../obj/ucw/unicode-t utf8_put In: 00aa 01aa 02a5 05a5 0a5a 15a5 2a5a 5a5a a5a5 Out: c2 aa c6 aa ca a5 d6 a5 e0 a9 9a e1 96 a5 e2 a9 9a e5 a9 9a ea 96 a5 Name: utf8_get (1) -Run: ../obj/lib/unicode-t utf8_get +Run: ../obj/ucw/unicode-t utf8_get In: 41 48 4f 4a Out: 0041 0048 004f 004a Name: utf8_get (2) -Run: ../obj/lib/unicode-t utf8_get +Run: ../obj/ucw/unicode-t utf8_get In: c2 aa c6 aa ca a5 d6 a5 e0 a9 9a e1 96 a5 e2 a9 9a e5 a9 9a ea 96 a5 Out: 00aa 01aa 02a5 05a5 0a5a 15a5 2a5a 5a5a a5a5 Name: utf8_get (3) -Run: ../obj/lib/unicode-t utf8_get +Run: ../obj/ucw/unicode-t utf8_get In: 84 ff f9 f8 c2 aa 41 Out: fffc fffc fffc fffc 00aa 0041 Name: utf8_32_put -Run: ../obj/lib/unicode-t utf8_32_put +Run: ../obj/ucw/unicode-t utf8_32_put In: 15a5a 2a5a5 5a5a5 a5a5a 15a5a5 2a5a5a 5a5a5a a5a5a5 15a5a5a 2a5a5a5 5a5a5a5 a5a5a5a 15a5a5a5 2a5a5a5a 5a5a5a5a Out: f0 95 a9 9a f0 aa 96 a5 f1 9a 96 a5 f2 a5 a9 9a f5 9a 96 a5 f8 8a a5 a9 9a f8 96 a5 a9 9a f8 a9 9a 96 a5 f9 96 a5 a9 9a fa a9 9a 96 a5 fc 85 a9 9a 96 a5 fc 8a 96 a5 a9 9a fc 95 a9 9a 96 a5 fc aa 96 a5 a9 9a fd 9a 96 a5 a9 9a Name: utf8_32_get (1) -Run: ../obj/lib/unicode-t utf8_32_get +Run: ../obj/ucw/unicode-t utf8_32_get In: f0 95 a9 9a f0 aa 96 a5 f1 9a 96 a5 f2 a5 a9 9a f5 9a 96 a5 f8 8a a5 a9 9a f8 96 a5 a9 9a f8 a9 9a 96 a5 f9 96 a5 a9 9a fa a9 9a 96 a5 fc 85 a9 9a 96 a5 fc 8a 96 a5 a9 9a fc 95 a9 9a 96 a5 fc aa 96 a5 a9 9a fd 9a 96 a5 a9 9a Out: 15a5a 2a5a5 5a5a5 a5a5a 15a5a5 2a5a5a 5a5a5a a5a5a5 15a5a5a 2a5a5a5 5a5a5a5 a5a5a5a 15a5a5a5 2a5a5a5a 5a5a5a5a Name: utf8_32_get (2) -Run: ../obj/lib/unicode-t utf8_32_get +Run: ../obj/ucw/unicode-t utf8_32_get In: fe 83 81 Out: fffc fffc fffc Name: utf16_be_put -Run: ../obj/lib/unicode-t utf16_be_put +Run: ../obj/ucw/unicode-t utf16_be_put In: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Out: 00 41 00 4a 2a 5f fe ff 00 00 db ff df ff ff ff d8 00 dc 00 Name: utf16_le_put -Run: ../obj/lib/unicode-t utf16_le_put +Run: ../obj/ucw/unicode-t utf16_le_put In: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Out: 41 00 4a 00 5f 2a ff fe 00 00 ff db ff df ff ff 00 d8 00 dc Name: utf16_be_get (1) -Run: ../obj/lib/unicode-t utf16_be_get +Run: ../obj/ucw/unicode-t utf16_be_get In: 00 41 00 4a 2a 5f fe ff 00 00 db ff df ff ff ff d8 00 dc 00 Out: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Name: utf16_be_get (2) -Run: ../obj/lib/unicode-t utf16_be_get +Run: ../obj/ucw/unicode-t utf16_be_get In: dc 1a 2a 5f d8 01 d8 01 2a 5f d8 01 Out: fffc 2a5f fffc fffc 2a5f fffc Name: utf16_le_get (1) -Run: ../obj/lib/unicode-t utf16_le_get +Run: ../obj/ucw/unicode-t utf16_le_get In: 41 00 4a 00 5f 2a ff fe 00 00 ff db ff df ff ff 00 d8 00 dc Out: 0041 004a 2a5f feff 0000 10ffff ffff 10000 Name: utf16_le_get (2) -Run: ../obj/lib/unicode-t utf16_le_get +Run: ../obj/ucw/unicode-t utf16_le_get In: 1a dc 5f 2a 01 d8 01 d8 5f 2a 01 d8 Out: fffc 2a5f fffc fffc 2a5f fffc diff --git a/lib/url.c b/ucw/url.c similarity index 99% rename from lib/url.c rename to ucw/url.c index 15a731fd..74d8c1d5 100644 --- a/lib/url.c +++ b/ucw/url.c @@ -15,10 +15,10 @@ * XXX: The buffer handling in this module is really horrible, but it works. */ -#include "lib/lib.h" -#include "lib/url.h" -#include "lib/chartype.h" -#include "lib/conf.h" +#include "ucw/lib.h" +#include "ucw/url.h" +#include "ucw/chartype.h" +#include "ucw/conf.h" #include #include diff --git a/lib/url.h b/ucw/url.h similarity index 100% rename from lib/url.h rename to ucw/url.h diff --git a/lib/wildmatch.c b/ucw/wildmatch.c similarity index 98% rename from lib/wildmatch.c rename to ucw/wildmatch.c index b14ea2d3..34fb66f5 100644 --- a/lib/wildmatch.c +++ b/ucw/wildmatch.c @@ -9,9 +9,9 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" -#include "lib/wildmatch.h" +#include "ucw/lib.h" +#include "ucw/mempool.h" +#include "ucw/wildmatch.h" #include #include diff --git a/lib/wildmatch.h b/ucw/wildmatch.h similarity index 100% rename from lib/wildmatch.h rename to ucw/wildmatch.h diff --git a/lib/workqueue.c b/ucw/workqueue.c similarity index 98% rename from lib/workqueue.c rename to ucw/workqueue.c index 8833e46f..314177b8 100644 --- a/lib/workqueue.c +++ b/ucw/workqueue.c @@ -7,10 +7,10 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/threads.h" -#include "lib/workqueue.h" -#include "lib/heap.h" +#include "ucw/lib.h" +#include "ucw/threads.h" +#include "ucw/workqueue.h" +#include "ucw/heap.h" static void * worker_thread_init(void *arg) diff --git a/lib/workqueue.h b/ucw/workqueue.h similarity index 98% rename from lib/workqueue.h rename to ucw/workqueue.h index b16a9947..bf2b8dac 100644 --- a/lib/workqueue.h +++ b/ucw/workqueue.h @@ -29,8 +29,8 @@ * until all of them finish. */ -#include "lib/semaphore.h" -#include "lib/clists.h" +#include "ucw/semaphore.h" +#include "ucw/clists.h" #include -- 2.39.2