From 677e15fefe5c61b833dcbe2fa4e9ee90bc996f8c Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Sun, 13 Aug 2023 18:15:01 +0400 Subject: Remove OUTPROC and GENG_MAIN macros --- nauty/geng-iter.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'nauty/geng-iter.c') diff --git a/nauty/geng-iter.c b/nauty/geng-iter.c index b5efe21..97db1b7 100644 --- a/nauty/geng-iter.c +++ b/nauty/geng-iter.c @@ -1,5 +1,7 @@ -#include "gtools.h" +#include "geng-iter.h" + #include "geng.h" +#include "gtools.h" #include #include #include @@ -27,7 +29,7 @@ printgraph(graph *g, int n) // TODO: probably don't need to name this function with macro void -OUTPROC(__attribute__((unused)) FILE *outfile, +outproc(__attribute__((unused)) FILE *outfile, graph *g, int n, struct geng_iterator *iter) { memcpy(&iter->batch[iter->batch_size * n], g, sizeof(set) * n); @@ -38,11 +40,6 @@ OUTPROC(__attribute__((unused)) FILE *outfile, swapcontext(&iter->geng_worker, &iter->geng_user); } -// TODO: probably don't need to name this function with macro -// TODO: move to geng.h maybe? -extern int -GENG_MAIN(int argc, char *argv[]); - // geng_iterator_init gives ownership of iterator memory to caller void geng_iterator_create(struct geng_iterator **iterator_ptr, @@ -85,7 +82,7 @@ geng_iterator_create(struct geng_iterator **iterator_ptr, iterator->geng_worker.uc_link = &iterator->geng_user; makecontext( - &iterator->geng_worker, (void (*) (void)) GENG_MAIN, + &iterator->geng_worker, (void (*) (void)) geng_main, 5, geng_argc, p_argv[0], p_argv[1], p_iter[0], p_iter[1] ); swapcontext(&iterator->geng_user, &iterator->geng_worker); -- cgit v1.2.3