Add alternative code for 1984/mullender for all!
Now anyone can enjoy 1984/mullender! This was a slight change to code originally suggested in the faq (which was also updated, see below) made for modern systems (since CPUs are much faster nowadays the duration for usleep was much too long so one could not really enjoy the entry). Updated bugs.md to remove this entry from the bugs.md file. Also updated faq.md with another item. Unfortunately I had already added another entry to faq.md and had failed to commit it before doing this change (and adding it to the faq): how to get X11 entries (or actually any X11 application) to work in macOS Mountain Lion and beyond. This is why that faq entry is on this branch. It was not intended but it felt like this change should be on its own branch / in a separate pull request. I did not want to temporarily modify faq.md simply for this. I have more changes to faq.md to make but that'll be on another branch so that I have these changes there as well.
This commit is contained in:
1 parent
99e872cc14
commit
ef2828e9c1
6 files changed
+60
-23
No files matched your search
@@ -1 +1,2 @@
|
||||
mullender
|
||||
mullender.alt
|
||||
@@ -111,8 +111,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
|
||||
#################
|
||||
@@ -136,6 +136,9 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${ALT_TARGET}: ${PROG}.alt.c
|
||||
${CC} -include stdio.h -include unistd.h ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
@@ -16,6 +16,20 @@ Robbert van Renesse
|
||||
> not execute correctly. In later years, machine dependent
|
||||
> code was discouraged.
|
||||
|
||||
## Alternative code:
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) added the alternative
|
||||
code which lets you run this on other systems. He notes though that this was
|
||||
only a slight fix to the change in the [faq](/faq.md). Thank you Cody for your
|
||||
assistance!
|
||||
|
||||
To build:
|
||||
|
||||
|
||||
make alt
|
||||
|
||||
Use `./mullender.alt` as you would `./mullender` above.
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
main(){int i=10000;do write(1," :-)\b\b\b\b",9),usleep(i);while(--i);}
|
||||
Reference in new issue
Block a user