From: Eric Mullins Date: Fri, 5 Jun 2009 03:43:29 +0000 (-0700) Subject: adding support for different windows compiler X-Git-Tag: v4.4.0.alpha4~4 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=873f7b33a08877e546e16f63a3a70dae8b3633aa;p=xboard.git adding support for different windows compiler Eric kindly provided us with some makefiles for different windows compiler and also fixed some issues that came up while using those compilers. --- diff --git a/AUTHORS b/AUTHORS index d2bad82..25e88e6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,143 +1,149 @@ -Contributions of xboard and WinBoard authors by file -$Id: AUTHORS,v 1.1 2003/11/02 04:42:06 mann Exp $ - -0. Files covered - -The first group are included in the xboard distribution. The second -group are included in the WinBoard source distribution but not in the -xboard distribution. All are part of the joint xboard/WinBoard source -base and are covered by the same copyrights and licensing terms. - -FAQ.html -backend.c -backend.h -backendz.h -bitmaps -childio.c -childio.h -cmail.in -cmail.man -comment.in -common.h -config.h.in -configure.in -engine-intf.txt -frontend.h -gamelist.c -ics-parsing.txt -lists.c -lists.h -moves.c -moves.h -parser.h -parser.l -pgntags.c -xboard.c -xboard.h -xboard.man -xboard.texi -xedittags.c -xedittags.h -xgamelist.c -xgamelist.h -zic2xpm.c -zic2xpm.man -zippy.README -zippy.c -zippy.h - -winboard.rtf (compiles to winboard.hlp) -config.h -defaults.h -resource.h -wedittags.c -wedittags.h -wgamelist.c -wgamelist.h -winboard.c -winboard.h -winboard.rc - -bitmaps/* -bitmaps.xchess/* - -1. Wayne Christopher - -Wrote from scratch (I believe) bitmaps.xchess/*80*.bm. Other bitmaps -in the bitmaps.xchess directory were derived from these by shrinking -and some hand-tuning. By default these bitmaps are no longer used. -Their copyright status is unclear. - -2. Chris Sears and Dan Sears - -Wrote from scratch parser.l, xboard.c, xboard.h, xboard.man. Parts -(sometimes small) of these files were later moved by Tim Mann to -backend.c, backend.h, childio.c, common.h, frontend.h, and parser.h. - -Chris and Dan's original work is copyrighted by Digital Equipment -Corporation with licensing terms similar to what the X Consortium uses -(see the file COPYRIGHT). All the work listed below is copyrighted by -the Free Software Foundation and covered by the GPL (see the files -COPYRIGHT and COPYING). - -3. Tim Mann - -Wrote from scratch FAQ.html, backendz.h, childio.h, comment.in, -config.h.in, configure.in, engine-intf.txt, ics-parsing.txt, moves.c, -moves.h, pgntags.c (split from backend.c by Jochen Wiedmann), -xedittags.c, xedittags.h, xgamelist.c, xgamelist.h, zippy.README, -zippy.c, zippy.h, winboard.rtf, config.h, defaults.h, resource.h, -wedittags.c, wedittags.h, wgamelist.c, wgamelist.h, winboard.c, -winboard.h, winboard.rc. - -Major additions and changes to nearly all other files listed in -section 0. - -4. John Chanak - -Addition to xboard.c, mostly later moved into backend.c. - -5. Evan Welsh - -Wrote from scratch cmail.in and cmail.man. Additions to backend.c and -xboard.c. - -6. Elmar Bartel - -Wrote from scratch the Metafont code from which bitmaps/* were -generated. The Metafont code itself is not included in the package. - -7. Jochen Wiedmann - -Wrote from scratch gamelist.c, lists.c, lists.h. Wrote xboard.texi, -mostly based on xboard.man and cmail.man. Minor additions to backend.c. - -8. Frank McIngvale - -Wrote from scratch zic2xpm.c and zic2xpm.man. Additions to backend.c, -xboard.c, and xboard.man. - -9. Hugh Fisher - -Additions to backend.c and xboard.c. - -10. Allessandro Scotti - -Made many additions to the WinBoard user interface and graphics -capabilities, such as new windows for engine output, board textures -and font-based piece rendering. These changes became collectively known -as Winboard_x. - -11. H.G. Muller - -Heaviliy modified winboard.c, backend.c, moves.c and parser.l, to -allow board sizes other than 8x8, and many non-orthodox Chess pieces, -so that WinBoard is now capable of playing variants like Shogi and Xiangqi. -Also implemented displaying of the Crazyhouse holdings, and many adjudication -and other backend options. This version of WinBoard, (4.3.xx) containing all -of the WinBoard_x options, became known as WinBoard_F. - -12. Arun Persaud - -fix for parser.l -updated autotools files \ No newline at end of file +Contributions of xboard and WinBoard authors by file +$Id: AUTHORS,v 1.1 2003/11/02 04:42:06 mann Exp $ + +0. Files covered + +The first group are included in the xboard distribution. The second +group are included in the WinBoard source distribution but not in the +xboard distribution. All are part of the joint xboard/WinBoard source +base and are covered by the same copyrights and licensing terms. + +FAQ.html +backend.c +backend.h +backendz.h +bitmaps +childio.c +childio.h +cmail.in +cmail.man +comment.in +common.h +config.h.in +configure.in +engine-intf.txt +frontend.h +gamelist.c +ics-parsing.txt +lists.c +lists.h +moves.c +moves.h +parser.h +parser.l +pgntags.c +xboard.c +xboard.h +xboard.man +xboard.texi +xedittags.c +xedittags.h +xgamelist.c +xgamelist.h +zic2xpm.c +zic2xpm.man +zippy.README +zippy.c +zippy.h + +winboard.rtf (compiles to winboard.hlp) +config.h +defaults.h +resource.h +wedittags.c +wedittags.h +wgamelist.c +wgamelist.h +winboard.c +winboard.h +winboard.rc + +bitmaps/* +bitmaps.xchess/* + +1. Wayne Christopher + +Wrote from scratch (I believe) bitmaps.xchess/*80*.bm. Other bitmaps +in the bitmaps.xchess directory were derived from these by shrinking +and some hand-tuning. By default these bitmaps are no longer used. +Their copyright status is unclear. + +2. Chris Sears and Dan Sears + +Wrote from scratch parser.l, xboard.c, xboard.h, xboard.man. Parts +(sometimes small) of these files were later moved by Tim Mann to +backend.c, backend.h, childio.c, common.h, frontend.h, and parser.h. + +Chris and Dan's original work is copyrighted by Digital Equipment +Corporation with licensing terms similar to what the X Consortium uses +(see the file COPYRIGHT). All the work listed below is copyrighted by +the Free Software Foundation and covered by the GPL (see the files +COPYRIGHT and COPYING). + +3. Tim Mann + +Wrote from scratch FAQ.html, backendz.h, childio.h, comment.in, +config.h.in, configure.in, engine-intf.txt, ics-parsing.txt, moves.c, +moves.h, pgntags.c (split from backend.c by Jochen Wiedmann), +xedittags.c, xedittags.h, xgamelist.c, xgamelist.h, zippy.README, +zippy.c, zippy.h, winboard.rtf, config.h, defaults.h, resource.h, +wedittags.c, wedittags.h, wgamelist.c, wgamelist.h, winboard.c, +winboard.h, winboard.rc. + +Major additions and changes to nearly all other files listed in +section 0. + +4. John Chanak + +Addition to xboard.c, mostly later moved into backend.c. + +5. Evan Welsh + +Wrote from scratch cmail.in and cmail.man. Additions to backend.c and +xboard.c. + +6. Elmar Bartel + +Wrote from scratch the Metafont code from which bitmaps/* were +generated. The Metafont code itself is not included in the package. + +7. Jochen Wiedmann + +Wrote from scratch gamelist.c, lists.c, lists.h. Wrote xboard.texi, +mostly based on xboard.man and cmail.man. Minor additions to backend.c. + +8. Frank McIngvale + +Wrote from scratch zic2xpm.c and zic2xpm.man. Additions to backend.c, +xboard.c, and xboard.man. + +9. Hugh Fisher + +Additions to backend.c and xboard.c. + +10. Allessandro Scotti + +Made many additions to the WinBoard user interface and graphics +capabilities, such as new windows for engine output, board textures +and font-based piece rendering. These changes became collectively known +as Winboard_x. + +11. H.G. Muller + +Heaviliy modified winboard.c, backend.c, moves.c and parser.l, to +allow board sizes other than 8x8, and many non-orthodox Chess pieces, +so that WinBoard is now capable of playing variants like Shogi and Xiangqi. +Also implemented displaying of the Crazyhouse holdings, and many adjudication +and other backend options. This version of WinBoard, (4.3.xx) containing all +of the WinBoard_x options, became known as WinBoard_F. + +12. Arun Persaud + +fix for parser.l +updated autotools files + +13. Eric Mullins + +Makefiles for different compilers for windows, several changes for those compilers + +backend.c, winboard/Winboard.dev, winboard/makefile.gcc, winboard/makefile.ms, winboard/res/winboard.exe.manifest, winboard/resource.h, winboard/wevalgraph.c, winboard/winboard.c, winboard/winboard.dsp, winboard/winboard.dsw, winboard/winboard.h, winboard/winboard.rc, winboard/woptions.c diff --git a/backend.c b/backend.c index 9c49e05..5ae5525 100644 --- a/backend.c +++ b/backend.c @@ -12899,6 +12899,11 @@ DisplayBothClocks() you have neither ftime nor gettimeofday. */ +/* VS 2008 requires the #include outside of the function */ +#if !HAVE_GETTIMEOFDAY && HAVE_FTIME +#include +#endif + /* Get the current time as a TimeMark */ void GetTimeMark(tm) diff --git a/winboard/Winboard.dev b/winboard/Winboard.dev new file mode 100644 index 0000000..5961142 --- /dev/null +++ b/winboard/Winboard.dev @@ -0,0 +1,258 @@ +[Project] +FileName=Winboard.dev +Name=Winboard +UnitCount=21 +Type=0 +Ver=1 +ObjFiles= +Includes= +Libs= +PrivateResource=Winboard_private.rc +ResourceIncludes=.. +MakeIncludes= +Compiler=-I.._@@_-I._@@_ +CppCompiler= +Linker=-fpic_@@_-s_@@_-mwindows_@@_-lwsock32_@@_-lwinmm_@@_-lcomctl32_@@_ +IsCpp=0 +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=Winboard.exe +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile=makefile.gcc +IncludeVersionInfo=1 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000001000000100 + +[Unit1] +FileName=wsockerr.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=parser.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=wclipbrd.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=wedittags.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=wengineo.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=wevalgraph.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=wgamelist.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=whistory.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=winboard.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=wlayout.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=woptions.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=wsnap.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\uci.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\backend.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\book.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\gamelist.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\lists.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\moves.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\pgntags.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=winboard.rc +Folder=Winboard +Compile=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=4 +Minor=4 +Release=0 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=4.4.0j +FileDescription=Developed using the Dev-C++ IDE +InternalName=winboard.exe +LegalCopyright=GPLv2 +LegalTrademarks= +OriginalFilename=winboard.exe +ProductName=Winboard +ProductVersion=4.4.0j +AutoIncBuildNr=0 + +[Unit21] +FileName=..\zippy.c +CompileCpp=0 +Folder=Winboard +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/winboard/makefile.gcc b/winboard/makefile.gcc new file mode 100644 index 0000000..5bd49dd --- /dev/null +++ b/winboard/makefile.gcc @@ -0,0 +1,159 @@ +# WinBoard makefile using gcc + + +PROJ=winboard + + +OBJS=backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o\ + parser.o wbres.o wclipbrd.o wedittags.o wengineo.o wevalgraph.o\ + wgamelist.o whistory.o winboard.o wlayout.o woptions.o wsnap.o\ + wsockerr.o + + +# make compiling less spammy +compile = @echo "$1"; $(CC) $(CFLAGS) $1 + + +# Debugging? +USE_DEBUG=0 + + +# set this to 1 unless you don't mind linking with cygwin1.dll +USE_MINGW=1 + + +# set up for cygwin or not +ifeq ($(USE_MINGW),1) +CFCYG = -mno-cygwin +LFCYG = -mno-cygwin -lmsvcrt +endif + + +CC = gcc +FLEX = "flex.exe" # we need version 2.5.4 or later, cygwin's is 2.5.35 +# "c:/mingw/mingw32/bin/flex.exe" +HC="C:/Program Files/Help Workshop/hcrtf" -xn +DEFS = -D_WIN32_IE=0x0300 -DWIN32 +WARN = -Wall -Wno-char-subscripts -Wno-parentheses +ARCH = +ifeq ($(USE_DEBUG),0) + CFDEBUG = -DNDEBUG + OPTS = -Os -frename-registers -funit-at-a-time -fstrict-aliasing -fstrength-reduce +else + CFDEBUG = -D_DEBUG -DDEBUG -g +endif +CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I.. +CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG) +LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32 + + +all: $(PROJ).exe + + +clean: + rm -f *~ $(PROJ).exe $(PROJ).err $(PROJ).rbj $(PROJ).RES $(PROJ).res\ + *.sbr *.bsc *.o *.obj *.plg *.opt *.ncb *.debug *.bak *.gid *.GID\ + *.map *.pdb *.tmp $(PROJ).ini + + +# Update the help file if necessary +$(PROJ).hlp : $(PROJ).rtf + $(HC) $(PROJ).hpj + @cat $(PROJ).err + @mv $(PROJ).hlp tmp.hlp + @mv tmp.hlp $(PROJ).hlp # these moves to get the case right + + +# Update the resource if necessary +wbres.o: $(PROJ).rc $(PROJ).h resource.h + windres --use-temp-file --include-dir .. $< -O coff -o $@ + + +# note: cygwin flex needs m4 package. cygwin-setup forgets this dependency +# note2: use mingw flex instead... although I got cygwin's flex working (with m4), +# it didn't produce a useable parser.c (1000's of errors) +parser.c: ../parser.l + $(FLEX) -oparser.c -L ../parser.l + + +$(PROJ).exe: $(OBJS) $(PROJ).hlp + $(CC) $(guiflags) $(OBJS) $(LFLAGS) -o $(PROJ).exe + + +winboard.o: winboard.c config.h winboard.h ../common.h ../frontend.h ../backend.h \ + ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \ + wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h + $(call compile, $<) + +backend.o: ../backend.c config.h ../common.h ../frontend.h ../backend.h \ + ../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h + $(call compile, $<) + +parser.o: parser.c config.h ../common.h ../backend.h ../parser.h \ + ../frontend.h ../moves.h ../lists.h + $(call compile, $<) + +moves.o: ../moves.c config.h ../backend.h ../common.h ../parser.h \ + ../moves.h ../lists.h + $(call compile, $<) + +lists.o: ../lists.c config.h ../lists.h ../common.h + $(call compile, $<) + +gamelist.o: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \ + ../backend.h ../parser.h + $(call compile, $<) + +wclipbrd.obj: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \ + winboard.h resource.h wclipbrd.h ../lists.h + $(call compile, $<) + +wedittags.obj: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \ + ../backend.h ../lists.h wedittags.h + $(call compile, $<) + +wgamelist.obj: wgamelist.c config.h. ../common.h winboard.h resource.h ../frontend.h \ + ../backend.h wgamelist.h ../lists.h + $(call compile, $<) + +woptions.obj: woptions.c config.h ../common.h ../frontend.h ../backend.h ../lists.h \ + defaults.h winboard.h resource.h + $(call compile, $<) + +wengineo.obj: wengineo.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(call compile, $<) + +whistory.obj: whistory.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(call compile, $<) + +wevalgraph.obj: wevalgraph.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(call compile, $<) + +wlayout.obj: wlayout.c config.h ../common.h winboard.h resource.h + $(call compile, $<) + +wsockerr.obj: wsockerr.c wsockerr.h + $(call compile, $<) + +wsnap.obj: wsnap.c wsnap.h + $(call compile, $<) + +pgntags.o: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \ + ../parser.h ../lists.h + $(call compile, $<) + +zippy.o: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \ + ../backend.h ../backendz.h ../lists.h + $(call compile, $<) + +book.o: ../book.c ../common.h ../backend.h ../lists.h + $(call compile, $<) + +uci.o: ../uci.c ..//common.h ../backend.h ../frontend.h ../lists.h + $(call compile, $<) + +%.o: %.c + $(call compile, $<) diff --git a/winboard/makefile.ms b/winboard/makefile.ms new file mode 100644 index 0000000..d406aef --- /dev/null +++ b/winboard/makefile.ms @@ -0,0 +1,160 @@ +# Command line: nmake /f makefile.ms +# Set VCVER=6 for MSVC 4.x through 7.0(aka 2002 aka .NET). +# For MSVC 8 (aka 2005) set VCVER=8. Beyond that try 8 first. +VCVER=6 + + +PROJ = winboard + + +OBJS=backend.obj book.obj gamelist.obj lists.obj moves.obj pgntags.obj uci.obj zippy.obj\ + parser.obj wclipbrd.obj wedittags.obj wengineo.obj wevalgraph.obj wgamelist.obj\ + whistory.obj winboard.obj wlayout.obj woptions.obj wsnap.obj wsockerr.obj + + +# Debugging? +USE_DEBUG=0 + + +CC = @cl +RC = @rc +LINK = link +HC="c:\program files\help workshop\hcrtf.exe" -xn +FLEX = "c:/mingw/mingw32/bin/flex.exe" +DEFS = -D_WIN32_IE=0x300 -DWIN32 -DWINVER=0x400 -D_WIN32_WINDOWS=0x500 +#WARN = -W3 +ARCH = + + +!if $(VCVER) >= 8 +CLIB= libcmt +LIBF= -MT +DEPRECATE=-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_USE_32BIT_TIME_T +!else +VSO = -Gf -Og +CLIB = msvcrt +LIBF = -MD +!endif + + +!if $(USE_DEBUG) == 0 +CFDEBUG = -DNDEBUG +OPTS = -Os -Oy -Gs -GA -Zl $(VSO) $(LIBF) +LFDEBUG = $(CLIB).lib +!else +CFDEBUG = -D_DEBUG -DDEBUG +OPTS = -Od -Zi -Fd$(PROJ).pdb $(LIBF)d +LFDEBUG = -DEBUG -PDB:$(PROJ).pdb -MAP:$(PROJ).map $(CLIB)d.lib +!endif +CF = $(CFDEBUG) $(DEFS) $(DEPRECATE) -I. -I.. +CFLAGS = -c -nologo $(WARN) $(CF) $(ARCH) $(OPTS) +LFLAGS = -nologo $(LFDEBUG) + + +all: $(PROJ).exe + + +clean: + -erase *~ $(PROJ).exe $(PROJ).err $(PROJ).rbj $(PROJ).res *.sbr *.bsc\ + *.o *.obj *.plg *.opt *.ncb *.debug *.bak *.gid *.map *.pdb *.ini + + +# Update the help file if necessary +$(PROJ).hlp : $(PROJ).rtf + $(HC) $(PROJ).hpj + -@type $(PROJ).err + -@rename $(PROJ).hlp $(PROJ).hlp.tmp + -@rename $(PROJ).hlp.tmp $(PROJ).hlp + + +# Update the resource if necessary +$(PROJ).res: $(PROJ).rc $(PROJ).h resource.h + $(RC) $(CF) -r -fo $(PROJ).res $(PROJ).rc + +parser.c: ../parser.l + $(FLEX) -oparser.c -L ../parser.l + +winboard.obj: winboard.c config.h winboard.h ../common.h ../frontend.h \ + ../backend.h ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \ + wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h + $(CC) $(CFLAGS) winboard.c + +backend.obj: ../backend.c config.h ../common.h ../frontend.h ../backend.h \ + ../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h + $(CC) $(CFLAGS) ../backend.c + +parser.obj: parser.c config.h ../common.h ../backend.h ../parser.h \ + ../frontend.h ../moves.h ../lists.h + $(CC) $(CFLAGS) parser.c + +book.obj: ../book.c ../common.h ../backend.h ../lists.h + $(CC) $(CFLAGS) ../book.c + +gamelist.obj: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \ + ../backend.h ../parser.h + $(CC) $(CFLAGS) ../gamelist.c + +lists.obj: ../lists.c config.h ../lists.h ../common.h + $(CC) $(CFLAGS) ../lists.c + +moves.obj: ../moves.c config.h ../backend.h ../common.h ../parser.h \ + ../moves.h ../lists.h + $(CC) $(CFLAGS) ../moves.c + +wclipbrd.obj: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \ + winboard.h resource.h wclipbrd.h ../lists.h + $(CC) $(CFLAGS) wclipbrd.c + +wedittags.obj: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \ + ../backend.h ../lists.h wedittags.h + $(CC) $(CFLAGS) wedittags.c + +wgamelist.obj: wgamelist.c config.h. ../common.h winboard.h resource.h ../frontend.h \ + ../backend.h wgamelist.h ../lists.h + $(CC) $(CFLAGS) wgamelist.c + +woptions.obj: woptions.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h defaults.h winboard.h resource.h + $(CC) $(CFLAGS) woptions.c + +wengineo.obj: wengineo.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(CC) $(CFLAGS) wengineo.c + +whistory.obj: whistory.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(CC) $(CFLAGS) whistory.c + +wevalgraph.obj: wevalgraph.c config.h ../common.h ../frontend.h ../backend.h \ + ../lists.h winboard.h resource.h wsnap.h + $(CC) $(CFLAGS) wevalgraph.c + +wlayout.obj: wlayout.c config.h ../common.h winboard.h resource.h + $(CC) $(CFLAGS) wlayout.c + +wsockerr.obj: wsockerr.c wsockerr.h + $(CC) $(CFLAGS) wsockerr.c + +wsnap.obj: wsnap.c wsnap.h + $(CC) $(CFLAGS) wsnap.c + +pgntags.obj: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \ + ../parser.h ../lists.h + $(CC) $(CFLAGS) ../pgntags.c + +zippy.obj: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \ + ../backend.h ../backendz.h ../lists.h + $(CC) $(CFLAGS) ../zippy.c + +uci.obj: ../uci.c ..//common.h ../backend.h ../frontend.h ../lists.h + $(CC) $(CFLAGS) ../uci.c + + +$(PROJ).exe: $(OBJS) $(PROJ).res $(PROJ).hlp + $(LINK) $(LFLAGS) $(OBJS) wsock32.lib comctl32.lib winmm.lib shell32.lib\ + oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib\ + $(PROJ).res -out:$(PROJ).exe + + +.c.obj: + $(CC) $(CFLAGS) $< \ No newline at end of file diff --git a/winboard/res/winboard.exe.manifest b/winboard/res/winboard.exe.manifest new file mode 100644 index 0000000..349abd5 --- /dev/null +++ b/winboard/res/winboard.exe.manifest @@ -0,0 +1,22 @@ + + + +Winboard 32-bit application. + + + + + + diff --git a/winboard/resource.h b/winboard/resource.h index aa5dc8b..812247a 100644 --- a/winboard/resource.h +++ b/winboard/resource.h @@ -2,6 +2,7 @@ // Microsoft Developer Studio generated include file. // Used by winboard.rc // +#define MANIFEST_RESOURCE_ID 1 #define IDM_NewGame 100 #define IDM_LoadGame 101 #define IDM_SaveGame 102 diff --git a/winboard/wevalgraph.c b/winboard/wevalgraph.c index fca6a67..55c3ec2 100644 --- a/winboard/wevalgraph.c +++ b/winboard/wevalgraph.c @@ -145,16 +145,11 @@ static VOID DrawAxisSegmentHoriz( int value, BOOL drawValue ) if( drawValue ) { SIZE stSize; - char buf[8]; + char buf[MSG_SIZ], *b = buf; int cbBuf; - if( value > 0 ) { - buf[0] = '+'; - itoa( value, buf+1, 10 ); - } - else { - itoa( value, buf, 10 ); - } + if( value > 0 ) *b++ = '+'; + sprintf(b, "%d", value); cbBuf = strlen( buf ); diff --git a/winboard/winboard.c b/winboard/winboard.c index 55802b4..a00473e 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -1671,6 +1672,8 @@ ParseArgs(GetFunc get, void *cl) case ArgNone: ExitArgError("Unrecognized argument", argValue); break; + case ArgTrue: + case ArgFalse: ; } } } @@ -1844,6 +1847,7 @@ InitAppData(LPSTR lpCmdLine) appData.reuseSecond = TRUE; appData.blindfold = FALSE; appData.icsEngineAnalyze = FALSE; + memset(&dcb, 0, sizeof(DCB)); // required by VS 2002 + dcb.DCBlength = sizeof(DCB); dcb.BaudRate = 9600; dcb.fBinary = TRUE; @@ -8864,7 +8868,7 @@ DisplayMessage(char *str1, char *str2) } messageText[MESSAGE_TEXT_MAX - 1] = NULLCHAR; - if (IsIconic(hwndMain)) return; + if (hwndMain == NULL || IsIconic(hwndMain)) return; hdc = GetDC(hwndMain); oldFont = SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf); ExtTextOut(hdc, messageRect.left, messageRect.top, ETO_CLIPPED|ETO_OPAQUE, @@ -10697,3 +10701,4 @@ void SetProgramStats( FrontEndProgramStats * stats ) EngineOutputUpdate( stats ); } +/// \ No newline at end of file diff --git a/winboard/winboard.dsp b/winboard/winboard.dsp index 0c28bf9..2b5ff01 100644 --- a/winboard/winboard.dsp +++ b/winboard/winboard.dsp @@ -1,10 +1,10 @@ # Microsoft Developer Studio Project File - Name="winboard" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** -# TARGTYPE "Win32 (x86) External Target" 0x0106 +# TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=winboard - Win32 Release +CFG=winboard - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,55 +13,73 @@ CFG=winboard - Win32 Release !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "winboard.mak" CFG="winboard - Win32 Release" +!MESSAGE NMAKE /f "winboard.mak" CFG="winboard - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "winboard - Win32 Release" (based on "Win32 (x86) External Target") -!MESSAGE "winboard - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE "winboard - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "winboard - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project +# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe !IF "$(CFG)" == "winboard - Win32 Release" +# PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\Release" -# PROP BASE Intermediate_Dir ".\Release" -# PROP BASE Cmd_Line "NMAKE /f winboard.mak" -# PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "winboard.exe" -# PROP BASE Bsc_Name "winboard.bsc" +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" +# PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\Release" -# PROP Intermediate_Dir ".\Release" -# PROP Cmd_Line "nmake /f msvc.mak" -# PROP Rebuild_Opt "/a" -# PROP Target_File "winboard.exe" -# PROP Bsc_Name "winboard.bsc" +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Og /Os /Oy /Gf /I "." /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /Zl /FD /Gs /GA /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i ".." /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrt.lib /nologo /subsystem:windows /pdb:none /machine:I386 !ELSEIF "$(CFG)" == "winboard - Win32 Debug" +# PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir ".\Debug" -# PROP BASE Intermediate_Dir ".\Debug" -# PROP BASE Cmd_Line "NMAKE /f winboard.mak" -# PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "winboard.exe" -# PROP BASE Bsc_Name "winboard.bsc" +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" +# PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\Debug" -# PROP Intermediate_Dir ".\Debug" -# PROP Cmd_Line "nmake /f msvc.mak" -# PROP Rebuild_Opt "/a" -# PROP Target_File "winboard.exe" -# PROP Bsc_Name "winboard.bsc" +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i ".." /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrtd.lib /nologo /subsystem:windows /map /debug /machine:I386 /pdbtype:sept !ENDIF @@ -69,35 +87,28 @@ CFG=winboard - Win32 Release # Name "winboard - Win32 Release" # Name "winboard - Win32 Debug" - -!IF "$(CFG)" == "winboard - Win32 Release" - -!ELSEIF "$(CFG)" == "winboard - Win32 Debug" - -!ENDIF - # Begin Group "Source Files" -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File -SOURCE=.\backend.c +SOURCE=..\backend.c # End Source File # Begin Source File -SOURCE=.\common.c +SOURCE=..\book.c # End Source File # Begin Source File -SOURCE=.\gamelist.c +SOURCE=..\gamelist.c # End Source File # Begin Source File -SOURCE=.\lists.c +SOURCE=..\lists.c # End Source File # Begin Source File -SOURCE=.\moves.c +SOURCE=..\moves.c # End Source File # Begin Source File @@ -105,424 +116,85 @@ SOURCE=.\parser.c # End Source File # Begin Source File -SOURCE=.\parser.l +SOURCE=..\pgntags.c # End Source File # Begin Source File -SOURCE=.\pgntags.c +SOURCE=..\uci.c # End Source File # Begin Source File -SOURCE=.\wedittags.c +SOURCE=.\wclipbrd.c # End Source File # Begin Source File -SOURCE=.\wgamelist.c +SOURCE=.\wedittags.c # End Source File # Begin Source File -SOURCE=.\winboard.c +SOURCE=.\wengineo.c # End Source File # Begin Source File -SOURCE=.\wsockerr.c +SOURCE=.\wevalgraph.c # End Source File # Begin Source File -SOURCE=.\zippy.c +SOURCE=.\wgamelist.c # End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" # Begin Source File -SOURCE=.\backend.h +SOURCE=.\whistory.c # End Source File # Begin Source File -SOURCE=.\backendz.h +SOURCE=.\winboard.c # End Source File # Begin Source File -SOURCE=.\common.h -# End Source File -# Begin Source File +SOURCE=.\winboard.rc -SOURCE=.\config.h -# End Source File -# Begin Source File +!IF "$(CFG)" == "winboard - Win32 Release" -SOURCE=.\defaults.h -# End Source File -# Begin Source File +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 -SOURCE=.\frontend.h -# End Source File -# Begin Source File +!ELSEIF "$(CFG)" == "winboard - Win32 Debug" -SOURCE=.\lists.h -# End Source File -# Begin Source File +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 -SOURCE=.\moves.h -# End Source File -# Begin Source File +!ENDIF -SOURCE=.\parser.h # End Source File # Begin Source File -SOURCE=.\resource.h +SOURCE=.\wlayout.c # End Source File # Begin Source File -SOURCE=.\wedittags.h +SOURCE=.\woptions.c # End Source File # Begin Source File -SOURCE=.\wgamelist.h +SOURCE=.\wsnap.c # End Source File # Begin Source File -SOURCE=.\winboard.h +SOURCE=.\wsockerr.c # End Source File # Begin Source File -SOURCE=.\wsockerr.h +SOURCE=..\zippy.c # End Source File -# Begin Source File +# End Group +# Begin Group "Header Files" -SOURCE=.\zippy.h -# End Source File +# PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\bitmaps\B21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B40o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B40s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B64s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B80o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\B80s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\bepbeep.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\board.ico -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\ching.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\click.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\cymbal.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\Ding1.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\doodloop.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\drip.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\galactic.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\gong.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\honkhonk.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\icon_b.ico -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\icon_ob.ico -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\icon_ow.ico -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\icon_whi.ico -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\K21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\K21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\laser.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\move.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\N21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\N21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\P21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\P21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\penalty.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\phone.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\pop.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\pop2.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\Q21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\Q21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\R21o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\R21s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\R80o.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\R80s.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\slap.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\squeak.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\swish.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\thud.wav -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\tim.bmp -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\whipcrak.wav -# End Source File -# Begin Source File - -SOURCE=.\winboard.rc -# End Source File -# Begin Source File - -SOURCE=.\WINBOARD.rtf -# End Source File -# Begin Source File - -SOURCE=.\bitmaps\zap.wav -# End Source File +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group -# Begin Source File - -SOURCE=.\sounds\alarm.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\challenge.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\channel.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\channel1.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\ching.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\click.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\cymbal.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\ding1.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\draw.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\drip.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\gong.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\honkhonk.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\kibitz.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\laser.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\lose.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\move.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\penalty.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\phone.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\pop.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\pop2.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\request.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\seek.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\shout.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\slap.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\squeak.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\sshout.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\swish.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\tell.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\thud.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\unfinished.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\whipcrak.wav -# End Source File -# Begin Source File - -SOURCE=.\sounds\win.wav -# End Source File # End Target # End Project diff --git a/winboard/winboard.dsw b/winboard/winboard.dsw index 3945304..e0bf89c 100644 --- a/winboard/winboard.dsw +++ b/winboard/winboard.dsw @@ -1,9 +1,9 @@ -Microsoft Developer Studio Workspace File, Format Version 5.00 +Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### -Project: "winboard"=.\winboard.dsp - Package Owner=<4> +Project: "winboard"=".\winboard.dsp" - Package Owner=<4> Package=<5> {{{ diff --git a/winboard/winboard.h b/winboard/winboard.h index c24d020..19f539e 100644 --- a/winboard/winboard.h +++ b/winboard/winboard.h @@ -166,6 +166,15 @@ extern MyFont *font[NUM_SIZES][NUM_FONTS]; #define OUTLINE_PIECE 1 #define WHITE_PIECE 2 +/* Some definitions required by MSVC 4.1 */ +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL 0x020A +#endif +#ifndef SCF_DEFAULT +#define SCF_DEFAULT 0x0000 +#define SCF_ALL 0x0004 +#endif + #define COPY_TMP "wbcopy.tmp" #define PASTE_TMP "wbpaste.tmp" diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 0759e9f..588c9a4 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -25,6 +25,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 +// moved to "res" subdir to make testing easier-- don't want it in the root +MANIFEST_RESOURCE_ID 24 MOVEABLE PURE "res\\winboard.exe.manifest" + ///////////////////////////////////////////////////////////////////////////// // // Dialog diff --git a/winboard/woptions.c b/winboard/woptions.c index 003878a..d685200 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -2000,7 +2000,7 @@ SoundOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) tmp.data = NULL; MyLoadSound(&tmp); MyPlaySound(&tmp); - if (tmp.data != NULL) free(tmp.data); + if (tmp.data != NULL) FreeResource(tmp.data); // technically obsolete fn, but tmp.data is NOT malloc'd mem if (tmp.name != NULL) free(tmp.name); return TRUE;