Browse Source

Add preprocessor directives in four header files.

remotes/origin/development
fdai7057 2 years ago
parent
commit
c5dec7f704
  1. 3
      src/createCustomer.h
  2. 3
      src/customerProperties.h
  3. 3
      src/loginCustomer.h
  4. 3
      src/stringManipulation.h

3
src/createCustomer.h

@ -1,3 +1,5 @@
#ifndef CREATE_CUSTOMER_H
#define CREATE_CUSTOMER_H
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
@ -7,3 +9,4 @@
int generateID(); int generateID();
void collectCustomerProperties(); void collectCustomerProperties();
void writeCustomerPropertiesToFile(customer_t *); void writeCustomerPropertiesToFile(customer_t *);
#endif

3
src/customerProperties.h

@ -1,3 +1,5 @@
#ifndef CUSTOMER_PROPERTIES_H
#define CUSTOMER_PROPERTIES_H
typedef struct Customer typedef struct Customer
{ {
unsigned int ID; unsigned int ID;
@ -6,3 +8,4 @@ typedef struct Customer
char *forename, *surname; char *forename, *surname;
float balance; float balance;
}customer_t; }customer_t;
#endif

3
src/loginCustomer.h

@ -1,3 +1,5 @@
#ifndef LOGIN_CUSTOMER_H
#define LOGIN_CUSTOMER_H
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
@ -8,3 +10,4 @@
bool checkLogin(bool); bool checkLogin(bool);
void collectCustomerDataForLogin(int); void collectCustomerDataForLogin(int);
bool loginCustomer(customer_t *); bool loginCustomer(customer_t *);
#endif

3
src/stringManipulation.h

@ -1,3 +1,5 @@
#ifndef STRING_MANIPULATION_H
#define STRING_MANIPULATION_H
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -8,3 +10,4 @@ char *generateCheckString(unsigned int, char *);
unsigned int toUnsignedInteger(char *); unsigned int toUnsignedInteger(char *);
unsigned int power(unsigned int, unsigned int); unsigned int power(unsigned int, unsigned int);
bool everyCharacterIsDigit(char *); bool everyCharacterIsDigit(char *);
#endif
Loading…
Cancel
Save