Add alt versions to 1991/cdupont

There are three alt versions. One has a comment and an unused goto label
removed that are warned against being removed; another has this done and
is also beautified (which is also warned against) and the third is one
that is just beautified.

This involved changing the 's' macro to be '__FILE__' because otherwise
it would read in the original code and not show the problem.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-25 06:38:41 -08:00
1 parent 17bb334f87
commit ca398d5dcb
7 files changed
+203 -3

No files matched your search

+36
View File
@@ -4,6 +4,10 @@
make all
```
There are three alt versions which demonstrate a problem that the code documents
(as an obfuscation technique) and what the judges document so you can see what
it looks like. See [alternate code](#alternate-code) below for more details.
## To use:
@@ -12,6 +16,38 @@ make all
```
## Alternate code:
These three versions show what will happen if certain things are done that were
warned against: if you remove a comment and more so an unused `goto` label or if
you beautify it. The [cdupont.alt.c](cdupont.alt.c) is the one with both the
unused `goto` label and comments removed, the [cdupont.alt2.c](cdupont.alt2.c)
is the version that has these things removed and is also beautified and the
[cdupont.alt3.c](cdupont.alt3.c) is just beautified. This required changing the
`s` macro to be `__FILE__` as otherwise it would read in the original code which
doesn't have the modifications.
### Alternate build:
```sh
make alt
```
### Alternate try:
```sh
./cdupont.alt
./cdupont.alt2
./cdupont.alt3
```
Enjoy! :-)
## Judges' remarks:
Why is the following label necessary?