From da66d5df84c8033b49fd848dde3c3677b31c63df Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Sun, 3 Aug 2014 07:42:49 +0100 Subject: [PATCH] Use new class interface and update copyright information --- include/tr/cbuf.h | 3 ++- include/tr/hash.h | 3 ++- include/tr/hash_value.h | 3 ++- include/tr/interface/hashable.h | 2 +- include/tr/queue.h | 3 ++- include/tr/tree.h | 3 ++- src/cbuf/addr_index.c | 2 +- src/cbuf/cbuf.c | 4 ++-- src/cbuf/empty.c | 2 +- src/cbuf/get_data.c | 2 +- src/cbuf/get_free.c | 2 +- src/cbuf/get_line.c | 2 +- src/cbuf/get_read.c | 2 +- src/cbuf/get_write.c | 2 +- src/cbuf/inc_read.c | 2 +- src/cbuf/inc_write.c | 2 +- src/cbuf/is_empty.c | 2 +- src/cbuf/is_locked.c | 2 +- src/cbuf/lock.c | 2 +- src/cbuf/memchr.c | 2 +- src/cbuf/read.c | 2 +- src/cbuf/release.c | 2 +- src/cbuf/set_data.c | 2 +- src/cbuf/skip_non_alpha.c | 2 +- src/hash/add.c | 2 +- src/hash/cleanup.c | 2 +- src/hash/delete.c | 2 +- src/hash/each.c | 2 +- src/hash/get.c | 2 +- src/hash/get_first.c | 2 +- src/hash/hash.c | 4 ++-- src/hash/value.c | 4 ++-- src/queue/get.c | 2 +- src/queue/put.c | 2 +- src/queue/queue.c | 4 ++-- src/tree/delete.c | 2 +- src/tree/destroy.c | 2 +- src/tree/find.c | 2 +- src/tree/insert.c | 2 +- src/tree/tree.c | 4 ++-- src/tree/walk.c | 2 +- trdata.h | 4 ++-- 42 files changed, 53 insertions(+), 48 deletions(-) diff --git a/include/tr/cbuf.h b/include/tr/cbuf.h index 2ea33f1..b63fffe 100644 --- a/include/tr/cbuf.h +++ b/include/tr/cbuf.h @@ -11,7 +11,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,6 +53,7 @@ TR_CLASS(TR_Cbuf) { size_t read; }; TR_INSTANCE_INIT(TR_Cbuf); +TR_CLASSVARS_DECL(TR_Cbuf) {}; ssize_t TR_cbufRead(TR_Cbuf, TR_Stream); ssize_t TR_cbufWrite(TR_Cbuf, TR_Stream); diff --git a/include/tr/hash.h b/include/tr/hash.h index 78325e9..3627581 100644 --- a/include/tr/hash.h +++ b/include/tr/hash.h @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +34,7 @@ TR_CLASS(TR_Hash) { TR_Tree root; }; TR_INSTANCE_INIT(TR_Hash); +TR_CLASSVARS_DECL(TR_Hash) {}; void * TR_hashAdd(TR_Hash, void *); void * TR_hashDelete(TR_Hash, const char *, size_t); diff --git a/include/tr/hash_value.h b/include/tr/hash_value.h index 3fade90..09557aa 100644 --- a/include/tr/hash_value.h +++ b/include/tr/hash_value.h @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ TR_CLASS(TR_HashValue) { size_t nvalue; }; TR_INSTANCE_INIT(TR_HashValue); +TR_CLASSVARS_DECL(TR_HashValue) {}; #endif // __TR_HASH_VALUE_H__ diff --git a/include/tr/interface/hashable.h b/include/tr/interface/hashable.h index d5a3860..116334e 100644 --- a/include/tr/interface/hashable.h +++ b/include/tr/interface/hashable.h @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/tr/queue.h b/include/tr/queue.h index 9856c38..bba1f04 100644 --- a/include/tr/queue.h +++ b/include/tr/queue.h @@ -7,7 +7,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,6 +48,7 @@ TR_CLASS(TR_Queue) { size_t nmsg; }; TR_INSTANCE_INIT(TR_Queue); +TR_CLASSVARS_DECL(TR_Queue) {}; void TR_queuePut(TR_Queue, void *); void * TR_queueGet(TR_Queue); diff --git a/include/tr/tree.h b/include/tr/tree.h index 8e58953..febcee6 100644 --- a/include/tr/tree.h +++ b/include/tr/tree.h @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ TR_CLASS(TR_Tree) { TR_Tree right; }; TR_INSTANCE_INIT(TR_Tree); +TR_CLASSVARS_DECL(TR_Tree) {}; typedef int (*TR_TreeComp)(const void *, const void *); typedef void (*TR_TreeAction)(const void *, const int); diff --git a/src/cbuf/addr_index.c b/src/cbuf/addr_index.c index 707ee6b..e02fbb2 100644 --- a/src/cbuf/addr_index.c +++ b/src/cbuf/addr_index.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/cbuf.c b/src/cbuf/cbuf.c index 4de747c..16ab4d3 100644 --- a/src/cbuf/cbuf.c +++ b/src/cbuf/cbuf.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,6 +118,6 @@ cbufDtor(void * _this) } TR_INIT_IFACE(TR_Class, cbufCtor, cbufDtor, NULL); -TR_CREATE_CLASS(TR_Cbuf, NULL, TR_IF(TR_Class)); +TR_CREATE_CLASS(TR_Cbuf, NULL, NULL, TR_IF(TR_Class)); // vim: set ts=4 sw=4: diff --git a/src/cbuf/empty.c b/src/cbuf/empty.c index a934a89..75a1c94 100644 --- a/src/cbuf/empty.c +++ b/src/cbuf/empty.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/get_data.c b/src/cbuf/get_data.c index 91ea8b6..53dfb56 100644 --- a/src/cbuf/get_data.c +++ b/src/cbuf/get_data.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/get_free.c b/src/cbuf/get_free.c index 66d4a28..c0a00c1 100644 --- a/src/cbuf/get_free.c +++ b/src/cbuf/get_free.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/get_line.c b/src/cbuf/get_line.c index bf292bd..a10fc54 100644 --- a/src/cbuf/get_line.c +++ b/src/cbuf/get_line.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/get_read.c b/src/cbuf/get_read.c index b63909c..07a133d 100644 --- a/src/cbuf/get_read.c +++ b/src/cbuf/get_read.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/get_write.c b/src/cbuf/get_write.c index eca363b..7eafbc6 100644 --- a/src/cbuf/get_write.c +++ b/src/cbuf/get_write.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/inc_read.c b/src/cbuf/inc_read.c index 2c955d7..f3e5796 100644 --- a/src/cbuf/inc_read.c +++ b/src/cbuf/inc_read.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/inc_write.c b/src/cbuf/inc_write.c index 153a070..d585a85 100644 --- a/src/cbuf/inc_write.c +++ b/src/cbuf/inc_write.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/is_empty.c b/src/cbuf/is_empty.c index cadec7e..7395ac2 100644 --- a/src/cbuf/is_empty.c +++ b/src/cbuf/is_empty.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/is_locked.c b/src/cbuf/is_locked.c index e26f1a5..dd84287 100644 --- a/src/cbuf/is_locked.c +++ b/src/cbuf/is_locked.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/lock.c b/src/cbuf/lock.c index f95443c..059fc8e 100644 --- a/src/cbuf/lock.c +++ b/src/cbuf/lock.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/memchr.c b/src/cbuf/memchr.c index 2c7e6e6..922ce5e 100644 --- a/src/cbuf/memchr.c +++ b/src/cbuf/memchr.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/read.c b/src/cbuf/read.c index 2b3c88b..4ce1a96 100644 --- a/src/cbuf/read.c +++ b/src/cbuf/read.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/release.c b/src/cbuf/release.c index f557da2..85ae4a0 100644 --- a/src/cbuf/release.c +++ b/src/cbuf/release.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/set_data.c b/src/cbuf/set_data.c index f21862c..e3aea81 100644 --- a/src/cbuf/set_data.c +++ b/src/cbuf/set_data.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/cbuf/skip_non_alpha.c b/src/cbuf/skip_non_alpha.c index d3be37e..2544c95 100644 --- a/src/cbuf/skip_non_alpha.c +++ b/src/cbuf/skip_non_alpha.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/add.c b/src/hash/add.c index d170c86..6ea8692 100644 --- a/src/hash/add.c +++ b/src/hash/add.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/cleanup.c b/src/hash/cleanup.c index 69bdd2d..4d0d808 100644 --- a/src/hash/cleanup.c +++ b/src/hash/cleanup.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/delete.c b/src/hash/delete.c index 00a203b..2013853 100644 --- a/src/hash/delete.c +++ b/src/hash/delete.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/each.c b/src/hash/each.c index 9f7a515..6138d01 100644 --- a/src/hash/each.c +++ b/src/hash/each.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/get.c b/src/hash/get.c index c407b89..fd439ca 100644 --- a/src/hash/get.c +++ b/src/hash/get.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/get_first.c b/src/hash/get_first.c index 8cef37e..d378cc2 100644 --- a/src/hash/get_first.c +++ b/src/hash/get_first.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/hash/hash.c b/src/hash/hash.c index 3e499c3..99773d0 100644 --- a/src/hash/hash.c +++ b/src/hash/hash.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,6 +44,6 @@ hashDtor(void * _this) } TR_INIT_IFACE(TR_Class, hashCtor, hashDtor, NULL); -TR_CREATE_CLASS(TR_Hash, NULL, TR_IF(TR_Class)); +TR_CREATE_CLASS(TR_Hash, NULL, NULL, TR_IF(TR_Class)); // vim: set ts=4 sw=4: diff --git a/src/hash/value.c b/src/hash/value.c index 3da3d44..2eaa306 100644 --- a/src/hash/value.c +++ b/src/hash/value.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -102,6 +102,6 @@ hashValueHandleDouble(void * _this, void * _double) TR_INIT_IFACE(TR_Class, hashValueCtor, hashValueDtor, NULL); TR_INIT_IFACE(TR_Hashable, hashValueGetHash, hashValueHandleDouble); -TR_CREATE_CLASS(TR_HashValue, NULL, TR_IF(TR_Class), TR_IF(TR_Hashable)); +TR_CREATE_CLASS(TR_HashValue, NULL, NULL, TR_IF(TR_Class), TR_IF(TR_Hashable)); // vim: set ts=4 sw=4: diff --git a/src/queue/get.c b/src/queue/get.c index e1a887f..0eea544 100644 --- a/src/queue/get.c +++ b/src/queue/get.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/queue/put.c b/src/queue/put.c index ac31127..803958c 100644 --- a/src/queue/put.c +++ b/src/queue/put.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/queue/queue.c b/src/queue/queue.c index 968537b..95382ec 100644 --- a/src/queue/queue.c +++ b/src/queue/queue.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,6 +48,6 @@ queueDtor(void * _this) } TR_INIT_IFACE(TR_Class, queueCtor, queueDtor, NULL); -TR_CREATE_CLASS(TR_Queue, NULL, TR_IF(TR_Class)); +TR_CREATE_CLASS(TR_Queue, NULL, NULL, TR_IF(TR_Class)); // vim: set ts=4 sw=4: diff --git a/src/tree/delete.c b/src/tree/delete.c index e12fc24..c23d44a 100644 --- a/src/tree/delete.c +++ b/src/tree/delete.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tree/destroy.c b/src/tree/destroy.c index 42cc1a2..70c6638 100644 --- a/src/tree/destroy.c +++ b/src/tree/destroy.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tree/find.c b/src/tree/find.c index d55aaa4..694eab4 100644 --- a/src/tree/find.c +++ b/src/tree/find.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tree/insert.c b/src/tree/insert.c index 5f95ada..4ff8b08 100644 --- a/src/tree/insert.c +++ b/src/tree/insert.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/tree/tree.c b/src/tree/tree.c index 245e7cd..7eeb635 100644 --- a/src/tree/tree.c +++ b/src/tree/tree.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,6 +49,6 @@ treeDtor(void * _this) } TR_INIT_IFACE(TR_Class, treeCtor, treeDtor, NULL); -TR_CREATE_CLASS(TR_Tree, NULL, TR_IF(TR_Class)); +TR_CREATE_CLASS(TR_Tree, NULL, NULL, TR_IF(TR_Class)); // vim: set ts=4 sw=4: diff --git a/src/tree/walk.c b/src/tree/walk.c index c96ddd5..89b10d5 100644 --- a/src/tree/walk.c +++ b/src/tree/walk.c @@ -4,7 +4,7 @@ * \author Georg Hopp * * \copyright - * Copyright © 2012 Georg Hopp + * Copyright © 2014 Georg Hopp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/trdata.h b/trdata.h index d8978cf..ae6b4fd 100644 --- a/trdata.h +++ b/trdata.h @@ -11,13 +11,13 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ -/* #undef HAVE_MEMSET */ +#define HAVE_MEMSET 1 /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 /* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ +#define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1