Commit Graph
555 Commits
Author SHA1 Message Date
Cody Boone Ferguson 9cf605973f Minor changes to 1987
Typo fix in 1987/biggar/README.md.

Add another try in 1987/wall/README.md with a question to ponder.
2023-03-16 10:20:34 -07:00
Cody Boone Ferguson 75b8931fdc Minor clarification to 1986/holloway/README.md 2023-03-16 10:19:24 -07:00
Cody Boone Ferguson 0956c5445a Minor fixes in 1985
The README.md referred to Obfuscated C Code Contest but at this point it
was the International Obfuscated C Code Contest.

Add ALT_{OBJ,TARGET} to 1985/shapiro/Makefile as the alt source code
file was there.
2023-03-16 10:17:23 -07:00
Cody Boone Ferguson 3019afc432 Minor updates to 1990
Add thank you note to Cody in some README.md files, remove the warning
that 1990/westley/westley.c might not compile with modern compilers
(since I fixed it) and reworded a statement slightly. Yes I'm thanking
myself but it's actually from the judges.
2023-03-16 10:12:25 -07:00
Cody Boone Ferguson 90f5854290 Link fixes in winners.html
After renaming some of the winner directories to be the winner surname
the winners.html was not updated in every case (particularly for Howe).
2023-03-16 08:54:12 -07:00
Cody Boone Ferguson 0f798012d5 Minor fixes to 1989/tromp - now compiles cleanly
Now compiles without any warnings triggered (though it has some -Wno- at
the compiler). Some of the -Wno- options were removed from the Makefile
as they are no longer needed. I did not check all the ones that are
remaining but some are certainly needed (including some I tested).

Also force use of -include stdio.h -include unistd.h -include stdlib.h
by minor change to Makefile. The last one, -include stdlib.h, was newly
added.
2023-03-16 03:50:02 -07:00
Landon Curt Noll 790433a856 Merge pull request #61 from xexyl/tetris
High score file and other bug fixes in 1989/tromp
2023-03-15 14:29:41 -07:00
Landon Curt Noll 6c557c48bd fix 2000 year Makefile 2023-03-15 14:24:35 -07:00
Landon Curt Noll 451043464f fix Makefile and README.md for 2000/tomx 2023-03-15 14:23:33 -07:00
Landon Curt Noll c1f33ae741 fix Makefile and README.md for 2000/thadgavin 2023-03-15 14:19:09 -07:00
Landon Curt Noll 1717b46c94 fix Makefile and README.md for 2000/schneiderwent
NOTE: This program does not compile.
2023-03-15 14:15:10 -07:00
Landon Curt Noll 000823d86b fix Makefile and README.md for 2000/robison 2023-03-15 14:08:30 -07:00
Landon Curt Noll 3b44e798c8 fix Makefile, README.md and .gitignore for 2000/rince 2023-03-15 14:03:34 -07:00
Landon Curt Noll 568940b9bf fix Makefile and README.md for 2000/primenum 2023-03-15 13:41:23 -07:00
Landon Curt Noll 6f14abe4aa fix Makefile and README.md for 2000/natori
There was an attempt to get natori.c to compile.
We moved the 2 includes to the compile line
restoring the code as a 1-liner.

We forced the types of args iun main to conform to
bogons introduced by the ANSI-C committee.

Nevertheless, the code still fails to compile:

    assignment to cast is illegal, lvalue casts are not supported

This will be a TODO fix for later.
2023-03-15 12:32:32 -07:00
Landon Curt Noll f408bd1fd8 fix Makefile and README.md for 2000/jarijyrki 2023-03-15 12:32:32 -07:00
Cody Boone Ferguson 2c7cc31065 High score file and other bug fixes in 1989/tromp
Previously after the game ran the game segfaulted and the high score
file HI was not created. Now the file is created and sorted so that the
highest score is at the top. This file was not even created because 'd'
was an int and not a FILE * (to show how much has changed over the
years!) which popen() returns.

It seemed that popen() could not have the stty re-enabling of echo
either so it's now in a system() call (it might have been because of a
problem I later fixed as described below).

