diff --git a/.gitignore b/.gitignore index bf021ff..c597f30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ printrandom -*.o \ No newline at end of file +.clang-format + +*.o diff --git a/linear.h b/linear.h index 9f9a9d8..c2d4c75 100644 --- a/linear.h +++ b/linear.h @@ -2,4 +2,4 @@ #include "random_source.h" -RandomSource *random_linear_factory(const char *params); \ No newline at end of file +RandomSource *random_linear_factory(const char *params); diff --git a/main.c b/main.c index fbd71da..aa35e48 100644 --- a/main.c +++ b/main.c @@ -66,22 +66,19 @@ main(int argc, char **argv) const char *SEED = argv[3]; RandomSource *generator = fn(SEED); - if (generator == NULL) - { + if (generator == NULL) { fprintf(stderr, "Error making generator\n"); goto emergency_exit; } - for (int i = 0; i < n; ++i) { printf("%.10g\n", generator->ops->next(generator)); } generator = generator->ops->destroy(generator); - if (dlclose(handle) != 0) - { + if (dlclose(handle) != 0) { fprintf(stderr, "Error closing shared object\n"); goto emergency_exit; @@ -90,8 +87,7 @@ main(int argc, char **argv) return EXIT_SUCCESS; emergency_exit: - if (dlclose(handle) != 0) - { + if (dlclose(handle) != 0) { fprintf(stderr, "Error closing shared object\n"); } diff --git a/mt.h b/mt.h index 0de2530..de22e85 100644 --- a/mt.h +++ b/mt.h @@ -2,4 +2,4 @@ #include "random_source.h" -RandomSource *random_mt_factory(const char *params); \ No newline at end of file +RandomSource *random_mt_factory(const char *params); diff --git a/random_source.h b/random_source.h index 9395d37..f269a72 100644 --- a/random_source.h +++ b/random_source.h @@ -17,4 +17,4 @@ typedef struct RandomSource enum { DEC_RADIX = 10, -}; \ No newline at end of file +};