Improve situation with clang for 1989/westley
The alt code has been changed so that in addition to the main feature working it will also generate ver0 and ver1 correctly; ver2 and ver3 cannot be compiled still. This is not perfect but it is progress. I will look at this further later most likely. Added compile.alt.sh to compile the alt code and generate the alt code generated code. It generates it in the file name form alt.ver[0-3].c and the code will be compiled as such. Added try.sh to demonstrate the main (original) program. This is because there are a lot of commands to try. Added try.alt.sh to demonstrate the alt program (not trying the ver2 and ver3, naturally). The rationale is the same as for try.sh. The Makefile has been updated for these changes. Updated .gitignore as a number of new files will be created when running compile.alt.sh. The bugs.md has been updated as there has been some progress made. The hint was removed at this time as it's not applicable now; the problem of main() args not being allowed is no longer true. However the status line has not been updated because the root of the problem is this. There are currently no hints because I do not have any yet. The thanks file has also been updated for the new scripts as well as the situation being changed.
This commit is contained in:
1 parent
ff72c76ff1
commit
08a699bfe8
11 files changed
+261
-80
No files matched your search
+15
-30
@@ -30,17 +30,6 @@ Try compiling and running the 4 resulting programs like:
|
||||
./compile.sh
|
||||
```
|
||||
|
||||
This will remove the programs and then run:
|
||||
|
||||
```
|
||||
./westley < westley.c > ver0.c
|
||||
./westley 1 < westley.c > ver1.c
|
||||
./westley 1 2 < westley.c > ver2.c
|
||||
./westley 1 2 3 < westley.c > ver3.c
|
||||
```
|
||||
|
||||
followed by compiling each version.
|
||||
|
||||
If you need to specify an alternate compiler path, say because your default
|
||||
compiler is clang (or in the case of macOS gcc is clang) you can do so like:
|
||||
|
||||
@@ -60,39 +49,35 @@ Finally try:
|
||||
./westley
|
||||
# input some lines of text, sending EOF (usually ctrl-d) to end
|
||||
|
||||
echo IOCCC | ./westley
|
||||
echo IOCCC | ./westley 1
|
||||
echo IOCCC | ./westley 1 2
|
||||
echo IOCCC | ./westley 1 2 3
|
||||
|
||||
echo IOCCC | ./ver0
|
||||
echo Version 1 | ./ver1
|
||||
echo Version 2 | ./ver2
|
||||
echo Version 3 | ./ver3
|
||||
./try.sh # demo of some input
|
||||
```
|
||||
|
||||
## Alternate code:
|
||||
|
||||
The alternate code allows SOME of the features to work with clang but some of
|
||||
the code it generates (see [compile.sh](compile.sh), which does not use this
|
||||
version) is not compilable even in gcc let alone clang. Nevertheless the main
|
||||
feature should work for clang.
|
||||
the code it generates (see [compile.alt.sh](compile.alt.sh) is not compilable
|
||||
even in gcc let alone clang. Nevertheless the main feature should work and the
|
||||
same goes for the `alt.ver0` and `alt.ver1`; currently `alt.ver2` and `alt.ver3`
|
||||
will not compile even with gcc but it is nonetheless generated for when it is
|
||||
(hopefully) fixed.
|
||||
|
||||
### To build:
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
### Try:
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
echo IOCCC | ./westley.alt
|
||||
echo IOCCC | ./westley.alt 1
|
||||
echo IOCCC | ./westley.alt 1 2
|
||||
echo IOCCC | ./westley.alt 1 2 3
|
||||
```
|
||||
./westley.alt
|
||||
# input some text
|
||||
|
||||
# generate alt code versions:
|
||||
./compile.alt.sh
|
||||
|
||||
./try.alt.sh # demo of some input
|
||||
```
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Reference in new issue
Block a user