22 lines
535 B
C
22 lines
535 B
C
#ifndef UTIL_H_
|
|
#define UTIL_H_
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
#include <ctype.h>
|
|
#include <limits.h>
|
|
|
|
// Magic number to be returned in case something goes wrong. Lets the program know an error occured. This is kind of a hack.
|
|
#define ERRORRETURN 10787253
|
|
|
|
void null_terminate(char str[]);
|
|
bool is_num(char *str);
|
|
bool is_int(char *str);
|
|
bool is_positive_int(int num);
|
|
int get_clean_int();
|
|
double get_clean_num();
|
|
bool will_square_overflow(unsigned long long num);
|
|
|
|
#endif // UTIL_H_
|