Merge pull request #1605 from xexyl/mills2013-fix-fix

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-12-03 08:31:52 -07:00
commit 1dcf6a0762
5 files changed
+36 -13

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ ARCH=
# Defines that are needed to compile
#
CDEFINE= -DLT=0,-9,70,130,50,30,-60,40,30 -DNL=9 -DEY=0,-22,37 \
-Dwin_port="sin_addr.s_addr=htonl(2130706433),R.sin_port"
-Dwin_port="sin_addr.s_addr=htonl(2130706433),R.sin_port" -Dl=10
# Include files that are needed to compile
#
+1 -1
View File
@@ -25,7 +25,7 @@ r(e-p-8); while(p!=e){ c^=*p++; for(j=0; 8>j; j++)c=c/2^c%2*3988292384; } r(~c);
(); } void q(int c){ w(c); m+=c; m%=c=65521; n+=m; n%=c; } void T(F c){ c=.5+255
*c; q(0>c?0:c>255?255:c); } struct sockaddr_in R; int main(){ time_t i; struct
tm*b; R.win_port=8224; s=socket(R.sin_family=AF_INET,SOCK_STREAM,0); bind(s,
(void*)&R, sizeof R); listen(s,10); for(; ; ){ k=accept(s,0,0); for(; ; ){ ++j;
(void*)&R, sizeof R); listen(s,l); for(; ; ){ k=accept(s,0,0); for(; ; ){ ++j;
read(k,p,1); if(*p=='\n') { if(3>j)break; j=0; } } m=1; u("\n\032\n\rGNP"
"\211\n\r\n\r1 :hserfeR\n\rKO 002 0.1/PTTH"); Z("RDHI"); r(800); r(600); w
(8); r(33554433); J(); Z(0); w(120); w(1); J(); i=time(0); b=localtime(&
+4 -2
View File
@@ -9,14 +9,16 @@ make
```sh
./robison
# enter an expression
echo expression | ./robison
```
### Try:
```sh
echo '1*2*3*4*5*6*7*8*9%1000' | ./robison
echo '100000000000000000000*(20*(1+(99477941840441*50)))/31664812345028528' | ./robison
./try.sh
```
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2013/robison
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
read -r -n 1 -p "Press any key to run: echo '1*2*3*4*5*6*7*8*9%1000' | ./robison: "
echo 1>&2
echo '1*2*3*4*5*6*7*8*9%1000' | ./robison
echo 1>&2
read -r -n 1 -p "Press any key to run: echo '100000000000000000000*(20*(1+(99477941840441*50)))/31664812345028528' | ./robison: "
echo 1>&2
echo '100000000000000000000*(20*(1+(99477941840441*50)))/31664812345028528' | ./robison
+5 -9
View File
@@ -3574,15 +3574,6 @@ program rather than the file specified. It does not try and detect if the file
exists or can be read as that will be handled by the shell/program.
## [2013/endoh4](2013/endoh4/endoh4.c) ([README.md](2013/endoh4/README.md))
[Cody](#cody) added the [run.sh](2013/endoh4/run.sh) script which temporarily turns off
the cursor as suggested by the author, with the addition that if no file is
specified it will feed the source code [endoh4.c](2013/endoh4/endoh4.c) to the
program rather than the file specified. It does not try and detect if the file
exists or can be read as that will be handled by the shell/program.
## [2013/hou](2013/hou/hou.c) ([README.md](2013/hou/README.md))
[Cody](#cody) fixed the Makefile so that this would work properly. Before this the use of
@@ -3637,6 +3628,11 @@ Firefox both had the problem.
implicitly (Linux doesn't seem to but macOS does).
## [2013/robison](2013/robison/robison.c) ([README.md](2013/robison/README.md))
[Cody](#cody) added the [try.sh](2013/robison/try.sh) script.
# <a name="2014"></a>2014