Files
ioccc/2015/muth/machine_gcd.h
Cody Boone Ferguson ef456bfb1e Mass typo fixes
This is a HUGE commit:

    417 files changed, 874 insertions(+), 874 deletions(-)

As the IOCCC website now is https enabled I have updated the
'http://www.ioccc' to 'https://www.ioccc'.

There was also a typo in Makefiles where it said 'for VERY WELCOME' when
it should be 'are VERY WELCOME'.

Finally slashdot.org is also https enabled so references to
'http://slashdot' were changed to 'https://slashdot'.

This was done by my sgit tool (see https://github.com/xexyl/sgit)
like:

    sgit -e 's,http://www.ioccc,https://www.ioccc,g' -e 's/for VERY WELCOME/are VERY WELCOME/g' -e  .

but because I didn't have a list of files that should be modified I had
to be careful which files to commit as I had files that were changed but
not ready to be committed. Since I did it in steps, finding typos as I
went along, I actually ran sgit three times but to simplify the above
(and to show that it's possible to do more than one sed command) I made
it all as one. Since I did not have a list of files ahead of time I had
to determine what files to commit, first going through them like:

    for j in $(for i in $(git status|grep modified|cut -d: -f2); do \
	git grep 'https://www.ioccc' "$i"; done|cut -d: -f1|sort|uniq); \
	do git diff "$j"; done|less -r

(I had to pipe through less because of a strange problem with the git
diff which appears to be because of a terminal problem maybe due to the
command above but it was all I could come up with in a very tired head.)

The above and

    git status | grep modified:

showed that some C files had been modified which obviously should not be
done so I had to do:

    git co '*c'

to undo those changes.

Finally to commit the correct files I did:

    for i in $(git status|grep modified|cut -d: -f2); do \
	git grep -E 'https://www.ioccc|https://slashdot|are VERY WELCOME' "$i"; \
	done |cut -d: -f1|sort|uniq|xargs git commit -v

or so (with any formatting issues or typos here due to typos in the log
due to the terminal (in)sanity issue described).
2023-10-07 04:35:47 -07:00

57 lines
922 B
C

/*
* greatest common divisor
*
* based on https://www.ioccc.org/2001/herrmann1/herrmann1.gcd
*/
// try tape_15_50.h or tape_77_55.h
#define A__ (_, R, A )
#define A_1 (1, L, x9)
#define x0_1 (_, R, x1)
#define x1__ (_, R, xa)
#define x1_1 (1, R, x2)
#define x2__ (_, R, x3)
#define x2_1 (1, R, x2)
#define x3__ (_, R, x3)
#define x3_1 (1, R, x4)
#define x4__ (1, L, x5)
#define x4_1 (1, R, x4)
#define x5_1 (_, L, x6)
#define x6__ (_, R, xc)
#define x6_1 (1, L, x7)
#define x7__ (_, L, x8)
#define x7_1 (1, L, x7)
#define x8__ (_, L, x8)
#define x8_1 (1, L, x9)
#define x9__ (1, R, x0)
#define x9_1 (1, L, x9)
#define xa__ (_, R, xa)
#define xa_1 (_, R, xb)
#define xb__ (_, R, xf)
#define xb_1 (1, R, xc)
#define xc__ (_, R, xd)
#define xc_1 (1, R, xc)
#define xd__ (_, L, xe)
#define xd_1 (_, R, xd)
#define xe__ (_, L, xe)
#define xe_1 (1, L, x7)
#define xf__ (_, break)
#define xf_1 (_, R, xf)