Improve instructions/alt code for 1988/spinellis
There is no need to compile to 'runme': the way I designed the alt code is so that it can be compiled and used exactly like the original entry. Since the original entry need not compile to another file neither does the alt version. It just compiles to spinellis.alt instead. (Perhaps both should compile to something else though?) The instructions of how to build/how to use in the README.md file have been fixed and improved (it referred to the old way). The alt code subsections have been added as well. I also added to spinellis.alt.c #include <stdlib.h> as it's not a one-liner anyway and this way system(3) is available without worrying about warnings. The -Wno-everything still remains there in the system(3) call in case there is a problem with the code that is typed in (though that's not been tested either way).
This commit is contained in:
1 parent
0c977b213a
commit
eb529e9eeb
7 files changed
+118
-32
No files matched your search
@@ -1,35 +1,58 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make clobber all
|
||||
```
|
||||
|
||||
and follow the instructions this will give you.
|
||||
|
||||
### Try:
|
||||
If your compiler will not read from `/dev/tty` see the [Alternate
|
||||
code](#alternate-code) section below.
|
||||
|
||||
|
||||
### To use:
|
||||
|
||||
```sh
|
||||
rm -f spinellis ; cc spinellis.c -o spinellis < input.txt && ./spinellis
|
||||
./spinellis
|
||||
```
|
||||
|
||||
and try:
|
||||
Type in or copy paste some C code, perhaps from [input.txt](input.txt), and send
|
||||
EOF (typically ctrl-d).
|
||||
|
||||
Now run again:
|
||||
|
||||
```sh
|
||||
rm -f spinellis ; cc spinellis.c -o spinellis < input2.txt && ./spinellis
|
||||
./spinellis
|
||||
```
|
||||
|
||||
|
||||
## Alternate code:
|
||||
|
||||
For clang try the alt code like:
|
||||
For clang or compilers that won't read from `/dev/tty`, we provide this version.
|
||||
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
cc spinellis.alt.c -o spinellis.alt < input.txt && ./spinellis.alt
|
||||
make clobber alt
|
||||
```
|
||||
|
||||
and try:
|
||||
and follow the instructions.
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
```sh
|
||||
cc spinellis.alt.c -o spinellis.alt < input2.txt && ./spinellis.alt
|
||||
./spinellis.alt
|
||||
```
|
||||
|
||||
Type in or copy paste some C code, perhaps from [input.txt](input.txt), and send
|
||||
EOF (typically ctrl-d).
|
||||
|
||||
Now run again:
|
||||
|
||||
```sh
|
||||
./spinellis.alt
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user