diff options
author | Dave Gauer <dave@ratfactor.com> | 2021-02-14 20:26:57 -0500 |
---|---|---|
committer | Dave Gauer <dave@ratfactor.com> | 2021-02-14 20:26:57 -0500 |
commit | 44ccf4a0eb5bc37604f68ead194e5fb0dc637b98 (patch) | |
tree | e197971c420902e692433a3b15de54369458cdb8 /patches | |
parent | e4a5716c71f4cdf9837c8e059aa43080748f4650 (diff) | |
download | ziglings-44ccf4a0eb5bc37604f68ead194e5fb0dc637b98.tar.gz ziglings-44ccf4a0eb5bc37604f68ead194e5fb0dc637b98.tar.bz2 ziglings-44ccf4a0eb5bc37604f68ead194e5fb0dc637b98.tar.xz ziglings-44ccf4a0eb5bc37604f68ead194e5fb0dc637b98.zip |
Patches to patches to clean up patches
Diffstat (limited to 'patches')
-rw-r--r-- | patches/45_optionals.patch | 4 | ||||
-rw-r--r-- | patches/README.md | 2 | ||||
-rwxr-xr-x | patches/eowyn.sh | 8 | ||||
-rwxr-xr-x | patches/gollum.sh | 2 | ||||
-rw-r--r-- | patches/patches/01_hello.patch (renamed from patches/01_hello.patch) | 0 | ||||
-rw-r--r-- | patches/patches/02_std.patch (renamed from patches/02_std.patch) | 0 | ||||
-rw-r--r-- | patches/patches/03_assignment.patch (renamed from patches/03_assignment.patch) | 0 | ||||
-rw-r--r-- | patches/patches/04_arrays.patch (renamed from patches/04_arrays.patch) | 0 | ||||
-rw-r--r-- | patches/patches/05_arrays2.patch (renamed from patches/05_arrays2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/06_strings.patch (renamed from patches/06_strings.patch) | 0 | ||||
-rw-r--r-- | patches/patches/07_strings2.patch (renamed from patches/07_strings2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/08_quiz.patch (renamed from patches/08_quiz.patch) | 0 | ||||
-rw-r--r-- | patches/patches/09_if.patch (renamed from patches/09_if.patch) | 0 | ||||
-rw-r--r-- | patches/patches/10_if2.patch (renamed from patches/10_if2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/11_while.patch (renamed from patches/11_while.patch) | 0 | ||||
-rw-r--r-- | patches/patches/12_while2.patch (renamed from patches/12_while2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/13_while3.patch (renamed from patches/13_while3.patch) | 0 | ||||
-rw-r--r-- | patches/patches/14_while4.patch (renamed from patches/14_while4.patch) | 0 | ||||
-rw-r--r-- | patches/patches/15_for.patch (renamed from patches/15_for.patch) | 0 | ||||
-rw-r--r-- | patches/patches/16_for2.patch (renamed from patches/16_for2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/17_quiz2.patch (renamed from patches/17_quiz2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/18_functions.patch (renamed from patches/18_functions.patch) | 0 | ||||
-rw-r--r-- | patches/patches/19_functions2.patch (renamed from patches/19_functions2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/20_quiz3.patch (renamed from patches/20_quiz3.patch) | 0 | ||||
-rw-r--r-- | patches/patches/21_errors.patch (renamed from patches/21_errors.patch) | 0 | ||||
-rw-r--r-- | patches/patches/22_errors2.patch (renamed from patches/22_errors2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/23_errors3.patch (renamed from patches/23_errors3.patch) | 0 | ||||
-rw-r--r-- | patches/patches/24_errors4.patch (renamed from patches/24_errors4.patch) | 0 | ||||
-rw-r--r-- | patches/patches/25_errors5.patch (renamed from patches/25_errors5.patch) | 0 | ||||
-rw-r--r-- | patches/patches/26_hello2.patch (renamed from patches/26_hello2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/27_defer.patch (renamed from patches/27_defer.patch) | 0 | ||||
-rw-r--r-- | patches/patches/28_defer2.patch (renamed from patches/28_defer2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/29_errdefer.patch (renamed from patches/29_errdefer.patch) | 0 | ||||
-rw-r--r-- | patches/patches/30_switch.patch (renamed from patches/30_switch.patch) | 0 | ||||
-rw-r--r-- | patches/patches/31_switch2.patch (renamed from patches/31_switch2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/32_unreachable.patch (renamed from patches/32_unreachable.patch) | 0 | ||||
-rw-r--r-- | patches/patches/33_iferror.patch (renamed from patches/33_iferror.patch) | 0 | ||||
-rw-r--r-- | patches/patches/34_quiz4.patch (renamed from patches/34_quiz4.patch) | 0 | ||||
-rw-r--r-- | patches/patches/35_enums.patch (renamed from patches/35_enums.patch) | 0 | ||||
-rw-r--r-- | patches/patches/36_enums2.patch (renamed from patches/36_enums2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/37_structs.patch (renamed from patches/37_structs.patch) | 0 | ||||
-rw-r--r-- | patches/patches/38_structs2.patch (renamed from patches/38_structs2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/39_pointers.patch (renamed from patches/39_pointers.patch) | 0 | ||||
-rw-r--r-- | patches/patches/40_pointers2.patch (renamed from patches/40_pointers2.patch) | 0 | ||||
-rw-r--r-- | patches/patches/41_pointers3.patch (renamed from patches/41_pointers3.patch) | 0 | ||||
-rw-r--r-- | patches/patches/42_pointers4.patch (renamed from patches/42_pointers4.patch) | 0 | ||||
-rw-r--r-- | patches/patches/43_pointers5.patch (renamed from patches/43_pointers5.patch) | 0 | ||||
-rw-r--r-- | patches/patches/44_quiz5.patch (renamed from patches/44_quiz5.patch) | 0 | ||||
-rw-r--r-- | patches/patches/45_optionals.patch | 1 |
49 files changed, 8 insertions, 9 deletions
diff --git a/patches/45_optionals.patch b/patches/45_optionals.patch deleted file mode 100644 index c945b5a..0000000 --- a/patches/45_optionals.patch +++ /dev/null @@ -1,4 +0,0 @@ -32c32 -< var answer: u8 = result; ---- -> var answer: u8 = result orelse 42; diff --git a/patches/README.md b/patches/README.md index 0a4e8e0..b3249fa 100644 --- a/patches/README.md +++ b/patches/README.md @@ -8,7 +8,7 @@ answers are here, so no peeking! ## Éowyn A Bash shell script named `eowyn.sh` dwells here. She heals the little broken -programs and places them in a `healed` directory, which is not committed to the +programs and places them in a `healed` directory, which is NOT committed to the repo. ```bash diff --git a/patches/eowyn.sh b/patches/eowyn.sh index 53b87d2..5a802f6 100755 --- a/patches/eowyn.sh +++ b/patches/eowyn.sh @@ -25,16 +25,18 @@ for broken in ../exercises/*.zig do # Remove the dir and extension, rendering the True Name. true_name=$(basename $broken .zig) + patch_name="patches/$true_name.patch" - if [[ -f $true_name.patch ]] + + if [[ -f $patch_name ]] then # Apply the bandages to the wounds, grow new limbs, let # new life spring into the broken bodies of the fallen. echo Healing $true_name... - patch --output=healed/$true_name.zig $broken $true_name.patch + patch --output=healed/$true_name.zig $broken $patch_name else echo Cannot heal $true_name. Making empty patch. - echo > $true_name.patch + echo > $patch_name fi done diff --git a/patches/gollum.sh b/patches/gollum.sh index 78c7756..423d376 100755 --- a/patches/gollum.sh +++ b/patches/gollum.sh @@ -10,7 +10,7 @@ cd $(dirname $(which $0)) f=$(basename ../exercises/$1*.zig .zig 2> /dev/null) b=../exercises/$f.zig a=../answers/$f.zig -p=$f.patch +p=patches/$f.patch printf "\tf: '$f'\n\tb: '$b'\n\ta: '$a'\n" diff --git a/patches/01_hello.patch b/patches/patches/01_hello.patch index fb360a7..fb360a7 100644 --- a/patches/01_hello.patch +++ b/patches/patches/01_hello.patch diff --git a/patches/02_std.patch b/patches/patches/02_std.patch index 6c97adb..6c97adb 100644 --- a/patches/02_std.patch +++ b/patches/patches/02_std.patch diff --git a/patches/03_assignment.patch b/patches/patches/03_assignment.patch index 8b13789..8b13789 100644 --- a/patches/03_assignment.patch +++ b/patches/patches/03_assignment.patch diff --git a/patches/04_arrays.patch b/patches/patches/04_arrays.patch index 8b13789..8b13789 100644 --- a/patches/04_arrays.patch +++ b/patches/patches/04_arrays.patch diff --git a/patches/05_arrays2.patch b/patches/patches/05_arrays2.patch index 8b13789..8b13789 100644 --- a/patches/05_arrays2.patch +++ b/patches/patches/05_arrays2.patch diff --git a/patches/06_strings.patch b/patches/patches/06_strings.patch index 8b13789..8b13789 100644 --- a/patches/06_strings.patch +++ b/patches/patches/06_strings.patch diff --git a/patches/07_strings2.patch b/patches/patches/07_strings2.patch index 8b13789..8b13789 100644 --- a/patches/07_strings2.patch +++ b/patches/patches/07_strings2.patch diff --git a/patches/08_quiz.patch b/patches/patches/08_quiz.patch index 8b13789..8b13789 100644 --- a/patches/08_quiz.patch +++ b/patches/patches/08_quiz.patch diff --git a/patches/09_if.patch b/patches/patches/09_if.patch index 8b13789..8b13789 100644 --- a/patches/09_if.patch +++ b/patches/patches/09_if.patch diff --git a/patches/10_if2.patch b/patches/patches/10_if2.patch index 8b13789..8b13789 100644 --- a/patches/10_if2.patch +++ b/patches/patches/10_if2.patch diff --git a/patches/11_while.patch b/patches/patches/11_while.patch index 8b13789..8b13789 100644 --- a/patches/11_while.patch +++ b/patches/patches/11_while.patch diff --git a/patches/12_while2.patch b/patches/patches/12_while2.patch index 8b13789..8b13789 100644 --- a/patches/12_while2.patch +++ b/patches/patches/12_while2.patch diff --git a/patches/13_while3.patch b/patches/patches/13_while3.patch index 8b13789..8b13789 100644 --- a/patches/13_while3.patch +++ b/patches/patches/13_while3.patch diff --git a/patches/14_while4.patch b/patches/patches/14_while4.patch index 8b13789..8b13789 100644 --- a/patches/14_while4.patch +++ b/patches/patches/14_while4.patch diff --git a/patches/15_for.patch b/patches/patches/15_for.patch index 8b13789..8b13789 100644 --- a/patches/15_for.patch +++ b/patches/patches/15_for.patch diff --git a/patches/16_for2.patch b/patches/patches/16_for2.patch index 8b13789..8b13789 100644 --- a/patches/16_for2.patch +++ b/patches/patches/16_for2.patch diff --git a/patches/17_quiz2.patch b/patches/patches/17_quiz2.patch index 8b13789..8b13789 100644 --- a/patches/17_quiz2.patch +++ b/patches/patches/17_quiz2.patch diff --git a/patches/18_functions.patch b/patches/patches/18_functions.patch index 8b13789..8b13789 100644 --- a/patches/18_functions.patch +++ b/patches/patches/18_functions.patch diff --git a/patches/19_functions2.patch b/patches/patches/19_functions2.patch index 8b13789..8b13789 100644 --- a/patches/19_functions2.patch +++ b/patches/patches/19_functions2.patch diff --git a/patches/20_quiz3.patch b/patches/patches/20_quiz3.patch index 8b13789..8b13789 100644 --- a/patches/20_quiz3.patch +++ b/patches/patches/20_quiz3.patch diff --git a/patches/21_errors.patch b/patches/patches/21_errors.patch index 8b13789..8b13789 100644 --- a/patches/21_errors.patch +++ b/patches/patches/21_errors.patch diff --git a/patches/22_errors2.patch b/patches/patches/22_errors2.patch index 8b13789..8b13789 100644 --- a/patches/22_errors2.patch +++ b/patches/patches/22_errors2.patch diff --git a/patches/23_errors3.patch b/patches/patches/23_errors3.patch index 8b13789..8b13789 100644 --- a/patches/23_errors3.patch +++ b/patches/patches/23_errors3.patch diff --git a/patches/24_errors4.patch b/patches/patches/24_errors4.patch index 8b13789..8b13789 100644 --- a/patches/24_errors4.patch +++ b/patches/patches/24_errors4.patch diff --git a/patches/25_errors5.patch b/patches/patches/25_errors5.patch index 8b13789..8b13789 100644 --- a/patches/25_errors5.patch +++ b/patches/patches/25_errors5.patch diff --git a/patches/26_hello2.patch b/patches/patches/26_hello2.patch index 8b13789..8b13789 100644 --- a/patches/26_hello2.patch +++ b/patches/patches/26_hello2.patch diff --git a/patches/27_defer.patch b/patches/patches/27_defer.patch index 8b13789..8b13789 100644 --- a/patches/27_defer.patch +++ b/patches/patches/27_defer.patch diff --git a/patches/28_defer2.patch b/patches/patches/28_defer2.patch index 8b13789..8b13789 100644 --- a/patches/28_defer2.patch +++ b/patches/patches/28_defer2.patch diff --git a/patches/29_errdefer.patch b/patches/patches/29_errdefer.patch index 8b13789..8b13789 100644 --- a/patches/29_errdefer.patch +++ b/patches/patches/29_errdefer.patch diff --git a/patches/30_switch.patch b/patches/patches/30_switch.patch index 8b13789..8b13789 100644 --- a/patches/30_switch.patch +++ b/patches/patches/30_switch.patch diff --git a/patches/31_switch2.patch b/patches/patches/31_switch2.patch index 8b13789..8b13789 100644 --- a/patches/31_switch2.patch +++ b/patches/patches/31_switch2.patch diff --git a/patches/32_unreachable.patch b/patches/patches/32_unreachable.patch index 8b13789..8b13789 100644 --- a/patches/32_unreachable.patch +++ b/patches/patches/32_unreachable.patch diff --git a/patches/33_iferror.patch b/patches/patches/33_iferror.patch index 8b13789..8b13789 100644 --- a/patches/33_iferror.patch +++ b/patches/patches/33_iferror.patch diff --git a/patches/34_quiz4.patch b/patches/patches/34_quiz4.patch index 8b13789..8b13789 100644 --- a/patches/34_quiz4.patch +++ b/patches/patches/34_quiz4.patch diff --git a/patches/35_enums.patch b/patches/patches/35_enums.patch index 8b13789..8b13789 100644 --- a/patches/35_enums.patch +++ b/patches/patches/35_enums.patch diff --git a/patches/36_enums2.patch b/patches/patches/36_enums2.patch index 8b13789..8b13789 100644 --- a/patches/36_enums2.patch +++ b/patches/patches/36_enums2.patch diff --git a/patches/37_structs.patch b/patches/patches/37_structs.patch index 8b13789..8b13789 100644 --- a/patches/37_structs.patch +++ b/patches/patches/37_structs.patch diff --git a/patches/38_structs2.patch b/patches/patches/38_structs2.patch index 8b13789..8b13789 100644 --- a/patches/38_structs2.patch +++ b/patches/patches/38_structs2.patch diff --git a/patches/39_pointers.patch b/patches/patches/39_pointers.patch index 8b13789..8b13789 100644 --- a/patches/39_pointers.patch +++ b/patches/patches/39_pointers.patch diff --git a/patches/40_pointers2.patch b/patches/patches/40_pointers2.patch index 8b13789..8b13789 100644 --- a/patches/40_pointers2.patch +++ b/patches/patches/40_pointers2.patch diff --git a/patches/41_pointers3.patch b/patches/patches/41_pointers3.patch index 8b13789..8b13789 100644 --- a/patches/41_pointers3.patch +++ b/patches/patches/41_pointers3.patch diff --git a/patches/42_pointers4.patch b/patches/patches/42_pointers4.patch index 8b13789..8b13789 100644 --- a/patches/42_pointers4.patch +++ b/patches/patches/42_pointers4.patch diff --git a/patches/43_pointers5.patch b/patches/patches/43_pointers5.patch index 8b13789..8b13789 100644 --- a/patches/43_pointers5.patch +++ b/patches/patches/43_pointers5.patch diff --git a/patches/44_quiz5.patch b/patches/patches/44_quiz5.patch index 8b13789..8b13789 100644 --- a/patches/44_quiz5.patch +++ b/patches/patches/44_quiz5.patch diff --git a/patches/patches/45_optionals.patch b/patches/patches/45_optionals.patch new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/patches/patches/45_optionals.patch @@ -0,0 +1 @@ + |