X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/879d69d46fdf7ddf33beac6c32c7f2646d97d0ca..881854b714cb3987911800c88345ea61db40fb03:/test/randomdecl.c diff --git a/test/randomdecl.c b/test/randomdecl.c index a5b5d3c..9e9271e 100644 --- a/test/randomdecl.c +++ b/test/randomdecl.c @@ -1,6 +1,6 @@ /* * Generate random C declarations for testing. - * Copyright © 2012, 2020 Nick Bowler + * Copyright © 2012, 2020, 2022 Nick Bowler * * 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 @@ -58,17 +58,10 @@ static void print_help(void) print_usage(stdout); puts("Generate random C declarations for testing.\n"); - - puts("Options:"); - for (opt = lopts; opt->val; opt++) { - int w = print_option_start(opt, NULL); - - if (w) - putchar('\n'); - } + test_print_options(lopts); } -static struct cdecl *random_decl(struct gen_rng *rng) +static struct cdecl *random_decl(struct test_rng *rng) { struct cdecl *decl; unsigned flags = 0; @@ -92,7 +85,7 @@ static struct cdecl *random_decl(struct gen_rng *rng) int main(int argc, char **argv) { const char *seed = "", *count_str = NULL; - struct gen_rng *rng; + struct test_rng *rng; struct cdecl *decl; unsigned long count = 0; int opt, mode = MODE_CDECL; @@ -131,7 +124,7 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - rng = gen_alloc_rng(seed); + rng = test_rng_alloc(seed); if (!rng) return EXIT_FAILURE; @@ -149,7 +142,7 @@ int main(int argc, char **argv) free(decl); } - gen_free_rng(rng); + test_rng_free(rng); return EXIT_SUCCESS; }