But reinstating echo did not work right and in fact one could not even
type the character 'u'. The important changes here are:

- 25||i%12<2?7:0;srand(getpid());system("stty cbreak -echo stop u");sigaction(14,v,
+ 25||i%12<2?7:0;srand(getpid());system("stty cbreak -echo");sigaction(14,v,

and

-0);while(getchar()-a[4]);puts("\033[H\033[J\033[7m");sigsetmask(s);}}d=popen(
-"stty -cbreak echo stop \023;cat - HI|sort -rn|head -20>/tmp/$$;mv /tmp/$$ HI\
-;cat HI","w");fprintf(d,"%4d on level %1d by %s\n",w,l,getlogin());pclose(d);}
+8192);printf("\033[H\033[J\033[0m%ld\n",w);if(c==a[5])break;for(j=264;j--;Q[j]=
+0);while(getchar()-a[4]);puts("\033[H\033[J\033[7m");sigsetmask(s);}}system("\
+stty cbreak echo");d=popen("cat - HI 2>/dev/null|sort -rn|head -20>/tmp/$$;mv /tmp/$$ HI\
+;cat HI","w");fprintf(d,"%4d by %s\n",w,getlogin());pclose(d);}

Now a word about these changes and in particularly the assignment to l
and the fprintf(d, ...):

