diff --git a/src/list.h b/src/list.h index 5e45018..b0bead8 100644 --- a/src/list.h +++ b/src/list.h @@ -2,13 +2,15 @@ #include #include +#include "types.h" + /** * @brief An infinitely expanding list type. */ typedef struct { mpz_t *list; //!< The list of elements - unsigned long long int size; //!< How many elements are in the list - unsigned long long int end; //!< The last element of the list (in use) + ulli size; //!< How many elements are in the list + ulli end; //!< The last element of the list (in use) } List; /** diff --git a/src/main.c b/src/main.c index 44a5555..ed056d0 100644 --- a/src/main.c +++ b/src/main.c @@ -5,6 +5,7 @@ #include #include "list.h" +#include "types.h" #include "optimizers.h" static bool run; @@ -37,7 +38,7 @@ int main(void) { do { // Loop through found primes - for(unsigned long long int i = 0; i < primes.size; ++i) { + for(ulli i = 0; i < primes.size; ++i) { // If `num' is divisible by a prime then go to the next number if(mpz_divisible_p(num, primes.list[i]) != 0) goto nextPrime; } diff --git a/src/types.h b/src/types.h new file mode 100644 index 0000000..9de6f13 --- /dev/null +++ b/src/types.h @@ -0,0 +1,2 @@ +#pragma once +typedef unsigned long long int ulli;