-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaseutil.h
47 lines (40 loc) · 1.09 KB
/
baseutil.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* File: baseutil.h
* Author: Bryan Daniel
*/
#ifndef BASEUTIL_H
#define BASEUTIL_H
#include <stdbool.h>
/**
* Holds constant values used throughout the program
*/
extern const struct ProgramConfiguration
{
int file_name_max_length;
int line_max_length;
int max_number_of_lines;
int path_max_length;
int max_menu_options;
int max_message_size;
char *test_directory_name;
} ProgramValues;
/**
* This function is used to determine if the given array of integers contains
* the given integer value.
*
* @param value the value
* @param array the array
* @param size the size of the array
* @return true if the value is contained in the array, false otherwise
*/
bool array_contains_value(int value, int *array, int size);
/**
* This function takes the given array and populates it with random numbers.
* The range signifies the size of the array as well as the value range for the
* random number operation.
*
* @param range the range of values
* @param array the array to populate
*/
void random_order(int range, int *array);
#endif /* BASEUTIL_H */