From 9aa39c1b5319e13b374da342956e87a380872f15 Mon Sep 17 00:00:00 2001 From: "Begerad, Stefan" Date: Tue, 3 Jan 2023 14:41:31 +0100 Subject: [PATCH] chore: It is a tradition to use CPP tricks to avoid parsing the same header file more than once --- struct-location/location.h | 7 +++++++ write-location-file/write-location-file.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/struct-location/location.h b/struct-location/location.h index 1c96eee..41ef140 100644 --- a/struct-location/location.h +++ b/struct-location/location.h @@ -1,3 +1,8 @@ +/*It is a tradition to use CPP tricks to avoid parsing the same header file more than once*/ + +#ifndef LOCATION_H +# define LOCATION_H + /*use struct statement to define structure*/ struct location { /*latitide like +052.26594*/ @@ -7,3 +12,5 @@ struct location { }; struct location getLocation(char lat[11], char lon[10]); + +#endif /* LOCATION_H */ diff --git a/write-location-file/write-location-file.h b/write-location-file/write-location-file.h index 09fe2ec..694de74 100644 --- a/write-location-file/write-location-file.h +++ b/write-location-file/write-location-file.h @@ -1 +1,8 @@ +/*It is a tradition to use CPP tricks to avoid parsing the same header file more than once*/ + +#ifndef WRITE_LOCATION_FILE_H +# define WRITE_LOCATION_FILE_H + int write_location_file(char *lat, char *lon); + +#endif /* WRITE_LOCATION_FILE_H */