| History log of /src/games/gomoku |
| Revision | Date | Author | Comments |
| 1.13 | 07-Oct-2023 |
rin | Drop -O[01] hacks for vax; no longer necessary for patched GCC 10
PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton
XXXRO: GCC 12 may require hacks for a while, but it turned out that GCC 12 should be treated differently from older versions; a lot of new files need -O[01] flags, while some may no longer require it.
I will take a look later.
Note that these hacks are not required if Kalvis's patches for GCC 12 are applied.
Keep doc/HACKS entries for a while (will be sync with update for GCC 12).
diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile index 96a93f5e396..4e38be1b642 100644 --- a/crypto/external/bsd/openssh/lib/Makefile +++ b/crypto/external/bsd/openssh/lib/Makefile @@ -117,12 +117,6 @@ COPTS.${f}.c+= -Wno-pointer-sign # XXX COPTS.channels.c+= -fno-strict-aliasing
-# XXX -.if ${MACHINE} == "vax" -COPTS.poly1305.c+= -O0 -COPTS.umac.c+= -O0 -.endif - COPTS.hostfile.c+= ${CC_WNO_FORMAT_TRUNCATION} COPTS.sshkey.c+= ${CC_WNO_FORMAT_TRUNCATION} COPTS.cipher.c+= -Wno-error=deprecated-declarations diff --git a/distrib/utils/x_ping/Makefile b/distrib/utils/x_ping/Makefile index f1c452a0d60..8ee77580a3f 100644 --- a/distrib/utils/x_ping/Makefile +++ b/distrib/utils/x_ping/Makefile @@ -12,10 +12,6 @@ CPPFLAGS+= -I${SRCDIR} -DCRUNCHOPS DPADD= ${LIBM} LDADD= -lm
-.if ${MACHINE_ARCH} == "vax" -COPTS.ping.c=-O0 -.endif - .include <bsd.prog.mk>
.PATH: ${SRCDIR} diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc index d3f4470c6c7..6a1dd146d7d 100644 --- a/external/apache2/argon2/lib/libargon2/Makefile.inc +++ b/external/apache2/argon2/lib/libargon2/Makefile.inc @@ -16,7 +16,3 @@ CFLAGS+= -pthread LDADD+=-lpthread DPADD+=${LIBPTHREAD} .endif - -.if ${MACHINE} == "vax" -COPTS.blake2b.c+= -O0 -.endif diff --git a/external/bsd/jemalloc/lib/Makefile.inc b/external/bsd/jemalloc/lib/Makefile.inc index 2f524358f46..d5da774f293 100644 --- a/external/bsd/jemalloc/lib/Makefile.inc +++ b/external/bsd/jemalloc/lib/Makefile.inc @@ -53,12 +53,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector COPTS.stats.c+=-Wno-error=stack-protector COPTS.tcache.c+=-Wno-error=stack-protector
-.if ${MACHINE_ARCH} == "vax" -# in merge_overlapping_regs, at regrename.c -COPTS.arena.c+=-O0 -COPTS.extent.c+=-O0 -.endif - SRCS+=${JEMALLOC_SRCS}
jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \ diff --git a/external/bsd/mdocml/lib/libmandoc/Makefile b/external/bsd/mdocml/lib/libmandoc/Makefile index 40d7e29ae88..dfd3077a2c7 100644 --- a/external/bsd/mdocml/lib/libmandoc/Makefile +++ b/external/bsd/mdocml/lib/libmandoc/Makefile @@ -39,11 +39,6 @@ tbl_opts.c
MAN= mandoc.3
-# XXX -.if ${MACHINE} == "vax" -COPTS.mdoc_macro.c+=-O0 -.endif - COPTS.man_validate.c+=-Wno-error=array-bounds
.include <bsd.lib.mk> diff --git a/external/gpl3/binutils.old/lib/libbfd/Makefile b/external/gpl3/binutils.old/lib/libbfd/Makefile index 03477232b55..74a354532fa 100644 --- a/external/gpl3/binutils.old/lib/libbfd/Makefile +++ b/external/gpl3/binutils.old/lib/libbfd/Makefile @@ -41,10 +41,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \ -DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \ -DBINDIR=\"${BINDIR}\"
-.if (${BFD_MACHINE_ARCH} == "vax") -CPPFLAGS.elf.c += -O0 -.endif - COPTS.pei-x86_64.c+= -Wno-stack-protector COPTS.elfxx-mips.c+= -Wno-stack-protector COPTS.elf.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :} diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile index 00cb2b20081..a3f0c25fd35 100644 --- a/external/gpl3/binutils/lib/libbfd/Makefile +++ b/external/gpl3/binutils/lib/libbfd/Makefile @@ -41,10 +41,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \ -DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \ -DBINDIR=\"${BINDIR}\"
-.if (${BFD_MACHINE_ARCH} == "vax") -CPPFLAGS.elf.c += -O0 -.endif - COPTS.pei-x86_64.c+= -Wno-stack-protector COPTS.elfxx-mips.c+= -Wno-stack-protector COPTS.elf.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :} diff --git a/external/gpl3/gcc.old/lib/Makefile.sanitizer b/external/gpl3/gcc.old/lib/Makefile.sanitizer index efd36ae4bee..5173a5109a0 100644 --- a/external/gpl3/gcc.old/lib/Makefile.sanitizer +++ b/external/gpl3/gcc.old/lib/Makefile.sanitizer @@ -88,22 +88,3 @@ COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables
# Can't profile without it` #-fomit-frame-pointer - -.if ${MACHINE_ARCH} == "vax" -COPTS.sanitizer_allocator.cc += -O1 -COPTS.sanitizer_common.cc += -O1 -COPTS.sanitizer_common_libcdep.cc += -O1 -COPTS.sanitizer_coverage_libcdep.cc += -O1 -COPTS.sanitizer_coverage_mapping_libcdep.cc += -O1 -COPTS.sanitizer_deadlock_detector1.cc += -O1 -COPTS.sanitizer_mac.cc += -O1 -COPTS.sanitizer_netbsd.cc += -O1 -COPTS.sanitizer_posix.cc += -O1 -COPTS.sanitizer_printf.cc += -O1 -COPTS.sanitizer_procmaps_common.cc += -O1 -COPTS.sanitizer_stackdepot.cc += -O1 -COPTS.sanitizer_symbolizer_libcdep.cc += -O1 -COPTS.sanitizer_symbolizer_report.cc += -O1 -COPTS.ubsan_diag.cc += -O1 -COPTS.ubsan_init.cc += -O1 -.endif diff --git a/external/gpl3/gcc.old/lib/libasan/Makefile b/external/gpl3/gcc.old/lib/libasan/Makefile index 1e6f9608abe..3da7bbf2f58 100644 --- a/external/gpl3/gcc.old/lib/libasan/Makefile +++ b/external/gpl3/gcc.old/lib/libasan/Makefile @@ -49,14 +49,6 @@ LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CPPFLAGS+=-DCAN_SANITIZE_UB=0
-.if ${MACHINE_ARCH} == "vax" -COPTS.asan_allocator.cc += -O1 -COPTS.asan_report.cc += -O1 -COPTS.sanitizer_file.cc += -O1 -COPTS.ubsan_diag.cc += -O1 -COPTS.ubsan_init.cc += -O1 -.endif - .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" COPTS.asan_interceptors.cc += -O1 .endif diff --git a/external/gpl3/gcc.old/lib/liblsan/Makefile b/external/gpl3/gcc.old/lib/liblsan/Makefile index 4578544a9a8..ddb7981077c 100644 --- a/external/gpl3/gcc.old/lib/liblsan/Makefile +++ b/external/gpl3/gcc.old/lib/liblsan/Makefile @@ -16,11 +16,6 @@ LSAN_SRCS+= \ lsan_linux.cc \ lsan_thread.cc
-.if ${MACHINE_ARCH} == "vax" -COPTS.lsan_allocator.cc += -O1 -COPTS.sanitizer_file.cc += -O1 -.endif - LIB= lsan SRCS+= ${LSAN_SRCS} LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm diff --git a/external/gpl3/gcc.old/lib/libubsan/Makefile b/external/gpl3/gcc.old/lib/libubsan/Makefile index 2e2faca7b1c..9de82550d14 100644 --- a/external/gpl3/gcc.old/lib/libubsan/Makefile +++ b/external/gpl3/gcc.old/lib/libubsan/Makefile @@ -26,10 +26,6 @@ UBSAN_SRCS= \ COPTS.${_s}.cc+=-frtti .endfor
-.if ${MACHINE_ARCH} == "vax" -COPTS.sanitizer_file.cc += -O1 -.endif - LIB= ubsan SRCS+= ${UBSAN_SRCS} LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm diff --git a/external/gpl3/gcc.old/usr.bin/cc1/Makefile b/external/gpl3/gcc.old/usr.bin/cc1/Makefile index c55e292ee8e..ff12a5be524 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1/Makefile @@ -46,17 +46,6 @@ CPPFLAGS.default-c.c+= -I${BACKENDOBJ} BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c .endif
-.if ${MACHINE_CPU} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1-checksum.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile index 3123ee0d60b..aab82ad3448 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile @@ -44,16 +44,8 @@ COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector
-.if ${MACHINE_ARCH} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1obj-checksum.c+=-O0 -.endif +COPTS.c-cppbuiltin.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} +COPTS.c-typeck.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
.if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 diff --git a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile index b9c108251c5..e04e8fc7f53 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile @@ -69,18 +69,6 @@ COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector
-.if ${MACHINE_ARCH} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1obj-checksum.c+=-O0 -COPTS.decl.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile index 7936efd3a5e..7c54559e21a 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile @@ -31,23 +31,6 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \
CFLAGS+= -Wno-error=stack-protector
-.if ${MACHINE_ARCH} == "vax" -COPTS.call.c+=-O0 -COPTS.decl.c+=-O0 -COPTS.typeck2.c+=-O0 -COPTS.class.c+=-O0 -COPTS.typeck.c+=-O0 -COPTS.init.c+=-O0 -COPTS.semantics.c+=-O0 -COPTS.mangle.c+=-O0 -COPTS.constexpr.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1plus-checksum.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/gcc/Makefile b/external/gpl3/gcc.old/usr.bin/gcc/Makefile index 7a66d77ffc7..a5a4b1c3adf 100644 --- a/external/gpl3/gcc.old/usr.bin/gcc/Makefile +++ b/external/gpl3/gcc.old/usr.bin/gcc/Makefile @@ -25,9 +25,6 @@ ${SRCS}: ${GCCARCH}/defs.mk .include <bsd.info.mk>
COPTS.gcc.c= -Wno-stack-protector -.if ${MACHINE_ARCH} == "vax" -COPTS.dse.c= -O1 -.endif
.PATH: ${DIST}/gcc ${DIST}/gcc/doc ${DIST}/gcc/c
diff --git a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile index 751d1513eec..33aeb1c9898 100644 --- a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile +++ b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile @@ -14,10 +14,6 @@ SRCS= decNumber.c decContext.c decimal32.c decimal64.c decimal128.c CPPFLAGS+= -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} -I${DIST}/libdecnumber CPPFLAGS+= -I${DIST}/libgcc
-.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .include <bsd.lib.mk>
# Force using C++ for this diff --git a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile index 90f44a9fcf6..fd251464fb7 100644 --- a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile +++ b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile @@ -24,11 +24,6 @@ COPTS.lto-common.c+= -Wno-stack-protector .include "../Makefile.backtrace" .include "../Makefile.libdecnumber"
-.if ${MACHINE_ARCH} == "vax" -COPTS.lto-lang.c+=-O0 -COPTS.lto-symtab.c+=-O0 -.endif - LDADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm DPADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}
diff --git a/external/gpl3/gcc.old/usr.bin/lto1/Makefile b/external/gpl3/gcc.old/usr.bin/lto1/Makefile index 4c49161a64c..340d3c6124f 100644 --- a/external/gpl3/gcc.old/usr.bin/lto1/Makefile +++ b/external/gpl3/gcc.old/usr.bin/lto1/Makefile @@ -21,11 +21,6 @@ COPTS.lto-common.c+= -Wno-stack-protector .include "../Makefile.libcpp" .include "../Makefile.libdecnumber"
-.if ${MACHINE_ARCH} == "vax" -COPTS.lto-lang.c+=-O0 -COPTS.lto-symtab.c+=-O0 -.endif - LDADD+= ${LIBIBERTYOBJ}/libiberty.a DPADD+= ${LIBIBERTYOBJ}/libiberty.a LDADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm diff --git a/external/gpl3/gdb.old/lib/libdecnumber/Makefile b/external/gpl3/gdb.old/lib/libdecnumber/Makefile index bcd4ae5b222..ce28811526b 100644 --- a/external/gpl3/gdb.old/lib/libdecnumber/Makefile +++ b/external/gpl3/gdb.old/lib/libdecnumber/Makefile @@ -18,10 +18,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \
SRCS= ${G_OBJS:.o=.c} ${G_SOURCES}
-.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd
.include <bsd.lib.mk> diff --git a/external/gpl3/gdb/lib/libdecnumber/Makefile b/external/gpl3/gdb/lib/libdecnumber/Makefile index c95d36e3dfa..e3169865304 100644 --- a/external/gpl3/gdb/lib/libdecnumber/Makefile +++ b/external/gpl3/gdb/lib/libdecnumber/Makefile @@ -18,10 +18,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \
SRCS= ${G_OBJS:.o=.c} ${G_SOURCES}
-.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd ${DIST}/libdecnumber/bid
.include <bsd.lib.mk> diff --git a/external/gpl3/gdb/lib/libgdb/Makefile b/external/gpl3/gdb/lib/libgdb/Makefile index b87a515d13a..c118c363975 100644 --- a/external/gpl3/gdb/lib/libgdb/Makefile +++ b/external/gpl3/gdb/lib/libgdb/Makefile @@ -66,12 +66,6 @@ CFLAGS:= ${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector
ada-exp.c: ada-lex.c
-.if ${MACHINE} == "vax" -. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8 -COPTS.read.c+= -O0 -. endif -.endif - # These are generated by implicit rules and are not easy to generate CLEANDIRFILES+= \ ada-exp.c ada-lex.c \ diff --git a/external/mit/xorg/lib/gallium.old/Makefile b/external/mit/xorg/lib/gallium.old/Makefile index 55b2fe3d1c1..bfa40c8974f 100644 --- a/external/mit/xorg/lib/gallium.old/Makefile +++ b/external/mit/xorg/lib/gallium.old/Makefile @@ -1211,10 +1211,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL COPTS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :} .endif
-.if ${MACHINE_ARCH} == "vax" -COPTS.nir.c += -O1 -.endif - # XXXGCC12 .if ${MACHINE_ARCH} == "m68k" COPTS.st_glsl_to_tgsi.cpp += -O1 diff --git a/external/mit/xorg/lib/gallium/Makefile b/external/mit/xorg/lib/gallium/Makefile index 6778a8c11c8..9f1422080fe 100644 --- a/external/mit/xorg/lib/gallium/Makefile +++ b/external/mit/xorg/lib/gallium/Makefile @@ -1428,10 +1428,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL COPTS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :} .endif
-.if ${MACHINE_ARCH} == "vax" -COPTS.nir.c += -O1 -.endif - COPTS.u_atomic.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}
.include <bsd.lib.mk> diff --git a/external/mit/xorg/lib/libX11/Makefile.libx11 b/external/mit/xorg/lib/libX11/Makefile.libx11 index e103d9ace12..0e55c2a4732 100644 --- a/external/mit/xorg/lib/libX11/Makefile.libx11 +++ b/external/mit/xorg/lib/libX11/Makefile.libx11 @@ -471,11 +471,6 @@ COPTS.OpenDis.c+= -Wno-error # XXX xf86bigfstr.h COPTS.XlibInt.c+= -Wno-error # XXX xcmiscstr.h COPTS.XKBBind.c+= -Wno-deprecated-declarations # uses XKeycodeToKeysym
-# XXX -.if ${MACHINE} == "vax" -COPTS.lcWrap.c+= -O0 -.endif - CWARNFLAGS.clang+= -Wno-string-plus-int
.include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys" diff --git a/games/gomoku/Makefile b/games/gomoku/Makefile index e86a63aaea7..678537066ed 100644 --- a/games/gomoku/Makefile +++ b/games/gomoku/Makefile @@ -9,10 +9,6 @@ LDADD= -lcurses -lterminfo HIDEGAME=hidegame CPPFLAGS+= ${DEBUG:D-DDEBUG}
-.if ${MACHINE} == "vax" -COPTS.pickmove.c += -O0 -.endif - #WARNS= 6 # would produce warnings about small integer types LINTFLAGS+= -w # treat warnings as errors LINTFLAGS+= -T # strict bool mode diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile index e9c53f23ae5..b919dac17c6 100644 --- a/games/phantasia/Makefile +++ b/games/phantasia/Makefile @@ -52,7 +52,3 @@ map: map.c ./map | plot > /dev/tty
.include <bsd.prog.mk> - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.misc.c+= -O0 -.endif diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile index 712c1515d42..7136f7f0cc3 100644 --- a/lib/i18n_module/UTF7/Makefile +++ b/lib/i18n_module/UTF7/Makefile @@ -3,6 +3,3 @@ SRCPRE=citrus_ .include <bsd.lib.mk>
-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) -COPTS.citrus_utf7.c+= -O0 -.endif diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index b2aea1e04b0..e60a2862d48 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -15,11 +15,6 @@ SRCS= blocksort.c huffman.c crctable.c randtable.c compress.c \ INCS= bzlib.h INCSDIR= /usr/include
-# XXX huffman.c gets mis-compiled with 2.95.3 -.if ${MACHINE_ARCH} == "vax" -COPTS+= -O0 -.endif - COPTS+= ${CC_WNO_IMPLICIT_FALLTHROUGH}
# XXX blocksort.c gets mis-compiled with 4.1 diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc index 132686fc33d..609da919803 100644 --- a/lib/libc/gdtoa/Makefile.inc +++ b/lib/libc/gdtoa/Makefile.inc @@ -44,10 +44,3 @@ SRCS+= dmisc.c \ .if ${MACHINE_ARCH} != "vax" SRCS+= strtord.c .endif - -# XXX revisit with newer GCC. -# Ensure numbers like 0xffff319f5fa95963 print correctly -# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<") -.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) -COPTS.misc.c+= -O0 -.endif diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile index cb3f89d6d09..e9c8be820da 100644 --- a/lib/libcrypt/Makefile +++ b/lib/libcrypt/Makefile @@ -30,9 +30,6 @@ SRCS+= crypt-argon2.c SRCS+= ${src} COPTS.${src}+= -fvisibility=hidden . endfor -. if ${MACHINE} == "vax" -COPTS.blake2b.c+= -O0 -. endif .endif
WARNS?= 5 diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile index f5baae1e883..24f7e1121e5 100644 --- a/libexec/ld.elf_so/Makefile +++ b/libexec/ld.elf_so/Makefile @@ -141,10 +141,6 @@ CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\" COPTS.rtld.c+= -Wno-stack-protector COPTS.symbol.c+=-Wno-stack-protector
-.if ${MACHINE_CPU} == "vax" -COPTS.rtld.c+= -O0 -.endif - LDADD+= -Wl,--version-script=${.CURDIR}/symbols.map LDADD+= -L${CLIBOBJ} -L${DESTDIR}${LIBDIR} .if ${MKPICLIB} != "no" diff --git a/sbin/fsck_ffs/Makefile.common b/sbin/fsck_ffs/Makefile.common index 765638b2801..824e3bf2628 100644 --- a/sbin/fsck_ffs/Makefile.common +++ b/sbin/fsck_ffs/Makefile.common @@ -36,7 +36,3 @@ COPTS.ffs_appleufs.c+= -Wno-pointer-sign .if ${MACHINE_ARCH} == "m68000" COPTS.pass1.c+= -fno-tree-fre -fno-tree-lrs .endif -.if ${MACHINE_ARCH} == "vax" -COPTS.pass1.c+= -O0 -COPTS.inode.c+= -O0 -.endif diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile index c039f73a1eb..3b0331e5880 100644 --- a/sbin/fsdb/Makefile +++ b/sbin/fsdb/Makefile @@ -39,12 +39,6 @@ COPTS.${f}.c+= -Wno-pointer-sign COPTS.pass1.c+= -fno-tree-fre -fno-tree-lrs .endif
-.if ${MACHINE_ARCH} == "vax" -COPTS.pass1.c+= -O0 -COPTS.inode.c+= -O0 -COPTS.fsdb.c+= -O0 -.endif - CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
.include <bsd.prog.mk> diff --git a/sbin/newfs_ext2fs/Makefile b/sbin/newfs_ext2fs/Makefile index 40a44b9a038..ecfdbff4d3a 100644 --- a/sbin/newfs_ext2fs/Makefile +++ b/sbin/newfs_ext2fs/Makefile @@ -20,8 +20,4 @@ DPADD+=${LIBPROP}
.PATH: ${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK}
-.if ${MACHINE_ARCH} == "vax" -COPTS.mke2fs.c=-O0 -.endif - .include <bsd.prog.mk> diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index 4f33501ea7a..1f7f56e3ea5 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -12,8 +12,4 @@ CPPFLAGS+= -DIPSEC LDADD+= -lipsec DPADD+= ${LIBIPSEC}
-.if ${MACHINE_ARCH} == "vax" -COPTS.ping.c=-O0 -.endif - .include <bsd.prog.mk> diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax index cf095d54a86..c483eaa644a 100644 --- a/sys/arch/vax/conf/Makefile.vax +++ b/sys/arch/vax/conf/Makefile.vax @@ -34,7 +34,6 @@ GENASSYM_CONF= ${VAX}/vax/genassym.cf CPPFLAGS+= -D_VAX_INLINE_ AFLAGS+= -x assembler-with-cpp -fno-pic CFLAGS+= -fno-pic -COPTS.wsmux.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -O1 :}
## diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile index 718c97ce857..4ef3840c753 100644 --- a/sys/lib/libsa/Makefile +++ b/sys/lib/libsa/Makefile @@ -96,7 +96,3 @@ SRCS+= ufs.c lib${LIB}.o:: ${OBJS:O} __buildstdlib
CPPFLAGS+= -Wno-pointer-sign - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.bootp.c+= -O0 -.endif diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile index 6945c0da6c6..61fb7d4f652 100644 --- a/sys/lib/libz/Makefile +++ b/sys/lib/libz/Makefile @@ -25,7 +25,3 @@ CLEANFILES+= lib${LIB}.o .include <bsd.lib.mk>
lib${LIB}.o:: ${OBJS:O} __buildstdlib - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.inftrees.c+= -O0 -.endif diff --git a/sys/modules/lfs/Makefile b/sys/modules/lfs/Makefile index 962538821a5..ea8f187e160 100644 --- a/sys/modules/lfs/Makefile +++ b/sys/modules/lfs/Makefile @@ -18,9 +18,4 @@ SRCS+= ulfs_bmap.c ulfs_dirhash.c ulfs_inode.c ulfs_lookup.c \
WARNS= 3
-.if ${MACHINE} == "vax" -# GCC 6.5 and 7.4 cannot compile this with -DDIAGNOSTIC and -O2/-O1 -COPTS.lfs_inode.c+= -O0 -.endif - .include <bsd.kmodule.mk> diff --git a/sys/rump/fs/lib/liblfs/Makefile b/sys/rump/fs/lib/liblfs/Makefile index abade3767d9..68b74c62502 100644 --- a/sys/rump/fs/lib/liblfs/Makefile +++ b/sys/rump/fs/lib/liblfs/Makefile @@ -17,9 +17,6 @@ SRCS+= ulfs_bmap.c ulfs_dirhash.c ulfs_extattr.c \
CFLAGS+= -DLFS_KERNEL_RFW -.if ${MACHINE_ARCH} == "vax" -COPTS.lfs_inode.c+=-O0 -.endif
.include <bsd.lib.mk> .include <bsd.klinks.mk> diff --git a/usr.sbin/mtrace/Makefile b/usr.sbin/mtrace/Makefile index aef09db6198..9c125c15265 100644 --- a/usr.sbin/mtrace/Makefile +++ b/usr.sbin/mtrace/Makefile @@ -12,10 +12,6 @@ PROG= mtrace SRCS= igmp.c inet.c kern.c mtrace.c MAN= mtrace.8
-.if ${MACHINE_ARCH} == "vax" -COPTS.mtrace.c=-O0 -.endif - BINMODE=4555 BINOWN= root
diff --git a/external/gpl3/gcc.old/usr.bin/backend/Makefile b/external/gpl3/gcc.old/usr.bin/backend/Makefile index d69a26fe619..99e881c783d 100644 --- a/external/gpl3/gcc.old/usr.bin/backend/Makefile +++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile @@ -533,68 +533,9 @@ COPTS.insn-recog.c+=-Wno-error
.if ${GCC_MACHINE_ARCH} == "vax" CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH} -COPTS.builtins.c+=-O0 -COPTS.calls.c+=-O0 -COPTS.convert.c+=-O0 -COPTS.data-streamer-out.c+=-O0 -COPTS.dse.c+=-O0 # XXX port-vax/51967 -COPTS.dwarf2out.c+=-O0 -COPTS.expmed.c+=-O0 -COPTS.expr.c+=-O0 -Wno-error=tautological-compare -COPTS.fixed-value.c+=-O0 -COPTS.fold-const.c+=-O0 -COPTS.generic-match.c+=-O0 -COPTS.gimple-fold.c+=-O0 -COPTS.gimple-match.c+=-O0 -COPTS.gimple-ssa-strength-reduction.c+=-O0 -COPTS.gimple-ssa-warn-restrict.c+=-O0 -COPTS.gimple.c+=-O0 -COPTS.internal-fn.c+=-O0 -COPTS.lto-streamer-out.c+=-O0 -COPTS.omp-low.c+=-O0 -COPTS.predict.c+=-O0 -COPTS.range-op.cc+=-O0 -COPTS.recog.c+=-O0 -COPTS.sanopt.c+=-O0 -COPTS.stmt.c+=-O0 -COPTS.stor-layout.c+=-O0 -COPTS.targhooks.c+=-O0 -COPTS.tree-affine.c+=-O0 -COPTS.tree-cfg.c+=-O0 -COPTS.tree-data-ref.c+=-O0 -COPTS.tree-eh.c+=-O0 -COPTS.tree-if-conv.c+=-O0 -COPTS.tree-object-size.c+=-O0 -COPTS.tree-parloops.c+=-O0 -COPTS.tree-predcom.c+=-O0 -COPTS.tree-pretty-print.c+=-O0 -COPTS.tree-ssa-alias.c+=-O0 -COPTS.tree-ssa-ccp.c+=-O0 -COPTS.tree-ssa-forwprop.c+=-O0 -COPTS.tree-ssa-loop-ivopts.c+=-O0 -COPTS.tree-ssa-loop-manip.c+=-O0 -COPTS.tree-ssa-loop-niter.c+=-O0 -COPTS.tree-ssa-math-opts.c+=-O0 -COPTS.tree-ssa-phiopt.c+= -O0 -COPTS.tree-ssa-pre.c+=-O0 -COPTS.tree-ssa-reassoc.c+=-O0 -COPTS.tree-ssa-strlen.c+=-O0 -COPTS.tree-ssa-uninit.c+=-O0 -COPTS.tree-ssa.c+=-O0 -COPTS.tree-switch-conversion.c+=-O0 -COPTS.tree-vect-data-refs.c+=-O0 -COPTS.tree-vect-loop-manip.c+=-O0 -COPTS.tree-vect-loop.c+=-O0 -COPTS.tree-vect-patterns.c+=-O0 -COPTS.tree-vect-stmts.c+=-O0 -COPTS.tree-vrp.c+=-O0 -COPTS.tree.c+=-O0 -COPTS.ubsan.c+=-O0 -COPTS.varasm.c+=-O0 -COPTS.vr-values.c+=-O0 -COPTS.web.c+=-O0 -COPTS.wide-int-range.cc+=-O0 -COPTS.wide-int.cc+=-O0 + +COPTS.expmed.c+=-Wno-error=tautological-compare +COPTS.expr.c+=-Wno-error=tautological-compare .else COPTS.tree.c= ${${ACTIVE_CC} == "clang" :? -O0 :} .endif
|
| 1.12 | 31-May-2022 |
christos | branches: 1.12.2; Elide vax breakage
|
| 1.11 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.10 | 21-May-2022 |
rillig | gomoku: convert input source constants to an enum
I also tried converting other macros, but s_occ would use more memory and the return values for makemove are special values, besides the usual coordinates in the form PT(x, y), so turning the special values into an enum would be confusing.
No functional change.
|
| 1.9 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.8 | 16-May-2022 |
rillig | gomoku: allow combination of WARNS=6 and -DDEBUG
|
| 1.7 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.6 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.5 | 06-Feb-2010 |
he | When using -lcurses, you also need -lterminfo. This fixes the build for sun2, and also builds with LDSTATIC=-static, since archive libraries don't record inter-library dependencies.
|
| 1.4 | 18-Feb-1998 |
jtc | Simply include -lcurses instead of -lcurses -ltermcap
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.12.2.1 | 08-Oct-2023 |
martin | Pull up following revision(s) (requested by rin in ticket #394):
external/gpl3/binutils/dist/gas/config/tc-vax.h: revision 1.10 tools/gcc/Makefile: revision 1.109 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.16 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.17 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.18 external/gpl3/gcc.old/dist/gcc/recog.c: revision 1.12 external/gpl3/gcc.old/dist/gcc/function.c: revision 1.16 external/gpl3/gcc.old/dist/gcc/dse.c: revision 1.14 - 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.13 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.14 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.15 external/gpl3/gcc.old/dist/gcc/doc/tm.texi.in: revision 1.10 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.17 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.18 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.19 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.13 external/gpl3/gcc.old/usr.bin/backend/Makefile: revision 1.20 external/gpl3/gcc.old/dist/gcc/targhooks.c: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.14 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.15 external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md: revision 1.13 external/gpl3/gcc.old/dist/gcc/doc/tm.texi: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.17 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.18 external/gpl3/gcc.old/dist/gcc/config/vax/elf.h: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/elf.h: revision 1.13 external/gpl3/gcc.old/dist/gcc/targhooks.h: revision 1.12 external/gpl3/gcc.old/dist/gcc/target.def: revision 1.10 external/gpl3/gcc.old/dist/gcc/rtlanal.c: revision 1.14 external/gpl3/gcc.old/dist/gcc/reload.c: revision 1.12 external/gpl3/gcc.old/usr.bin/gcc/Makefile: revision 1.11 external/gpl3/gcc.old/usr.bin/lto-dump/Makefile: revision 1.3 external/gpl3/gcc.old/lib/Makefile.sanitizer: revision 1.7 external/gpl3/binutils.old/lib/libbfd/Makefile: revision 1.10 distrib/utils/x_ping/Makefile: revision 1.9 games/phantasia/Makefile: revision 1.38 external/apache2/argon2/lib/libargon2/Makefile.inc: revision 1.2 external/gpl3/gcc.old/lib/libubsan/Makefile: revision 1.8 external/bsd/mdocml/lib/libmandoc/Makefile: revision 1.13 sbin/ping/Makefile: revision 1.18 sbin/newfs_ext2fs/Makefile: revision 1.7 sys/lib/libz/Makefile: revision 1.24 sys/lib/libsa/Makefile: revision 1.97 external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile: revision 1.3 external/gpl3/gdb/lib/libgdb/Makefile: revision 1.36 sys/modules/lfs/Makefile: revision 1.11 external/mit/xorg/lib/gallium/Makefile: revision 1.51 external/gpl3/gdb.old/lib/libdecnumber/Makefile: revision 1.10 external/mit/xorg/lib/libX11/Makefile.libx11: revision 1.26 libexec/ld.elf_so/Makefile: revision 1.148 external/bsd/jemalloc/lib/Makefile.inc: revision 1.16 external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile: revision 1.14 crypto/external/bsd/openssh/lib/Makefile: revision 1.38 external/gpl3/gcc.old/usr.bin/backend/Makefile: revision 1.21 external/gpl3/gcc.old/usr.bin/cc1/Makefile: revision 1.12 external/gpl3/gcc.old/lib/libasan/Makefile: revision 1.11 external/gpl3/gcc.old/usr.bin/cc1plus/Makefile: revision 1.13 lib/libcrypt/Makefile: revision 1.36 external/gpl3/gdb/lib/libdecnumber/Makefile: revision 1.5 lib/libc/gdtoa/Makefile.inc: revision 1.13 games/gomoku/Makefile: revision 1.13 sbin/fsdb/Makefile: revision 1.43 external/gpl3/gcc.old/usr.bin/lto1/Makefile: revision 1.9 external/mit/xorg/lib/gallium.old/Makefile: revision 1.8 lib/libbz2/Makefile: revision 1.22 external/gpl3/gcc.old/usr.bin/cc1obj/Makefile: revision 1.12 usr.sbin/mtrace/Makefile: revision 1.14 external/gpl3/gcc.old/usr.bin/cc1obj/Makefile: revision 1.13 sys/arch/vax/conf/Makefile.vax: revision 1.86 sys/rump/fs/lib/liblfs/Makefile: revision 1.18 sbin/fsck_ffs/Makefile.common: revision 1.3 external/gpl3/binutils/lib/libbfd/Makefile: revision 1.27 lib/i18n_module/UTF7/Makefile: revision 1.5 external/gpl3/gcc.old/lib/liblsan/Makefile: revision 1.7 doc/CHANGES (apply patch) (all external/gpl3/gcc.old/ changes applied to external/gpl3/gcc/)
PR 57646: Import major vax toolchain fix.
|
| 1.37 | 19-Jun-2022 |
rillig | gomoku: remove redundant parentheses
No binary change.
|
| 1.36 | 19-Jun-2022 |
rillig | gomoku: reduce usage of magic numbers in the code
No binary change.
|
| 1.35 | 29-May-2022 |
rillig | gomoku: when starting a new game, start in the middle of the board
Previously, when starting a new game, the user coordinate was kept at the previously selected spot. Since playing in the center is common sense, reset the coordinate.
|
| 1.34 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.33 | 29-May-2022 |
rillig | gomoku: consistently name the offset of a spot in a frame 'off'
Leave 'i' for general purpose loops.
No functional change.
|
| 1.32 | 29-May-2022 |
rillig | gomoku: add data type for one of the 4 directions of a frame
No functional change.
|
| 1.31 | 29-May-2022 |
rillig | gomoku: use proper types when indexing 'board' and 'frames'
No functional change.
|
| 1.30 | 29-May-2022 |
rillig | 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.
|
| 1.29 | 29-May-2022 |
rillig | gomoku: migrate spot_index from int to unsigned short
This matches the type of 'intersect'.
No functional change.
|
| 1.28 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.27 | 28-May-2022 |
rillig | gomoku: clean up initialization of overlap information
Fix variable names 'ia' and 'ib', which I forgot in the previous commit.
Move the documentation in the right places.
Split off another part of init_overlap, to make each function fit on a single screen. Reducing the number of nested 'for' loops allows the indentation to follow the NetBSD style.
No functional change.
|
| 1.26 | 28-May-2022 |
rillig | gomoku: clean up local variable names in init_overlap
By clearly associating each variable to either frame A or frame B, suddenly the code becomes understandable. For the benefit of future readers, explain the naming scheme.
No functional change.
|
| 1.25 | 28-May-2022 |
rillig | gomoku: split initialization of the board into smaller functions
The comments about the "top border" and "bottom border" had been wrong all the time. Mention the corners in the comments, to remove the magic from the various '+ 1' in the code.
No functional change.
|
| 1.24 | 28-May-2022 |
rillig | gomoku: highlight the winning frame
|
| 1.23 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.22 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.21 | 21-May-2022 |
rillig | gomoku: provide readable names for c.a and c.b
No binary change.
|
| 1.20 | 21-May-2022 |
rillig | gomoku: inline macro MAXCOMBO
The name of the macro was not descriptive enough, the other constants in bdinit also don't have names.
No binary change.
|
| 1.19 | 19-May-2022 |
rillig | gomoku: use NULL instead of more verbose null pointer
No binary change.
|
| 1.18 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.17 | 19-May-2022 |
rillig | gomoku: de-obfuscate screen coordinate calculation
Modern compilers optimize linear integer arithmetic, so there is no reason to use strange or misleading formulas.
Replace several magic numbers with proper formulas.
No binary change.
|
| 1.16 | 18-May-2022 |
rillig | gomoku: reduce scope of local variables
No binary change.
|
| 1.15 | 18-May-2022 |
rillig | gomoku: reduce scope of 'for' loop variables
No binary change.
|
| 1.14 | 18-May-2022 |
rillig | gomoku: rename local variable
Not every array of "characters" is a string. In this case, it's rather an array of bool.
No binary change.
|
| 1.13 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.12 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.11 | 15-May-2022 |
rillig | gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about.
No binary change.
|
| 1.10 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.9 | 13-Oct-2012 |
dholland | Pass -Wstrict-overflow... mostly.
|
| 1.8 | 12-Aug-2009 |
dholland | branches: 1.8.6; 1.8.12; sprinkle static
|
| 1.7 | 04-Jun-2009 |
dholland | Increase spending on vowels. No object file diffs.
|
| 1.6 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.5 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.8.12.1 | 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
| 1.8.6.1 | 30-Oct-2012 |
yamt | sync with head
|
| 1.55 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.54 | 29-May-2022 |
rillig | gomoku: when starting a new game, start in the middle of the board
Previously, when starting a new game, the user coordinate was kept at the previously selected spot. Since playing in the center is common sense, reset the coordinate.
|
| 1.53 | 29-May-2022 |
rillig | gomoku: after accepting a spot via the mouse, clear current coordinate
|
| 1.52 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.51 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.50 | 28-May-2022 |
rillig | gomoku: remove redundant parentheses, braces, newlines, clean up get_key
No functional change.
|
| 1.49 | 28-May-2022 |
rillig | gomoku: highlight the winning frame
|
| 1.48 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.47 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.46 | 22-May-2022 |
rillig | gomoku: add mouse support
NetBSD 10 provides the mouse handling functions from <curses.h> but does not actually implement the mouse handling. For the benefit of other platforms, add mouse support; when linked with ncurses instead of curses, it works.
Depending on the input device, mouse clicks are either reported as "button 1 clicked" (mouse) or "button 1 pressed/released" (touchpad); support both.
Be strict about the X coordinate when clicking. Since the coordinates are integer numbers, getting the location between two spots is ambiguous, as it could be just one pixel away or right in the middle of the space between the spots.
|
| 1.45 | 22-May-2022 |
rillig | gomoku: clean up coordinate calculations in get_coord
No functional change.
|
| 1.44 | 22-May-2022 |
rillig | gomoku: make coordinates in get_coord 1-based
The rest of the game has 1-based coordinates as well.
No functional change.
|
| 1.43 | 22-May-2022 |
rillig | gomoku: extract save_game from main
No functional change.
|
| 1.42 | 21-May-2022 |
rillig | gomoku: right-align column header for move number
|
| 1.41 | 21-May-2022 |
rillig | gomoku: move comments closer to their corresponding entities
No binary change.
|
| 1.40 | 21-May-2022 |
rillig | gomoku: warn before overwriting a saved game file
|
| 1.39 | 21-May-2022 |
rillig | gomoku: do not accept overly long lines from the input
Typing beyond the screen and then pressing and holding backspace still removes the prompt, just as before.
|
| 1.38 | 21-May-2022 |
rillig | gomoku: fix deleting a character when reading a line
|
| 1.37 | 21-May-2022 |
rillig | gomoku: make drawing the player's names simpler
No functional change.
|
| 1.36 | 19-May-2022 |
rillig | gomoku: use combined curses functions
To save some screen space in the source code and some bytes in the generated binary.
No functional change.
|
| 1.35 | 19-May-2022 |
rillig | gomoku: clean up coordinate for the currently selected spot
There is no need to make this coordinate dependent on the board size.
No binary change.
|
| 1.34 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.33 | 19-May-2022 |
rillig | gomoku: replace magic numbers with proper coordinate calculation
|
| 1.32 | 19-May-2022 |
rillig | gomoku: properly center the player's names
|
| 1.31 | 19-May-2022 |
rillig | gomoku: de-obfuscate screen coordinate calculation
Modern compilers optimize linear integer arithmetic, so there is no reason to use strange or misleading formulas.
Replace several magic numbers with proper formulas.
No binary change.
|
| 1.30 | 19-May-2022 |
rillig | gomoku: fix error message for small screen
- gomoku: Screen too small (need 8018d) + gomoku: Screen too small (need 80x24)
|
| 1.29 | 19-May-2022 |
rillig | gomoku: fix type mismatch in call to curses function
Not yet detected by lint, as lint is more permissive for type mismatches if the value is a constant 0. Being permissive doesn't make sense in this case. Now the calls to 'keypad' and 'leaveok' are consistent.
No binary change.
|
| 1.28 | 18-May-2022 |
rillig | gomoku: reduce scope of 'for' loop variables
No binary change.
|
| 1.27 | 16-May-2022 |
rillig | gomoku: highlight the last played move
|
| 1.26 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.25 | 16-May-2022 |
rillig | gomoku: fix most lint warnings in -DDEBUG mode
No binary change.
|
| 1.24 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.23 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.22 | 15-May-2022 |
rillig | gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about.
No binary change.
|
| 1.21 | 15-May-2022 |
rillig | gomoku: remove redundant parentheses around return values
No binary change.
|
| 1.20 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.19 | 14-May-2022 |
rillig | gomoku: clean up unused code and lint warnings
No binary change.
|
| 1.18 | 02-May-2021 |
rillig | games: remove trailing whitespace in *.c and *.h
|
| 1.17 | 22-Mar-2014 |
dholland | move extern decls to .h files
|
| 1.16 | 18-Feb-2012 |
matt | branches: 1.16.2; Fix conflicting variable definitions
|
| 1.15 | 29-Mar-2010 |
dholland | branches: 1.15.6; Some improvements to the new UI.
|
| 1.14 | 29-Mar-2010 |
dholland | Better user interface. From OpenBSD, written by Paul Janzen quite a long time ago. A few minor adjustments by yours truly.
|
| 1.13 | 29-Mar-2010 |
dholland | Don't exit(0) on failure. Use errx() instead of fprintf.
|
| 1.12 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
| 1.11 | 04-Jun-2009 |
dholland | Increase spending on vowels. No object file diffs.
|
| 1.10 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.9 | 08-Aug-2008 |
drochner | if initscr() fails, exit with a message rather than crash in the next curses call
|
| 1.8 | 07-Aug-2003 |
agc | branches: 1.8.32; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.7 | 05-Feb-2001 |
christos | fix nested externs
|
| 1.6 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.5 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.4 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.3 | 03-Jan-1997 |
cgd | include string.h and stdlib.h for prototypes, as appropriate
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.8.32.1 | 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
| 1.15.6.2 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
| 1.15.6.1 | 17-Apr-2012 |
yamt | sync with head
|
| 1.16.2.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
| 1.15 | 29-Mar-2010 |
dholland | reorg for clarity and exposition.
|
| 1.14 | 29-Mar-2010 |
dholland | Better user interface. From OpenBSD, written by Paul Janzen quite a long time ago. A few minor adjustments by yours truly.
|
| 1.13 | 29-Mar-2010 |
dholland | fix quote markup, spotted in openbsd diffs
|
| 1.12 | 29-Mar-2010 |
dholland | Fix typo. From OpenBSD.
|
| 1.11 | 15-Sep-2005 |
wiz | Use standard AUTHORS section header. From YOMURA Masanori in private mail Sort sections if necessary. Use more/better markup.
|
| 1.10 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.9 | 26-Sep-2002 |
wiz | Lots of minor fixes resulting from reading these man pages in detail.
|
| 1.8 | 26-Sep-2002 |
wiz | Ispell.
|
| 1.7 | 26-Sep-2002 |
wiz | New sentences begin on new lines. Patch from Richard Elz, slightly improved by yours truly.
|
| 1.6 | 22-Mar-1999 |
garbled | More and more .Os cleanups. .Os is defined in the tmac.doc-common file, so we shouldn't override it with versions in the manpages. Many more to come.
|
| 1.5 | 10-Mar-1999 |
erh | Fix .Bl/.El imbalance.
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.56 | 19-Jun-2022 |
rillig | gomoku: reduce usage of magic numbers in the code
No binary change.
|
| 1.55 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.54 | 29-May-2022 |
rillig | gomoku: when starting a new game, start in the middle of the board
Previously, when starting a new game, the user coordinate was kept at the previously selected spot. Since playing in the center is common sense, reset the coordinate.
|
| 1.53 | 29-May-2022 |
rillig | gomoku: add type player_color
No functional change.
|
| 1.52 | 29-May-2022 |
rillig | gomoku: provide a more gentle introduction to the code
No binary change.
|
| 1.51 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.50 | 29-May-2022 |
rillig | gomoku: add data type for one of the 4 directions of a frame
No functional change.
|
| 1.49 | 29-May-2022 |
rillig | 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.
|
| 1.48 | 29-May-2022 |
rillig | gomoku: migrate spot_index from int to unsigned short
This matches the type of 'intersect'.
No functional change.
|
| 1.47 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.46 | 28-May-2022 |
rillig | gomoku: use custom magic value for end of file input
This allows the type for a spot index to be changed to an unsigned type.
No functional change.
|
| 1.45 | 28-May-2022 |
rillig | gomoku: split initialization of the board into smaller functions
The comments about the "top border" and "bottom border" had been wrong all the time. Mention the corners in the comments, to remove the magic from the various '+ 1' in the code.
No functional change.
|
| 1.44 | 28-May-2022 |
rillig | gomoku: highlight the winning frame
|
| 1.43 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.42 | 28-May-2022 |
rillig | gomoku: extract update_overlap_different_direction
No functional change.
|
| 1.41 | 27-May-2022 |
rillig | gomoku: reduce scope of local variables
No binary change.
|
| 1.40 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.39 | 22-May-2022 |
rillig | gomoku: document a missed immediate win
No binary change.
|
| 1.38 | 21-May-2022 |
rillig | gomoku: right-align column header for move number
|
| 1.37 | 21-May-2022 |
rillig | gomoku: provide readable names for c.a and c.b
No binary change.
|
| 1.36 | 21-May-2022 |
rillig | gomoku: move comments closer to their corresponding entities
No binary change.
|
| 1.35 | 21-May-2022 |
rillig | gomoku: inline macro MAXCOMBO
The name of the macro was not descriptive enough, the other constants in bdinit also don't have names.
No binary change.
|
| 1.34 | 21-May-2022 |
rillig | gomoku: convert input source constants to an enum
I also tried converting other macros, but s_occ would use more memory and the return values for makemove are special values, besides the usual coordinates in the form PT(x, y), so turning the special values into an enum would be confusing.
No functional change.
|
| 1.33 | 21-May-2022 |
rillig | gomoku: warn before overwriting a saved game file
|
| 1.32 | 21-May-2022 |
rillig | gomoku: make drawing the player's names simpler
No functional change.
|
| 1.31 | 20-May-2022 |
rillig | gomoku: fix spelling and grammar in comments
|
| 1.30 | 19-May-2022 |
rillig | gomoku: remove unused function 'list_eq'
|
| 1.29 | 19-May-2022 |
rillig | gomoku: de-obfuscate screen coordinate calculation
Modern compilers optimize linear integer arithmetic, so there is no reason to use strange or misleading formulas.
Replace several magic numbers with proper formulas.
No binary change.
|
| 1.28 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.27 | 16-May-2022 |
rillig | gomoku: allow combination of WARNS=6 and -DDEBUG
|
| 1.26 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.25 | 15-May-2022 |
rillig | gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about.
No binary change.
|
| 1.24 | 15-May-2022 |
rillig | gomoku: remove write-only members from overlap_info
Since overlap_info is only used in pickmove.c, move it there.
No functional change. In particular, in the middle of a game, gomoku still tends to fall into analysis paralysis, thinking about the best move for more than 3 minutes on modern hardware. Since the algorithm is basically unchanged since the 1990s, it must have been a long waiting time back then, probably an hour per move.
|
| 1.23 | 15-May-2022 |
rillig | gomoku: remove column macros
Of the 19 macros, only 3 were actually used. Replace their uses with expressions based on the board size. It's a small step to making the board size adjustable. There are still other places using hard-coded numbers.
No binary change.
|
| 1.22 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.21 | 14-May-2022 |
rillig | gomoku: clean up unused code and lint warnings
No binary change.
|
| 1.20 | 22-Mar-2014 |
dholland | move extern decls to .h files
|
| 1.19 | 29-Mar-2010 |
dholland | branches: 1.19.6; 1.19.12; Some improvements to the new UI.
|
| 1.18 | 29-Mar-2010 |
dholland | Better user interface. From OpenBSD, written by Paul Janzen quite a long time ago. A few minor adjustments by yours truly.
|
| 1.17 | 12-Aug-2009 |
dholland | sprinkle static
|
| 1.16 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
| 1.15 | 04-Jun-2009 |
dholland | Remove global scratch string buffer. Don't zoom off the end while reading user input, either.
|
| 1.14 | 04-Jun-2009 |
dholland | Remove remaining references to sprintf.
|
| 1.13 | 04-Jun-2009 |
dholland | Make a couple of the logging/printing functions printf-alikes. This removes most of the calls to sprintf.
|
| 1.12 | 04-Jun-2009 |
dholland | attribute noreturn -> __dead
|
| 1.11 | 04-Jun-2009 |
dholland | Increase spending on vowels. No object file diffs.
|
| 1.10 | 27-Jan-2004 |
jsm | Remove uses of __P.
|
| 1.9 | 27-Jan-2004 |
jsm | Include <sys/endian.h>.
|
| 1.8 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.7 | 13-Sep-1999 |
jsm | Fix uses of names of library functions for other purposes.
|
| 1.6 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.5 | 13-Sep-1998 |
hubertf | mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.19.12.1 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
| 1.19.6.1 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
| 1.73 | 29-May-2022 |
rillig | gomoku: migrate remaining functions to type player_color
No functional change.
|
| 1.72 | 29-May-2022 |
rillig | gomoku: make parsing of the debug command 'o' robust
Previously, the (invalid) debug command 'o,' succeeded to parse and led to out-of-bounds memory access. Add proper parsing for the arguments of that debug command. Add a short usage for that debug command, as guessing the usage from the previous code was time-consuming due to the large amount of ad-hoc low-level parsing code.
When leaving debug mode, clear the debug prompt.
|
| 1.71 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.70 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.69 | 29-May-2022 |
rillig | 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.
|
| 1.68 | 29-May-2022 |
rillig | gomoku: migrate spot_index from int to unsigned short
This matches the type of 'intersect'.
No functional change.
|
| 1.67 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.66 | 28-May-2022 |
rillig | gomoku: use custom magic value for end of file input
This allows the type for a spot index to be changed to an unsigned type.
No functional change.
|
| 1.65 | 28-May-2022 |
rillig | gomoku: document that 'whatsup' is called on ^C as well
|
| 1.64 | 28-May-2022 |
rillig | gomoku: allow saving a finished game without pressing Shift
|
| 1.63 | 28-May-2022 |
rillig | gomoku: remove redundant parentheses, braces, newlines, clean up get_key
No functional change.
|
| 1.62 | 28-May-2022 |
rillig | gomoku: split initialization of the board into smaller functions
The comments about the "top border" and "bottom border" had been wrong all the time. Mention the corners in the comments, to remove the magic from the various '+ 1' in the code.
No functional change.
|
| 1.61 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.60 | 28-May-2022 |
rillig | gomoku: extract update_overlap_different_direction
No functional change.
|
| 1.59 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.58 | 22-May-2022 |
rillig | gomoku: extract main_game_loop from main
No functional change.
|
| 1.57 | 22-May-2022 |
rillig | gomoku: turn comments for testing mode into actual code
No functional change.
|
| 1.56 | 22-May-2022 |
rillig | gomoku: extract read_color from main
No functional change.
|
| 1.55 | 22-May-2022 |
rillig | gomoku: extract declare_winner from main
|
| 1.54 | 22-May-2022 |
rillig | gomoku: extract ask_user_color from main
No functional change.
|
| 1.53 | 22-May-2022 |
rillig | gomoku: extract read_move from main
No functional change.
|
| 1.52 | 22-May-2022 |
rillig | gomoku: extract set_input_sources from main
No functional change.
|
| 1.51 | 22-May-2022 |
rillig | gomoku: extract parse_args from main
No functional change.
|
| 1.50 | 22-May-2022 |
rillig | gomoku: extract save_game from main
No functional change.
|
| 1.49 | 21-May-2022 |
rillig | gomoku: fix error handling when reading moves from a file
The columns of the board are labeled from A to H and J to T, which makes I5 or i5 an invalid coordinate. Previously, reading this invalid coordinate from a file resulted in the string "<6" appearing in the move log.
The 'i' was converted into the nonexistent column 20, and PT(20, 5) got an out-of-bounds argument, resulting in spot 120. Converting this spot back into coordinates resulted in PT(0, 6). The '<' comes from 'letters[0]'.
|
| 1.48 | 21-May-2022 |
rillig | gomoku: right-align column header for move number
|
| 1.47 | 21-May-2022 |
rillig | gomoku: convert input source constants to an enum
I also tried converting other macros, but s_occ would use more memory and the return values for makemove are special values, besides the usual coordinates in the form PT(x, y), so turning the special values into an enum would be confusing.
No functional change.
|
| 1.46 | 21-May-2022 |
rillig | gomoku: shorten code, error out on too many arguments
|
| 1.45 | 21-May-2022 |
rillig | gomoku: warn before overwriting a saved game file
|
| 1.44 | 21-May-2022 |
rillig | gomoku: in debug mode, after pressing 'd', allow another debug command
While here, remove the sleeping, as there is no obvious reason for it.
|
| 1.43 | 21-May-2022 |
rillig | gomoku: make drawing the player's names simpler
No functional change.
|
| 1.42 | 19-May-2022 |
rillig | gomoku: use combined curses functions
To save some screen space in the source code and some bytes in the generated binary.
No functional change.
|
| 1.41 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.40 | 19-May-2022 |
rillig | gomoku: remove unreachable code at the end of main
In C99 mode, lint accepts when control gets to the end of main without returning a value. It does not know anything about __dead though.
No binary change.
|
| 1.39 | 18-May-2022 |
rillig | gomoku: call setprogname, for portability
No functional change on NetBSD, but the games are distributed to other platforms as well.
|
| 1.38 | 16-May-2022 |
rillig | gomoku: add usage
|
| 1.37 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.36 | 16-May-2022 |
rillig | gomoku: fix remaining lint warnings in -DDEBUG mode
The generated code changes since the calculations are now performed with int precision. No functional change since no overflow occurs.
|
| 1.35 | 16-May-2022 |
rillig | gomoku: fix most lint warnings in -DDEBUG mode
No binary change.
|
| 1.34 | 16-May-2022 |
rillig | gomoku: allow combination of WARNS=6 and -DDEBUG
|
| 1.33 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.32 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.31 | 15-May-2022 |
rillig | gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about.
No binary change.
|
| 1.30 | 15-May-2022 |
rillig | gomoku: remove redundant parentheses around return values
No binary change.
|
| 1.29 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.28 | 02-May-2021 |
rillig | games: remove trailing whitespace in *.c and *.h
|
| 1.27 | 12-Jun-2016 |
dholland | Fix the out-of-memory behavior so the message doesn't disappear under endwin(). Related to PR 3126.
|
| 1.26 | 16-Aug-2011 |
christos | avoid non-literal format strings.
|
| 1.25 | 29-Mar-2010 |
dholland | remove #ifdef SVR4
|
| 1.24 | 29-Mar-2010 |
dholland | Some improvements to the new UI.
|
| 1.23 | 29-Mar-2010 |
dholland | Better user interface. From OpenBSD, written by Paul Janzen quite a long time ago. A few minor adjustments by yours truly.
|
| 1.22 | 29-Mar-2010 |
dholland | Spell "versus" right.
|
| 1.21 | 29-Mar-2010 |
dholland | Allow saved game filenames up to PATH_MAX. From OpenBSD.
|
| 1.20 | 12-Aug-2009 |
dholland | sprinkle static
|
| 1.19 | 13-Jul-2009 |
roy | Rename internal getline() function to get_line() so it does conflict with the soon to be added getline(3) libc function.
|
| 1.18 | 04-Jun-2009 |
dholland | Rectify non-compiling code that appears when DEBUG is defined.
|
| 1.17 | 04-Jun-2009 |
dholland | Remove global scratch string buffer. Don't zoom off the end while reading user input, either.
|
| 1.16 | 04-Jun-2009 |
dholland | Make a couple of the logging/printing functions printf-alikes. This removes most of the calls to sprintf.
|
| 1.15 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.14 | 20-Jul-2008 |
lukem | Remove the \n and tabs from the __COPYRIGHT() strings.
|
| 1.13 | 15-Dec-2007 |
perry | branches: 1.13.6; convert __attribute__s to applicable cdefs.h macros
|
| 1.12 | 27-Jan-2004 |
jsm | branches: 1.12.22; Remove uses of __P.
|
| 1.11 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.10 | 08-May-2000 |
mycroft | Use setgid(), not setregid().
|
| 1.9 | 13-Sep-1999 |
jsm | Fix uses of names of library functions for other purposes.
|
| 1.8 | 12-Sep-1999 |
jsm | Security improvements for games (largely from or inspired by OpenBSD).
Games which run setgid from dm, but don't need to, should drop their privileges at startup.
Games which have a scorefile should open it at startup, then drop all privileges leaving just the open writable file descriptor. If the game can invoke subprocesses, this should be made close-on-exec.
Games with scorefiles should make sure they do not get a file descriptor < 3. (Otherwise, they could get confused and corrupt the scorefile when using stdin, stdout or stderr.)
Some old setuid revokes from the days of setuid games change into gid revokes.
|
| 1.7 | 08-Sep-1999 |
jsm | Add `__noreturn__' and `__unused__' attributes where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Most noreturn attributes were previously added in bin/6144, with some others that were missed then in bin/8082. Previous `unused' attributes were covered in bin/6557, bin/8058 and other PRs (all these PRs have already been handled and closed).
|
| 1.6 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.5 | 03-Feb-1998 |
perry | change includes to fix compiler warning
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.12.22.1 | 09-Jan-2008 |
matt | sync with HEAD
|
| 1.13.6.1 | 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
| 1.43 | 19-Jun-2022 |
rillig | gomoku: reduce usage of magic numbers in the code
No binary change.
|
| 1.42 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.41 | 29-May-2022 |
rillig | gomoku: add type player_color
No functional change.
|
| 1.40 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.39 | 29-May-2022 |
rillig | gomoku: consistently name the offset of a spot in a frame 'off'
Leave 'i' for general purpose loops.
No functional change.
|
| 1.38 | 29-May-2022 |
rillig | gomoku: add data type for one of the 4 directions of a frame
No functional change.
|
| 1.37 | 29-May-2022 |
rillig | gomoku: use proper types when indexing 'board' and 'frames'
No functional change.
|
| 1.36 | 29-May-2022 |
rillig | 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.
|
| 1.35 | 29-May-2022 |
rillig | gomoku: migrate 'makemove' to using spot_index instead of pointer
No functional change.
|
| 1.34 | 29-May-2022 |
rillig | gomoku: migrate spot_index from int to unsigned short
This matches the type of 'intersect'.
No functional change.
|
| 1.33 | 28-May-2022 |
rillig | gomoku: highlight the winning frame
|
| 1.32 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.31 | 28-May-2022 |
rillig | gomoku: split makemove into smaller functions
No functional change.
|
| 1.30 | 28-May-2022 |
rillig | gomoku: announce tie as early as possible
|
| 1.29 | 28-May-2022 |
rillig | gomoku: extract update_overlap_different_direction
No functional change.
|
| 1.28 | 28-May-2022 |
rillig | gomoku: extract separate function update_overlap_same_direction
No functional change.
|
| 1.27 | 28-May-2022 |
rillig | gomoku: reduce number of variables in update_overlap
No functional change.
|
| 1.26 | 28-May-2022 |
rillig | gomoku: reduce scope of local variable
No functional change.
|
| 1.25 | 27-May-2022 |
rillig | gomoku: reduce variable reuse, make code more uniform
No functional change.
|
| 1.24 | 27-May-2022 |
rillig | gomoku: reduce scope of local variables
No binary change.
|
| 1.23 | 27-May-2022 |
rillig | gomoku: allow Black to win the game in the very last move
|
| 1.22 | 27-May-2022 |
rillig | gomoku: fix off-by-one error when deciding that the game is a tie
|
| 1.21 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.20 | 21-May-2022 |
rillig | gomoku: provide readable names for c.a and c.b
No binary change.
|
| 1.19 | 21-May-2022 |
rillig | gomoku: inline macro MAXCOMBO
The name of the macro was not descriptive enough, the other constants in bdinit also don't have names.
No binary change.
|
| 1.18 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.17 | 18-May-2022 |
rillig | gomoku: reduce scope of 'for' loop variables
No binary change.
|
| 1.16 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.15 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.14 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.13 | 15-May-2022 |
rillig | gomoku: remove redundant parentheses around return values
No binary change.
|
| 1.12 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.11 | 12-Aug-2009 |
dholland | sprinkle static
|
| 1.10 | 04-Jun-2009 |
dholland | Increase spending on vowels. No object file diffs.
|
| 1.9 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.8 | 11-May-2006 |
mrg | avoid a pointer sign difference.
|
| 1.7 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.6 | 13-Mar-2000 |
soren | Fix doubled 'the'.
|
| 1.5 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.68 | 29-May-2022 |
rillig | gomoku: clean up variable names, add empty lines
No binary change.
|
| 1.67 | 29-May-2022 |
rillig | gomoku: clean up color handling in 'pickmove'
Instead of searching for the best black and white moves, search instead for our and their best moves. This makes the code simpler and more uniform, as the strategy is the same for Black and White.
No functional change.
|
| 1.66 | 29-May-2022 |
rillig | gomoku: clean up 'pickmove' stylistically
No functional change.
|
| 1.65 | 29-May-2022 |
rillig | gomoku: migrate remaining functions to type player_color
No functional change.
|
| 1.64 | 29-May-2022 |
rillig | gomoku: clean up overlap info in 'checkframes'
In 2009, GCC had complained that the overlap_info might only be partially filled. All possible code paths are sane though, so that was probably a bug in GCC.
Remove the comment and the unnecessary initialization, rename the variable since it doesn't match its behavior anymore. Sync nearby comments with reality; there is no array anywhere near.
No functional change.
|
| 1.63 | 29-May-2022 |
rillig | gomoku: do not scan the upper border for combos
Adding the '+ 1' to the row coordinate added an offset of 20, while the intended offset was 1.
No functional change, just a bit faster.
|
| 1.62 | 29-May-2022 |
rillig | gomoku: refine the type of some functions and variables
Assisted by WARNS=6. At that level, there are several warnings about type conversion between small integer types that would only clutter the code, therefore stay at WARNS=5. Same for lint's -aa option.
No functional change.
|
| 1.61 | 29-May-2022 |
rillig | gomoku: add type player_color
No functional change.
|
| 1.60 | 29-May-2022 |
rillig | gomoku: use unsigned integers for bit sets
As all access to the bit sets happens through the unsigned spot_index type, drop the type casts in the macros.
No functional change on 2s complement machines.
|
| 1.59 | 29-May-2022 |
rillig | gomoku: don't use 'i' as special-purpose variable name
No binary change.
|
| 1.58 | 29-May-2022 |
rillig | gomoku: consistently name the offset of a spot in a frame 'off'
Leave 'i' for general purpose loops.
No functional change.
|
| 1.57 | 29-May-2022 |
rillig | gomoku: add data type for one of the 4 directions of a frame
No functional change.
|
| 1.56 | 29-May-2022 |
rillig | gomoku: clean up four_in_a_row
No functional change.
|
| 1.55 | 29-May-2022 |
rillig | gomoku: extract quick_check from scanframes
No functional change.
|
| 1.54 | 29-May-2022 |
rillig | gomoku: use proper types when indexing 'board' and 'frames'
No functional change.
|
| 1.53 | 29-May-2022 |
rillig | 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.
|
| 1.52 | 29-May-2022 |
rillig | gomoku: document where to fix the unnecessarily long thinking time
|
| 1.51 | 29-May-2022 |
rillig | gomoku: migrate pickmove to use spot_index instead of pointers
Using spot_index instead of pointers leads to simpler code since there is no need to deal with conversion from ptrdiff_t to spot_index.
No functional change.
|
| 1.50 | 29-May-2022 |
rillig | gomoku: migrate spot_index from int to unsigned short
This matches the type of 'intersect'.
No functional change.
|
| 1.49 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.48 | 28-May-2022 |
rillig | gomoku: use unsigned arithmetic for bitboard
No functional change.
|
| 1.47 | 28-May-2022 |
rillig | gomoku: group movelog and nmoves into a game struct
No functional change.
|
| 1.46 | 27-May-2022 |
rillig | gomoku: reduce scope of local variables
No binary change.
|
| 1.45 | 27-May-2022 |
rillig | gomoku: replace 1-based movenum with 0-based nmoves
No functional change, not even the TIE that is wrongly announced when the very last spot on the board is yet to be filled by Black. Even without this off-by-one error, it could be that filling the very last spot completes a frame, so that code has been wrong all the time.
In practical terms, this situation only arises when the human player is unconcentrated or the computer player has a bad strategy. The latter may well be, as the computer moves in the (boring) endgame are not directed towards winning -- they fill irrelevant spots before relevant ones.
|
| 1.44 | 27-May-2022 |
rillig | gomoku: split local variable into separate variables
No binary change.
|
| 1.43 | 22-May-2022 |
rillig | gomoku: document a missed immediate win
No binary change.
|
| 1.42 | 21-May-2022 |
rillig | gomoku: provide readable names for c.a and c.b
No binary change.
|
| 1.41 | 21-May-2022 |
rillig | gomoku: inline macro MAXCOMBO
The name of the macro was not descriptive enough, the other constants in bdinit also don't have names.
No binary change.
|
| 1.40 | 21-May-2022 |
rillig | gomoku: prevent thinking for too long
At search depth 9, picking a move takes about a minute on modern hardware, which is enough for casual game play. Even then, gomoku does not always find the perfect move, so investing that much time seems questionable. Limiting the search depth also puts an upper bound on the memory usage, which is quite high with 150 MB.
|
| 1.39 | 20-May-2022 |
rillig | gomoku: fix spelling and grammar in comments
|
| 1.38 | 19-May-2022 |
rillig | gomoku: remove unused function 'list_eq'
|
| 1.37 | 19-May-2022 |
rillig | gomoku: use NULL instead of more verbose null pointer
No binary change.
|
| 1.36 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.35 | 19-May-2022 |
rillig | gomoku: de-obfuscate screen coordinate calculation
Modern compilers optimize linear integer arithmetic, so there is no reason to use strange or misleading formulas.
Replace several magic numbers with proper formulas.
No binary change.
|
| 1.34 | 18-May-2022 |
rillig | gomoku: reduce scope of 'for' loop variables
No binary change.
|
| 1.33 | 16-May-2022 |
rillig | gomoku: enable lint's strict bool mode
No functional change.
|
| 1.32 | 16-May-2022 |
rillig | gomoku: fix most lint warnings in -DDEBUG mode
No binary change.
|
| 1.31 | 16-May-2022 |
rillig | gomoku: allow combination of WARNS=6 and -DDEBUG
|
| 1.30 | 16-May-2022 |
rillig | gomoku: prepare lint's strict bool mode
No binary change.
|
| 1.29 | 16-May-2022 |
rillig | gomoku: fix lint warnings
Most warnings were about implicit conversions from ptrdiff_t to int; add explicit cast for them, as they are far from overflowing int.
The casts from one pointer type to 'struct combostr **' were indeed suspicious. In these cases, a single region of memory is allocated to store two objects of different type, without declaring a struct type for their combination. The second object is an array of variable size.
No binary change.
|
| 1.28 | 16-May-2022 |
rillig | gomoku: condense code to decide which spot is better
The comments in the conditions only serve to align the expressions, to allow humans to check that they correspond.
No functional change.
|
| 1.27 | 15-May-2022 |
rillig | gomoku: remove write-only members from overlap_info
Since overlap_info is only used in pickmove.c, move it there.
No functional change. In particular, in the middle of a game, gomoku still tends to fall into analysis paralysis, thinking about the best move for more than 3 minutes on modern hardware. Since the algorithm is basically unchanged since the 1990s, it must have been a long waiting time back then, probably an hour per move.
|
| 1.26 | 15-May-2022 |
rillig | gomoku: remove column macros
Of the 19 macros, only 3 were actually used. Replace their uses with expressions based on the board size. It's a small step to making the board size adjustable. There are still other places using hard-coded numbers.
No binary change.
|
| 1.25 | 15-May-2022 |
rillig | gomoku: remove redundant parentheses around return values
No binary change.
|
| 1.24 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.23 | 14-May-2022 |
rillig | gomoku: clean up unused code and lint warnings
No binary change.
|
| 1.22 | 19-Oct-2013 |
christos | fix unused variable warnings
|
| 1.21 | 13-Oct-2012 |
dholland | Pass -Wstrict-overflow... mostly.
|
| 1.20 | 29-Mar-2010 |
dholland | branches: 1.20.6; 1.20.12; remove #ifdef SVR4
|
| 1.19 | 12-Aug-2009 |
dholland | sprinkle static
|
| 1.18 | 04-Jun-2009 |
dholland | Rectify non-compiling code that appears when DEBUG is defined.
|
| 1.17 | 04-Jun-2009 |
dholland | Remove remaining references to sprintf.
|
| 1.16 | 04-Jun-2009 |
dholland | Make a couple of the logging/printing functions printf-alikes. This removes most of the calls to sprintf.
|
| 1.15 | 04-Jun-2009 |
dholland | Increase spending on vowels. No object file diffs.
|
| 1.14 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.13 | 28-Jan-2008 |
dholland | build with WARNS=4
|
| 1.12 | 15-Dec-2007 |
perry | convert __attribute__s to applicable cdefs.h macros
|
| 1.11 | 27-Jan-2004 |
jsm | branches: 1.11.22; Include <limits.h> instead of <machine/limits.h>.
|
| 1.10 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.9 | 18-Sep-1999 |
jsm | Fix -Wsign-compare warnings.
|
| 1.8 | 09-Sep-1999 |
jsm | Check for failure of malloc() and calloc() at various places in the games.
|
| 1.7 | 08-Sep-1999 |
jsm | Add `__noreturn__' and `__unused__' attributes where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Most noreturn attributes were previously added in bin/6144, with some others that were missed then in bin/8082. Previous `unused' attributes were covered in bin/6557, bin/8058 and other PRs (all these PRs have already been handled and closed).
|
| 1.6 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.5 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.4 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.3 | 03-Jan-1997 |
cgd | include string.h and stdlib.h for prototypes, as appropriate
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|
| 1.11.22.2 | 23-Mar-2008 |
matt | sync with HEAD
|
| 1.11.22.1 | 09-Jan-2008 |
matt | sync with HEAD
|
| 1.20.12.2 | 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
| 1.20.12.1 | 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
| 1.20.6.2 | 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
| 1.20.6.1 | 30-Oct-2012 |
yamt | sync with head
|
| 1.21 | 29-May-2022 |
rillig | gomoku: use consistent variable names
Previously, the name 's' was used for the index of a spot on the board, as well as for the value of a combo, and for a few other purposes. Use different names and mark the spot indexes using a custom type.
No binary change.
|
| 1.20 | 21-May-2022 |
rillig | gomoku: fix error handling when reading moves from a file
The columns of the board are labeled from A to H and J to T, which makes I5 or i5 an invalid coordinate. Previously, reading this invalid coordinate from a file resulted in the string "<6" appearing in the move log.
The 'i' was converted into the nonexistent column 20, and PT(20, 5) got an out-of-bounds argument, resulting in spot 120. Converting this spot back into coordinates resulted in PT(0, 6). The '<' comes from 'letters[0]'.
|
| 1.19 | 21-May-2022 |
rillig | gomoku: right-align column header for move number
|
| 1.18 | 19-May-2022 |
rillig | gomoku: clean up version control sections
Lint can handle these definitions, and the '#if 0' is redundant.
No functional change.
|
| 1.17 | 18-May-2022 |
rillig | gomoku: reduce scope of 'for' loop variables
No binary change.
|
| 1.16 | 15-May-2022 |
rillig | gomoku: inline macros BSZ1, BSZ2, BSZ3, BSZ4
These macro names didn't convey any meaning, so replace them with their replacement text, to have fewer identifiers to worry about.
No binary change.
|
| 1.15 | 15-May-2022 |
rillig | gomoku: remove redundant parentheses around return values
No binary change.
|
| 1.14 | 15-May-2022 |
rillig | gomoku: apply some style fixes towards KNF
There are still parts of the code that use an indentation level of 4 instead of the usual 8. Fixing that right now would introduce more unnatural line breaks, so defer that until later.
No binary change.
|
| 1.13 | 02-May-2021 |
rillig | games: remove trailing whitespace in *.c and *.h
|
| 1.12 | 12-Aug-2009 |
dholland | sprinkle static
|
| 1.11 | 04-Jun-2009 |
dholland | sprintf -> snprintf
|
| 1.10 | 04-Jun-2009 |
dholland | ANSIfy function declarations.x
|
| 1.9 | 19-Apr-2005 |
rillig | Fixed wrong use of the <ctype.h> functions by adding an explicit conversion to unsigned char. Approved by christos.
|
| 1.8 | 05-Nov-2004 |
dsl | Add (unsigned char) cast to ctype functions
|
| 1.7 | 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
|
| 1.6 | 03-Jul-2000 |
matt | More include additions for exit, abs, strcmp, etc.
|
| 1.5 | 08-Sep-1999 |
jsm | Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the NetBSD games, except in hunt (where substantial changes from OpenBSD need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146, bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994, bin/8039, bin/8057 and bin/8093.
|
| 1.4 | 10-Oct-1997 |
lukem | WARNSify
|
| 1.3 | 03-Jan-1997 |
cgd | fix NetBSD RCS ID headers
|
| 1.2 | 28-Dec-1996 |
tls | add gomoku game, from 4.4BSD-Lite2
|
| 1.1 | 28-Dec-1996 |
tls | branches: 1.1.1; Initial revision
|
| 1.1.1.1 | 28-Dec-1996 |
tls | Import of 4.4BSD-Lite2 source
|