diff --git a/0001-Use-proper-grammar.patch b/0001-Use-proper-grammar.patch new file mode 100644 index 0000000..faf02d7 --- /dev/null +++ b/0001-Use-proper-grammar.patch @@ -0,0 +1,24 @@ +From b9d64d63e995a768c677990ef39ff1857cb466c5 Mon Sep 17 00:00:00 2001 +From: DeOwl +Date: Wed, 9 Sep 2026 16:27:15 +0300 +Subject: [PATCH 1/3] Use proper grammar. + +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index f6e7abe..80cf29a 100644 +--- a/main.c ++++ b/main.c +@@ -6,6 +6,6 @@ int main(int argc, char **argv) + printf("Enter your name: "); + fgets(name, 255, stdin); + name[strlen(name)-1] = '\0'; /* remove the newline at the end */ +- printf("Hello %s!\n", name); ++ printf("Hello, %s!\n", name); + return 0; + } +-- +2.55.0 + diff --git a/0002-Move-the-ask-name-code-into-its-own-function-and-fil.patch b/0002-Move-the-ask-name-code-into-its-own-function-and-fil.patch new file mode 100644 index 0000000..ceecd8d --- /dev/null +++ b/0002-Move-the-ask-name-code-into-its-own-function-and-fil.patch @@ -0,0 +1,59 @@ +From 6b91325623e4a8ea04e56b3c8950aea053d37495 Mon Sep 17 00:00:00 2001 +From: DeOwl +Date: Wed, 9 Sep 2026 16:47:55 +0300 +Subject: [PATCH 2/3] Move the ask name code into its own function and file + +--- + askname.c | 10 ++++++++++ + askname.h | 1 + + main.c | 8 ++------ + 3 files changed, 13 insertions(+), 6 deletions(-) + create mode 100644 askname.c + create mode 100644 askname.h + +diff --git a/askname.c b/askname.c +new file mode 100644 +index 0000000..60b9420 +--- /dev/null ++++ b/askname.c +@@ -0,0 +1,10 @@ ++#include ++#include ++void askname(char *first, char *last) ++{ ++ printf("Enter your first name: "); ++ fgets(first, 255, stdin); ++ first[strlen(first)-1] = '\0'; /* remove the newline at the end */ ++ printf("Now enter your last name: "); ++ gets(last); /* buffer overflow? what's that? */ ++} +diff --git a/askname.h b/askname.h +new file mode 100644 +index 0000000..99b23f5 +--- /dev/null ++++ b/askname.h +@@ -0,0 +1 @@ ++void askname(char *first, char *last); +diff --git a/main.c b/main.c +index e3a8745..291e6b3 100644 +--- a/main.c ++++ b/main.c +@@ -1,13 +1,9 @@ + #include +-#include ++#include "askname.h" + int main(int argc, char **argv) + { + char first[255], last[255]; +- printf("Enter your first name: "); +- fgets(first, 255, stdin); +- first[strlen(first)-1] = '\0'; /* remove the newline at the end */ +- printf("Now enter your last name: "); +- gets(last); /* buffer overflow? what's that? */ ++ askname(first, last); + printf("Hello, %s %s!\n", first, last); + return 0; + } +-- +2.55.0 + diff --git a/0003-Fork-commit-1.patch b/0003-Fork-commit-1.patch new file mode 100644 index 0000000..3dd4b43 --- /dev/null +++ b/0003-Fork-commit-1.patch @@ -0,0 +1,22 @@ +From 243a82fd97f0496cb75f61adec59ddc5a216c889 Mon Sep 17 00:00:00 2001 +From: DeOwl +Date: Wed, 9 Sep 2026 17:09:53 +0300 +Subject: [PATCH 3/3] Fork commit 1 + +--- + main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/main.c b/main.c +index 291e6b3..3a49c31 100644 +--- a/main.c ++++ b/main.c +@@ -6,4 +6,5 @@ int main(int argc, char **argv) + askname(first, last); + printf("Hello, %s %s!\n", first, last); + return 0; ++ // Test Commit # 1 + } +-- +2.55.0 + diff --git a/askname.c b/askname.c index 60b9420..44b36d5 100644 --- a/askname.c +++ b/askname.c @@ -7,4 +7,7 @@ void askname(char *first, char *last) first[strlen(first)-1] = '\0'; /* remove the newline at the end */ printf("Now enter your last name: "); gets(last); /* buffer overflow? what's that? */ + + + // Stashed changes 2 } diff --git a/main.c b/main.c index 3a49c31..36406f7 100644 --- a/main.c +++ b/main.c @@ -7,4 +7,7 @@ int main(int argc, char **argv) printf("Hello, %s %s!\n", first, last); return 0; // Test Commit # 1 + // + // + // STASHED changes 1 }