+#include <ccan/alignof/alignof.h>
#include <stdlib.h>
#include <stddef.h>
-#include <tap/tap.h>
-#include "alignof/alignof.h"
+#include <ccan/tap/tap.h>
/* Alignment is remarkably difficult to test. The rules may be more
* complex than ALIGNOF() can know: eg. on i386 __alignof__(double) == 8, but
-#include "alloc/alloc.h"
-#include "tap/tap.h"
-#include "alloc/alloc.c"
+#include <ccan/alloc/alloc.h>
+#include <ccan/tap/tap.h>
+#include <ccan/alloc/alloc.c>
#include <stdlib.h>
#include <stdbool.h>
#include <err.h>
-#include "alloc/alloc.h"
-#include "tap/tap.h"
-#include "alloc/alloc.c"
+#include <ccan/alloc/alloc.h>
+#include <ccan/tap/tap.h>
+#include <ccan/alloc/alloc.c>
#include <stdlib.h>
#include <err.h>
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
#include <unistd.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#define NUM_RUNS 100
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, int *pid)
{
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, void *unused)
{
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
#include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void *test(struct at_pool *atp, int *pid)
{
#include <stdio.h>
-#include <tap/tap.h>
-#include "array/array.h"
-#include "array/array.c"
+#include <ccan/tap/tap.h>
+#include <ccan/array/array.h>
+#include <ccan/array/array.c>
#define countof(array...) (sizeof(array)/sizeof(*(array)))
#include "lotsOfNumbers.h"
-#include "array_size/array_size.h"
+#include <ccan/array_size/array_size.h>
int main(int argc, char *argv[8])
{
-#include "array_size/array_size.h"
-#include "tap/tap.h"
+#include <ccan/array_size/array_size.h>
+#include <ccan/tap/tap.h>
static char array1[1];
static int array2[2];
-#include "block_pool/block_pool.h"
-#include "block_pool/block_pool.c"
-#include "tap/tap.h"
+#include <ccan/block_pool/block_pool.h>
+#include <ccan/block_pool/block_pool.c>
+#include <ccan/tap/tap.h>
struct alloc_record {
size_t size;
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
-#include "build_assert/build_assert.h"
+#include <ccan/build_assert/build_assert.h>
int main(int argc, char *argv[])
{
-#include "build_assert/build_assert.h"
-#include "tap/tap.h"
+#include <ccan/build_assert/build_assert.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
-#include "ccan_tokenizer/read_cnumber.c"
-#include "ccan_tokenizer/read_cstring.c"
-#include "ccan_tokenizer/dict.c"
-#include "ccan_tokenizer/ccan_tokenizer.c"
-#include "ccan_tokenizer/queue.c"
-#include "ccan_tokenizer/charflag.c"
-#include "tap/tap.h"
+#include <ccan/ccan_tokenizer/read_cnumber.c>
+#include <ccan/ccan_tokenizer/read_cstring.c>
+#include <ccan/ccan_tokenizer/dict.c>
+#include <ccan/ccan_tokenizer/ccan_tokenizer.c>
+#include <ccan/ccan_tokenizer/queue.c>
+#include <ccan/ccan_tokenizer/charflag.c>
+#include <ccan/tap/tap.h>
#define item(num) (toks->first[num])
//sed 's/toks->array\.item\[\([^]]*\)\]/item(\1)/g'
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "ccan_tokenizer/read_cnumber.c"
-#include "ccan_tokenizer/read_cstring.c"
-#include "ccan_tokenizer/dict.c"
-#include "ccan_tokenizer/ccan_tokenizer.c"
-#include "ccan_tokenizer/queue.c"
-#include "ccan_tokenizer/charflag.c"
+#include <ccan/ccan_tokenizer/read_cnumber.c>
+#include <ccan/ccan_tokenizer/read_cstring.c>
+#include <ccan/ccan_tokenizer/dict.c>
+#include <ccan/ccan_tokenizer/ccan_tokenizer.c>
+#include <ccan/ccan_tokenizer/queue.c>
+#include <ccan/ccan_tokenizer/charflag.c>
-#include "ccan_tokenizer/ccan_tokenizer.h"
+#include <ccan/ccan_tokenizer/ccan_tokenizer.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#include <math.h>
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
-#include "check_type/check_type.h"
+#include <ccan/check_type/check_type.h>
int main(int argc, char *argv[])
{
-#include "check_type/check_type.h"
-#include "tap/tap.h"
+#include <ccan/check_type/check_type.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
*/
#include <ctype.h>
-#include "ciniparser.h"
+#include <ccan/ccan/ciniparser.h>
#define ASCIILINESZ (1024)
#define INI_INVALID_KEY ((char*) NULL)
-#include <ciniparser/ciniparser.h>
-#include <ciniparser/ciniparser.c>
-#include <ciniparser/dictionary.h>
-#include <ciniparser/dictionary.c>
+#include <ccan/ciniparser/ciniparser.h>
+#include <ccan/ciniparser/ciniparser.c>
+#include <ccan/ciniparser/dictionary.h>
+#include <ccan/ciniparser/dictionary.c>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
-#include <tap/tap.h>
+#include <ccan/tap/tap.h>
#define NUM_TESTS 12
-#include "crc/crc.h"
-#include "tap/tap.h"
+#include <ccan/crc/crc.h>
+#include <ccan/tap/tap.h>
#include <string.h>
static const uint32_t crc32c_tab[] = {
-#include "endian/endian.h"
+#include <ccan/endian/endian.h>
#include <stdlib.h>
#include <stddef.h>
-#include <tap/tap.h>
+#include <ccan/tap/tap.h>
int main(int argc, char *argv[])
{
/* This is test for grab_file() function
*/
-#include "grab_file/grab_file.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <sys/stat.h>
-#include "grab_file/grab_file.c"
-#include "tap/tap.h"
-#include "str_talloc/str_talloc.h"
-#include "str/str.h"
+#include <ccan/grab_file/grab_file.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <err.h>
+#include <sys/stat.h>
+#include <ccan/grab_file/grab_file.c>
+#include <ccan/tap/tap.h>
+#include <ccan/str_talloc/str_talloc.h>
+#include <ccan/str/str.h>
int
main(int argc, char *argv[])
-#include "hash/hash.h"
-#include "tap/tap.h"
+#include <ccan/hash/hash.h>
+#include <ccan/tap/tap.h>
#include <stdbool.h>
#include <string.h>
-#include "hash/hash.h"
-#include "tap/tap.h"
-#include "hash/hash.c"
+#include <ccan/hash/hash.h>
+#include <ccan/tap/tap.h>
+#include <ccan/hash/hash.c>
#include <stdbool.h>
#include <string.h>
-#include "ilog/ilog.h"
-#include "ilog/ilog.c"
+#include <ccan/ilog/ilog.h>
+#include <ccan/ilog/ilog.c>
#include <stdio.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
/*Dead simple (but slow) versions to compare against.*/
-#include "isaac/isaac.h"
-#include "isaac/isaac.c"
-#include "tap/tap.h"
+#include <ccan/isaac/isaac.h>
+#include <ccan/isaac/isaac.c>
+#include <ccan/tap/tap.h>
#include <stddef.h>
static const uint32_t STATEVEC[ISAAC_SZ<<1]={
-#include "isaac/isaac64.h"
-#include "isaac/isaac64.c"
-#include "tap/tap.h"
+#include <ccan/isaac/isaac64.h>
+#include <ccan/isaac/isaac64.c>
+#include <ccan/tap/tap.h>
#include <stddef.h>
static const uint64_t STATEVEC64[ISAAC64_SZ<<1]={
-#include "list/list.h"
-#include "tap/tap.h"
-#include "list/list.c"
+#include <ccan/list/list.h>
+#include <ccan/tap/tap.h>
+#include <ccan/list/list.c>
#include <stdbool.h>
#include <stdio.h>
-#include "list/list.h"
-#include "tap/tap.h"
-#include "list/list.c"
+#include <ccan/list/list.h>
+#include <ccan/tap/tap.h>
+#include <ccan/list/list.c>
struct parent {
const char *name;
-#include "md4/md4.h"
-#include <tap/tap.h>
+#include <ccan/md4/md4.h>
+#include <ccan/tap/tap.h>
#include <stdio.h>
#include <string.h>
-#include "noerr/noerr.h"
-#include "tap/tap.h"
-#include "noerr/noerr.c"
+#include <ccan/noerr/noerr.h>
+#include <ccan/tap/tap.h>
+#include <ccan/noerr/noerr.c>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
/* FIXME: Do something tricky to ensure we really do loop in read_all. */
-#include "read_write_all/read_write_all.h"
-#include "read_write_all/read_write_all.c"
-#include "tap/tap.h"
+#include <ccan/read_write_all/read_write_all.h>
+#include <ccan/read_write_all/read_write_all.c>
+#include <ccan/tap/tap.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
/* FIXME: Do something tricky to ensure we really do loop in write_all. */
-#include "read_write_all/read_write_all.h"
-#include "read_write_all/read_write_all.c"
-#include "tap/tap.h"
+#include <ccan/read_write_all/read_write_all.h>
+#include <ccan/read_write_all/read_write_all.c>
+#include <ccan/tap/tap.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
-#include "short_types/short_types.h"
-#include "tap/tap.h"
+#include <ccan/short_types/short_types.h>
+#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <err.h>
-#include "str/str.h"
+#include <ccan/str/str.h>
#include <stdlib.h>
#include <stdio.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
/* FIXME: ccanize */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
-#include "str_talloc/str_talloc.h"
+#include <ccan/str_talloc/str_talloc.h>
#include <stdlib.h>
#include <stdio.h>
-#include "str_talloc/str_talloc.c"
-#include "tap/tap.h"
-#include "str/str.h"
+#include <ccan/str_talloc/str_talloc.c>
+#include <ccan/tap/tap.h>
+#include <ccan/str/str.h>
/* FIXME: ccanize */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
/* This is a heavily modified version of the Patricia tree implementation
in PCC at http://pcc.zentus.com/cgi-bin/cvsweb.cgi/cc/cpp/cpp.c?rev=1.96 */
-#include "stringmap.h"
+#include <ccan/stringmap/stringmap.h>
//#define CONSISTENCY_CHECK
-#include "stringmap/stringmap.h"
-#include "stringmap/stringmap.c"
+#include <ccan/stringmap/stringmap.h>
+#include <ccan/stringmap/stringmap.c>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static void test_trivial(void) {
stringmap(int) map = stringmap_new(NULL);
-#include "talloc/talloc.c"
+#include <ccan/talloc/talloc.c>
int main(void)
{
-#include "talloc/talloc.c"
-#include "tap/tap.h"
+#include <ccan/talloc/talloc.c>
+#include <ccan/tap/tap.h>
#include <assert.h>
/* Much testing already done in run.c */
-#include "talloc/talloc.c"
-#include "tap/tap.h"
+#include <ccan/talloc/talloc.c>
+#include <ccan/tap/tap.h>
#include <assert.h>
int main(void)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "talloc/talloc.c"
+#include <ccan/talloc/talloc.c>
#include <stdbool.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
#define torture_assert(test, expr, str) \
ok(expr, "%s [\n%s: Expression %s failed: %s\n]\n", \
-#include "talloc_link/talloc_link.h"
-#include "tap/tap.h"
-#include "talloc_link/talloc_link.c"
+#include <ccan/talloc_link/talloc_link.h>
+#include <ccan/tap/tap.h>
+#include <ccan/talloc_link/talloc_link.c>
#include <stdlib.h>
#include <err.h>
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
void _set_some_value(void *val);
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
void _callback(void (*fn)(void *arg), void *arg);
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(void *arg), void *arg)
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(void *arg, int x), void *arg)
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
static void _register_callback(void (*cb)(int x, void *arg), void *arg)
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
/* const args in callbacks should be OK. */
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <stdlib.h>
/* volatile args in callbacks should be OK. */
-#include "typesafe_cb/typesafe_cb.h"
+#include <ccan/typesafe_cb/typesafe_cb.h>
#include <string.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
static char dummy = 0;
-ALL_TOOLS = tools/ccan_depends tools/run_tests tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
+ALL_TOOLS = tools/ccan_depends tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
DEP_OBJS = tools/depends.o tools/compile.o tools/tools.o ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o ccan/talloc/talloc.o ccan/noerr/noerr.o ccan/read_write_all/read_write_all.o
tools/ccan_depends: tools/ccan_depends.o $(DEP_OBJS)
-tools/run_tests: tools/run_tests.o ccan/tap/tap.o $(DEP_OBJS)
-
tools/doc_extract: tools/doc_extract.o tools/doc_extract-core.o $(DEP_OBJS)
tools/namespacize: tools/namespacize.o $(DEP_OBJS)
-tools/run_tests.o tools/namespacize.o tools/depends.o: tools/tools.h
+tools/namespacize.o tools/depends.o: tools/tools.h
tools-clean: ccanlint-clean
$(RM) $(ALL_TOOLS)
+++ /dev/null
-#include <err.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <assert.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include "ccan/tap/tap.h"
-#include "ccan/talloc/talloc.h"
-#include "ccan/str/str.h"
-#include "ccan/array_size/array_size.h"
-#include "tools.h"
-
-static struct test *tests = NULL;
-static struct obj *objs = NULL;
-static int verbose;
-
-struct test_type {
- const char *name;
- void (*buildfn)(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs);
- void (*runfn)(const char *name);
-};
-
-struct test {
- struct test *next;
- struct test_type *type;
- char *name;
-};
-
-struct obj {
- struct obj *next;
- bool generate;
- char *name;
-};
-
-static char *output_name(const char *name)
-{
- char *ret;
-
- assert(strends(name, ".c"));
-
- ret = talloc_strdup(name, name);
- ret[strlen(ret) - 2] = '\0';
- return ret;
-}
-
-static char *obj_list(const char *dir)
-{
- char *list = talloc_strdup(objs, "");
- struct obj *i;
-
- for (i = objs; i; i = i->next)
- list = talloc_asprintf_append(list, "%s ", i->name);
-
- /* FIXME */
- if (!streq(dir, "tap") && !strends(dir, "/tap"))
- list = talloc_asprintf_append(list, "ccan/tap/tap.o");
- return list;
-}
-
-static void compile_objs(void)
-{
- struct obj *i;
-
- for (i = objs; i; i = i->next) {
- char *cmd = talloc_asprintf(i, "gcc " CFLAGS " -o %s.o -c %s%s",
- output_name(i->name), i->name,
- verbose ? "" : "> /dev/null 2>&1");
- ok(system(cmd) == 0, "%s", cmd);
- }
-}
-
-static void cleanup_objs(void)
-{
- struct obj *i;
-
- for (i = objs; i; i = i->next) {
- if (!i->generate)
- continue;
- unlink(talloc_asprintf(i, "%s.o", output_name(i->name)));
- }
-}
-
-static void add_test(const char *testdir, const char *name, struct test_type *t)
-{
- struct test *test = talloc(testdir, struct test);
-
- test->next = tests;
- test->type = t;
- test->name = talloc_asprintf(test, "%s/%s", testdir, name);
- tests = test;
-}
-
-static void add_obj(const char *testdir, const char *name, bool generate)
-{
- struct obj *obj = talloc(testdir, struct obj);
-
- obj->next = objs;
- obj->name = talloc_asprintf(obj, "%s/%s", testdir, name);
- obj->generate = generate;
- objs = obj;
-}
-
-static int build(const char *dir, const char *name, const char *apiobj,
- const char *libs, int fail)
-{
- const char *cmd;
- int ret;
-
- cmd = talloc_asprintf(name, "gcc " CFLAGS " %s -o %s %s %s %s%s %s",
- fail ? "-DFAIL" : "",
- output_name(name), name, apiobj, obj_list(dir),
- libs, verbose ? "" : "> /dev/null 2>&1");
-
- if (verbose)
- fprintf(stderr, "Running %s\n", cmd);
-
- ret = system(cmd);
- if (ret == -1)
- diag("cmd '%s' failed to execute", cmd);
-
- return ret;
-}
-
-static void compile_ok(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs)
-{
- ok(build(dir, name, "", libs, 0) == 0, "%s %s", t->name, name);
-}
-
-/* api tests get the API obj linked in as well. */
-static void compile_api_ok(const char *dir, struct test_type *t,
- const char *name, const char *apiobj,
- const char *libs)
-{
- ok(build(dir, name, apiobj, libs, 0) == 0, "%s %s", t->name, name);
-}
-
-static void compile_fail(const char *dir, struct test_type *t, const char *name,
- const char *apiobj, const char *libs)
-{
- if (build(dir, name, "", libs, 0) != 0)
- fail("non-FAIL build %s", name);
- else
- ok(build(dir, name, "", libs, 1) > 0, "%s %s", t->name, name);
-}
-
-static void no_run(const char *name)
-{
-}
-
-static void run(const char *name)
-{
- if (system(output_name(name)) != 0)
- fail("running %s had error", name);
-}
-
-static void cleanup(const char *name)
-{
- unlink(output_name(name));
-}
-
-static struct test_type test_types[] = {
- { "compile_ok", compile_ok, no_run },
- { "compile_fail", compile_fail, no_run },
- { "run", compile_ok, run },
- { "api", compile_api_ok, run },
-};
-
-int main(int argc, char *argv[])
-{
- DIR *dir;
- struct dirent *d;
- char *testdir, *cwd;
- const char *apiobj = "";
- char *libs = talloc_strdup(NULL, "");
- struct test *test;
- unsigned int num_tests = 0, num_objs = 0, i;
-
- if (argc > 1 && streq(argv[1], "--verbose")) {
- verbose = 1;
- argc--;
- argv++;
- }
-
- while (argc > 1 && strstarts(argv[1], "--lib=")) {
- libs = talloc_asprintf_append(libs, " -l%s",
- argv[1] + strlen("--lib="));
- argc--;
- argv++;
- }
-
- if (argc > 1 && strstarts(argv[1], "--apiobj=")) {
- apiobj = argv[1] + strlen("--apiobj=");
- argc--;
- argv++;
- }
-
- if (argc < 2)
- errx(1, "Usage: run_tests [--verbose] [--apiobj=<obj>] <dir> [<extra-objs>...]");
-
- testdir = talloc_asprintf(NULL, "%s/test", argv[1]);
- dir = opendir(testdir);
- if (!dir)
- err(1, "Opening '%s'", testdir);
-
- while ((d = readdir(dir)) != NULL) {
- if (d->d_name[0] == '.' || !strends(d->d_name, ".c"))
- continue;
-
- for (i = 0; i < ARRAY_SIZE(test_types); i++) {
- if (strstarts(d->d_name, test_types[i].name)) {
- add_test(testdir, d->d_name, &test_types[i]);
- num_tests++;
- break;
- }
- }
- if (i == ARRAY_SIZE(test_types)) {
- add_obj(testdir, d->d_name, true);
- num_objs++;
- }
- }
-
- plan_tests(num_tests + num_objs + (num_objs ? 1 : 0));
- /* First all the extra object compilations. */
- compile_objs();
-
- /* Now add any object files from the command line */
- cwd = talloc_strdup(testdir, ".");
- for (i = 2; i < argc; i++)
- add_obj(cwd, argv[i], false);
-
- /* Do all the test compilations. */
- for (test = tests; test; test = test->next)
- test->type->buildfn(argv[1], test->type, test->name,
- apiobj, libs);
-
- cleanup_objs();
-
- /* Now run all the ones which wanted to run. */
- for (test = tests; test; test = test->next) {
- test->type->runfn(test->name);
- cleanup(test->name);
- }
-
- exit(exit_status());
-}
#define SPACE_CHARS " \f\n\r\t\v"
-/* FIXME: Remove some -I */
/* FIXME: Nested functions break with -Wmissing-prototypes -Wmissing-declarations */
-#define CFLAGS "-g -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Werror -Iccan/ -I. -I.. -I../.."
+#define CFLAGS "-g -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Werror -I../.."
/* This actually compiles and runs the info file to get dependencies. */
char **get_deps(const void *ctx, const char *dir, const char *name,