aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Liodden <[email protected]>2017-07-08 15:23:21 +0200
committerErik Liodden <[email protected]>2017-07-08 15:23:21 +0200
commit632dcee777c146d8f41d26085b3e20ed6c50c2f7 (patch)
tree9b4c43ae713c77d8a71b369e714ea294ad613d97
parentb41104d3f1c48c8055046bc3925f41ee4ca7c793 (diff)
downloadc-project-template-632dcee777c146d8f41d26085b3e20ed6c50c2f7.tar.gz
Add comments
Add comments to make the code more readable and clear.
-rw-r--r--src/implementation/implementation.c11
-rw-r--r--src/main.c7
2 files changed, 18 insertions, 0 deletions
diff --git a/src/implementation/implementation.c b/src/implementation/implementation.c
index 098cd22..e35ea1f 100644
--- a/src/implementation/implementation.c
+++ b/src/implementation/implementation.c
@@ -1,5 +1,16 @@
+/*
+ * implementation/implementation.c
+ * Implements the sum() function defined in 'implementation.h' and is part of
+ * the 'implementation' module.
+ * Note that `SRC += implementation/implementation.c` must be added to the
+ * module.mk file to be compiled during `make`.
+ *
+ * Erik Liodden
+ */
+
#include "implementation.h"
+/* sum: sum the integers a and b */
int sum(int a, int b)
{
return a + b;
diff --git a/src/main.c b/src/main.c
index 70173b3..6abd819 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,10 @@
+/*
+ * main.c
+ * sample main.c file containing the main() function.
+ *
+ * Erik Liodden
+ */
+
#include <stdio.h>
#include "implementation.h"