-V;{char *a;*v=(long)t;h[3]=1000000/(l=C>1?atoi(V[1]):2);for(a=C>2?V[2]:"jkl pq";i;i--)*n++=i<
+V;{char *a;*v=(long)t;h[3]=1000000/(C>1?atoi(V[1]):2);for(a=C>2?V[2]:"jkl pq";i;i--)*n++=i<

and

-;cat HI","w");fprintf(d,"%4d on level %1d by %s\n",w,l,getlogin());pclose(d);}
+;cat HI","w");fprintf(d,"%4d by %s\n",w,getlogin());pclose(d);}

If you notice in the fprintf() call the 'l' is no longer referenced - no
level is noted. Why? This is because it was never changed aside from the
initial assignment of

	 l=C>1?atoi(V[1]):2

so there was no point in having the level as the argv was not for a
level but rather drops per second and command string. Thus the high
score (that is now created and updated - up to 20 entries) looks like:

	N by user

where N is the score and user is that from getlogin(). I noted this in
the README.md file.

I also gave a 'Try:' section in the README.md and noted the additional
bug fixes. As well I noted the alternative code which is put in
tromp.alt.c but the unmodified original alternate code which will not
work with modern compilers. Why not fixed? Because doing so the high
score file still was not created even when made to compile okay so I did
not see the point. Perhaps an older compiler will work anyway.

There were two include files that needed to be added which is done via
the compiler option -include: stdio.h and unistd.h.

Now 1989/tromp should work without a segfault, without disabling echo
(or the u key) and with a high score file with up to 20 entries!

One other change with the README is I removed the section 'Bug fix thank
you' as that was redundant: it was already at the top in the how to
build section which seems to be a better place. If nothing else it is
consistent with the others. However I added the links to both Yusuke and
me in the winners.html file like Landon had put int (the other files
with fixes needs the links as well). Of course if it's ideal to have a
separate section (maybe a subsection of how to compile) I will be happy
to find the files that need to be changed and do that.
2023-03-15 08:51:17 -07:00
Landon Curt Noll b5a791a7a9 Merge pull request #60 from xexyl/readmes 2023-03-14 14:42:51 -07:00
Landon Curt Noll 3168b307b3 Merge pull request #59 from xexyl/holloway 2023-03-14 14:42:21 -07:00
Landon Curt Noll 7e80497521 Merge pull request #58 from xexyl/westley 2023-03-14 14:40:23 -07:00
Landon Curt Noll ae4f96ddc2 Merge pull request #57 from xexyl/karns-demo 2023-03-14 14:39:28 -07:00
Landon Curt Noll d1cc7277ea Merge pull request #56 from xexyl/biggar 2023-03-14 14:38:51 -07:00
Landon Curt Noll 70aca76984 Merge pull request #55 from xexyl/author-handle-fixes 2023-03-14 14:37:39 -07:00
Landon Curt Noll 5968f3c6b6 Merge pull request #54 from xexyl/gitignore 2023-03-14 14:36:22 -07:00
Landon Curt Noll a4c9ed7cc8 Merge pull request #53 from xexyl/years 2023-03-14 14:35:49 -07:00
Cody Boone Ferguson 15ce0dc933 Add author comments for 1984/mullender
By a happy chance I found an article that has some words about the entry
from Mullender. See the README.md for the link to that article. We thank
the author of the article for this information!
2023-03-14 09:15:40 -07:00
Cody Boone Ferguson 564a25e0e7 More README.md files updated
Some of the files modified include some of the files modified yesterday;
others were not modified yesterday. I backtracked as I noticed some
sections are missing in earlier README.md files. However more have to be
checked in earlier years. I'm committing now as I have to do other
things and am likely done for the day.
2023-03-14 08:35:01 -07:00
Cody Boone Ferguson cd0d1ef1a4 Add try section to 1986/holloway
Neglected to add it after fixing it to work with clang.
2023-03-14 07:45:27 -07:00
Cody Boone Ferguson 9941402291 Get 1986/holloway to compile with clang
As I described in the README.md the problem was that clang is more
strict about the second (also third but this is not used) arg type being
char **. However changing its type to char ** and updating *s to be **s
resulted in a core dump (segfault); and not doing that caused other
problems. The fix was to do a char *t = s; and then update in the code
the references to s to be t (including passing it to main()). This makes
it compile and run successfully with both clang and gcc.
2023-03-14 07:35:19 -07:00
Cody Boone Ferguson bc454ddb18 Get 1987/westley to compile
Unfortunately this ruins the symmetry but I did make it so that the
problematic code is still shown just commented out. The problem was one
can no longer assign to a cast.

The original version was preserved in westley.alt.c, a worthy thing I
think to do as symmetry is magical and it should be shown how it once
worked without having to look at the archive.
2023-03-14 07:24:06 -07:00
Cody Boone Ferguson 4581f98ca2 Make 2019/karns/demo.sh make prog
Make the script try compiling the entry first. Exit if failure.
2023-03-14 06:03:22 -07:00
Cody Boone Ferguson 4a89ac4fe2 Update 1987/biggar/README.md about missing note
There is supposed to be a comment from the judges in 1987/wall/README.md
about 1987/biggar's entry but it appears to be missing. Rather than
delete the comment in 1987/biggar we note that it was originally there
but has gone missing.
2023-03-14 05:22:45 -07:00
Cody Boone Ferguson ad04d21fda Rename wrongly named author/winner handles
There were many files renamed in this commit and I hope I got all the
references to the old names changed to the new names. To explain this
commit there were some older entries that had the wrong directory name:
not the surname but something else.

Very possibly there are other directories that need to be renamed and I
am actually aware of one right now but since it's in 2005 (which is
close to being worked on) I am not changing that now but just noting it:
2005/anon should be changed to 2005/anonymous (unless there's a very
good reason I am unaware of). But like I said since 2005 will be worked
on soon I have not touched it.

The Makefiles, .gitignore, the all/summary.txt, years.html and
winners.html files as well as the directories and the files under the
renamed directories have all been updated.

This is a rather big update and it might be that there are conflicts. If
so I will fix them. I will have to update 2005/anon later on to try and
prevent this from happening but very possibly there will be conflicts
here. It's also possible I missed some changes in years.html and/or
winners.html and/or summary/all.txt but I think I got them all. These
should be verified later on.
2023-03-14 05:06:16 -07:00
Cody Boone Ferguson 9e540136d1 Add .swp[a-z] to root .gitignore 2023-03-14 04:39:24 -07:00
Cody Boone Ferguson 7c90b435db Move 2014/vik bug notice from years to README.md
As the years.html file will be generated with a tool (yet to be written)
having the bug notice will (greatly)? complicate the generation. Thus
the bug notice (which I discovered when working on 2020/ferguson2) was
moved to 2014/vik/README.md.

But why? Because it is a good idea, I think, to note that although
mostly correct, there is a minor problem with it. I don't have a fix for
it but whether I ever look at that I do not know.

I also made a minor change in 2020/ferguson2/README.md: changed a full
stop to an exclamation mark as it seemed better.
2023-03-14 04:12:22 -07:00
Landon Curt Noll 1846adc6e4 fix Makefile and README.md for 2000/dlowe 2023-03-14 01:28:57 -07:00
Landon Curt Noll e997fd64bd fix Makefile and README.md for 2000/dhyang 2023-03-14 01:28:57 -07:00
Landon Curt Noll a7e1d0c24c fix Makefile and README.md for 2000/briddlebane 2023-03-14 01:28:57 -07:00
Landon Curt Noll a5cb13ee8f fix Makefile and README.md for 2000/bmeyer 2023-03-14 01:28:57 -07:00
Landon Curt Noll 8755f28add fix titles in previous 2020 README.md files 2023-03-14 01:28:57 -07:00
Landon Curt Noll a01cce65a5 fix Makefile and README for 2000/bellard 2023-03-14 01:28:57 -07:00
Landon Curt Noll 662ed6e670 fix Makefile and README for 2000/anderson 2023-03-14 01:28:57 -07:00
Landon Curt Noll b8e590ef96 Merge pull request #52 from xexyl/readme 2023-03-13 10:21:32 -07:00
Landon Curt Noll ba7d7ac828 Merge pull request #51 from xexyl/wall 2023-03-13 10:20:24 -07:00
Landon Curt Noll c09de89f3d Merge pull request #50 from xexyl/choo-choo 2023-03-13 10:19:20 -07:00
Landon Curt Noll 40165808e7 Merge pull request #49 from xexyl/ferguson 2023-03-13 10:18:00 -07:00
Cody Boone Ferguson 4db6c8994b Many README.md fixes and some Makefile fixes
The years 1984, 1985 and 1986 have had all winning entry README.md files
updated. This includes formatting, adding author's comments (which in
these years means nothing but still have the section there to indicate
that there were no comments) and possibly other things.

