Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/games/gomoku



Module Name:    src
Committed By:   rillig
Date:           Sun May 29 10:37:21 UTC 2022

Modified Files:
        src/games/gomoku: bdinit.c gomoku.h main.c makemove.c pickmove.c

Log Message:
gomoku: turn spotstr.s_frame into a frame index

Most calculations are done on the frame index, not the pointer. This
avoids dealing with ptrdiff_t conversion to int.

Changing the type of s_frame changes the size of struct spotstr, it is
now 56 bytes on LP64 and 48 bytes on ILP32, neither of which is a power
of two. Remove the dummy padding since compilers no longer generate
division instructions for divisions by small integer constants, so that
optimization is no longer necessary.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/games/gomoku/bdinit.c
cvs rdiff -u -r1.48 -r1.49 src/games/gomoku/gomoku.h
cvs rdiff -u -r1.68 -r1.69 src/games/gomoku/main.c
cvs rdiff -u -r1.35 -r1.36 src/games/gomoku/makemove.c
cvs rdiff -u -r1.52 -r1.53 src/games/gomoku/pickmove.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index