There was an inconsistency between the README.md and the bugs.md file
that has been fixed.
As well the program requires one be able to read, write and execute
memory. This is not allowed in macOS with the silicon chip so I have
added the status of it not working with some platforms.
A few minor formatting fixes were made in the README.md file but I
didn't go through the file so it can't be considered done.
The input.txt file is what the author included in their remarks as
input to try out. This has been integrated into one of the commands to
try in the try section (which did not even have a command to try out -
it just referred to the command in the to use section).
BTW: the author mentioned the Mersenne prime. Did you know that Landon
Curt Noll has held eight world records related to large primes?
The bugs.md file was updated slightly and so was the thanks file, namely
suggesting that it might be possible for further code to be added to the
alt code to make it set up https (they already stated that there might
be a command line that could get it to work).
The alt code should (though untested) work in Windows which
distinguishes between text and binary. It uses the Windows functions
_fileno() and _setmode() to set binary mode on stdout.
The README.md file has been format/typo checked.
I believe that entries that alt versions are recommended to try first
should say what it looks like in modern systems so much as what it
looked like with systems of the time it was published.
Other entries with this have to be located as well so I've put it in the
todo.md file too.
Since some entries require intr/EOF etc. I have added to the FAQ how to
find it. This was inspired by the 2005/sykes as to end the program one
has to send intr. For those with grep -o it's possible to show just the
output; other ways exist but those ways are more complicated and I've
not gone there.
Add PET program written in the emulator and add it to the try.sh script.
The try.sh script now explicitly requires one hit 'q' (or 'Q') to quit
(or else killing it or hitting interrupt); after one command is done
(hitting ctrl-c) it shows the menu again which has the quit option in
there. This makes it a bit easier or at least clearer (cleaner?).
The Makefile DATA variable had to be updated after file rename.
There were some other issues in the README.md file as well that I missed
yesterday.
The bugs.md file has been updated pointing out that one has to hit
ctrl-c or whatever the interrupt is set to.
I believe now that this entry should be complete.
The bugs.md file has been updated with INABIAF section. The README.md
refers to this file.
The README.md has had a slight improvement in that references to lines
in the author's remarks have been turned into links.
The try.sh is different from others in that it is a loop showing a menu
with different options to use the emulator. It notes at the start of
each iteration that one has to hit ctrl-c or whatever they have set
their interrupt as.
The test.sh is run by make test. The exit status is ignored as it
returns non-zero.
Format/typo check README.md.
I am not done with this entry as the bugs.md should probably be updated
to note some things the author noted. This will have to come another
time.
It only has one command. This is because I don't want to knacker my
brain and I don't want to damage anyone else's brain either.
Format/typo check README.md.
Refer to thanks file, not the README.md file of the entry when fixing
entries.
Refer to how-to-help.md, not how-to-bugfix.md as I renamed it a while
back as the file doesn't really say how to fix bugs (how could it?) but
rather how to help.
The code (both alt and entry) no longer assumes that the source code
filename is the same as the running program with '.c' added. Instead it
uses __FILE__. This does make it slightly less obscure (see next part)
but it is also slightly less error prone at least in some cases. The way
it worked before is that it copied to a buffer '*argv' and then used
strcat(3) with the string ".c" to come up with the filename. The author
actually stated:
As long as the source is in the same directory as the executable it
should be able to find it.
... but this was not strictly true. Now as long as the source file it
was compiled as is in the directory it will find it even if the
executable was copied/linked/renamed to something else.
Format/typo check README.md file.
It is not yet clear to me if some of the information in the two files
should be swapped. I think it probably should be done as the point in
the thanks file was to be a quick note but it ended up being long and
with details better left to the FAQ. But this can be done another time
after the remaining entries are reviewed or sometime in between.
The script did not check if all versions could be compiled, just that
180 versions were found. Now it reports an error if not all versions
(180) are found (exit code 1) or if any of the versions failed to
compile (exit code 2). Otherwise it returns 0, success.
The regexp for finding errors is '[^-]error' because the CFLAGS contain
the option -Wno-error which would be a false positive.
Now if any version fails to compile it will let the user know. Also in
that case out.count is kept so that one can look at the problem (it also
tells one how to show the results with grep(1) and even notes that if
they want to report it or try and fix it and open a GitHub pull request
that they're welcome to do so).
The giljade.c file's last line now ends on the column that it used to
before the fix of the test suite mode working. This does not affect the
output of the program and the fix did not either but it feels a bit
better this way anyway.
After one exited less(1) the text about leaving the file there for one
to look at it with an editor was on the same line as other output.
Also use less -X so that the screen is not cleared. That way one can see
the last part of the file that they looked at.
Previously the alt rule in the Makefile defined NO_STTY which stops the
code from using stty(1) at the beginning and at the end. The stty sane
resulted in a bus error in macOS and since the sole purpose was to set
echo back on I changed it to stty echo (which works). (The NO_STTY macro
is still checked, see below.)
Added alt code with vi(m) like movements.
The way to get it to not use stty is to use either make alt-no_stty or
no_stty. The former will compile into anon.alt and the latter will
compile into anon.
Format and typo fix README.md file.
Based on the remarks for QEMU one has to have the macro K defined as 1
so in the alt code it does an #undef K and then a #define K 1. The other
macros are defined if not defined (#ifndef .. #endif).
The instructions could be improved upon. As of now it only tells how to
compile it and that use is similar to the main entry except that one
uses QEMU instead. The file names like kernel, vi etc. are still those
names with the alt version build. I have no good way to test this out
but unless I made a typo in the Makefile everything should be good
assuming that it still works.
This should (if all is good with the Makefile rules) complete
2004/gavin.
The try.sh script lets one experience the entry without having to use
vi(m) .. you know, in case they're afraid of getting stuck :-) (and it
is easier too). The script leaves the file there (rather than piping to
less(1)) so that one can view it in a text editor if they wish.
The file test.sh runs the test suite mode but it filters out the running
of 'make', instead only showing the lines matching '^Line'. When it's
all done it checks if 180 versions (lines) were found (it writes to
stdout and another file with tee(1)). If it does not find 180 it is an
error and this is reported (with exit 1). If it does find 180 all is
good. The make test rule was added and uses this script.
Format and typo check README.md file.
The try.sh script is for aidan.c; the try.alt.sh is for aidan.alt.c
(which I added some while back based on the author's remarks).
The README.md file has been format and typo fixed.