I have updated some - not all - of the 1987 winning entry README.md
files. I have to do other things now but I want these committed. I will
work on the other README.md files another time.
2023-03-13 10:11:02 -07:00
Cody Boone Ferguson 82cbf069a7 Get 1986/wall to work
Although under linux it compiled (as long as the compiler supports
-traditional-cpp) it did not function correctly. We used a patch from
Yusuke Endoh. Thank you Yusuke!
2023-03-13 09:03:29 -07:00
Cody Boone Ferguson 3908c44d41 Get 1986/marshall to compile and work with clang
Choo choo!

This did not take much that work but it required some casts because the
third arg to main() was an int and now it's a char **. I tried to keep
the layout as close to the original. The line lengths are the same as
the original but some spaces are now non-spaces. I noted this in the
README.md.

As well in the README.md I have added an author's comments section.
Still working on other README.md files for this. However I might try and
get some entries to compile that previously did not. There was another
entry in 1986 that this was not so simple to do so I moved on. Maybe I
will revisit that another time (1986/holloway).
2023-03-13 08:44:52 -07:00
Cody Boone Ferguson aa15137a9d Update 2020/ferguson[12]
Surprise, surprise there are more updates on my entries! :-) But to be
fair to me there were some important fixes and I had not really gone
through the README files of these entries (I still didn't go through all
of them thoroughly and probably won't since I'm far too concise :-)
:-)). In fact some of these problems broke some of the features of some
of the entries.

In 2020/ferguson1: termcaps must be compiled by make all. It also needed
a make test rule that runs ./termcaps. As well it needed a play and
snake-colours rule which copies and chmod +x the respective .sh files.

There were some typo fixes here and there as well as (I hope) a bit
clearer wording.

Some out of date things were changed.
2023-03-13 06:12:20 -07:00