diff options
author | Franklin Wei <git@fwei.tk> | 2017-10-23 17:19:29 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-10-23 17:19:29 -0400 |
commit | ef1306764e6443d67612542654f252b376c5993e (patch) | |
tree | 5f064178c1f9a23695b1b52b8bd487434be9006e /apps/plugins/puzzles/src | |
parent | 7a8c9daf7ef5a8b38d4c4f6625ff2d9d8eb1aa0a (diff) | |
download | rockbox-ef1306764e6443d67612542654f252b376c5993e.tar.gz rockbox-ef1306764e6443d67612542654f252b376c5993e.zip |
puzzles: resync with upstream
There have been some improvements with regard to small screen sizes,
which will be nice to have.
Change-Id: I30c740514156258d2818fde325c1a751500f7611
Diffstat (limited to 'apps/plugins/puzzles/src')
68 files changed, 4537 insertions, 2123 deletions
diff --git a/apps/plugins/puzzles/src/Buildscr b/apps/plugins/puzzles/src/Buildscr index b8a585b43e..4a54d277ff 100644 --- a/apps/plugins/puzzles/src/Buildscr +++ b/apps/plugins/puzzles/src/Buildscr | |||
@@ -25,7 +25,7 @@ in puzzles do echo '$#define VER "Version $(Version)"' >> version.h | |||
25 | in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' osx-info.plist | 25 | in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' osx-info.plist |
26 | 26 | ||
27 | # First build some local binaries, to run the icon build. | 27 | # First build some local binaries, to run the icon build. |
28 | in puzzles do perl mkfiles.pl -U | 28 | in puzzles do perl mkfiles.pl -U CFLAGS='-Wwrite-strings -Werror' |
29 | in puzzles do make | 29 | in puzzles do make |
30 | 30 | ||
31 | # Now build the screenshots and icons. | 31 | # Now build the screenshots and icons. |
@@ -45,7 +45,7 @@ in puzzles do ./mkauto.sh | |||
45 | # Build the OS X .dmg archive. | 45 | # Build the OS X .dmg archive. |
46 | delegate osx | 46 | delegate osx |
47 | in puzzles do make -f Makefile.osx clean | 47 | in puzzles do make -f Makefile.osx clean |
48 | in puzzles do make -f Makefile.osx release VER=-DVER=$(Version) | 48 | in puzzles do make -f Makefile.osx release VER=-DVER=$(Version) XFLAGS='-Wwrite-strings -Werror' |
49 | return puzzles/Puzzles.dmg | 49 | return puzzles/Puzzles.dmg |
50 | enddelegate | 50 | enddelegate |
51 | 51 | ||
@@ -56,7 +56,7 @@ in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt" | |||
56 | in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss | 56 | in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss |
57 | ifneq "$(VISUAL_STUDIO)" "yes" then | 57 | ifneq "$(VISUAL_STUDIO)" "yes" then |
58 | in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl clean | 58 | in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl clean |
59 | in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl VER=-DVER=$(Version) | 59 | in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl VER=-DVER=$(Version) XFLAGS='-Wwrite-strings -Werror' |
60 | # Code-sign the binaries, if the local bob config provides a script | 60 | # Code-sign the binaries, if the local bob config provides a script |
61 | # to do so. We assume here that the script accepts an -i option to | 61 | # to do so. We assume here that the script accepts an -i option to |
62 | # provide a 'more info' URL, and an optional -n option to provide a | 62 | # provide a 'more info' URL, and an optional -n option to provide a |
@@ -144,7 +144,7 @@ ifneq "$(JAVA_UNFINISHED)" "" in puzzles do perl mkfiles.pl | |||
144 | 144 | ||
145 | # Build the Java applets. | 145 | # Build the Java applets. |
146 | delegate nestedvm | 146 | delegate nestedvm |
147 | in puzzles do make -f Makefile.nestedvm NESTEDVM="$$NESTEDVM" VER=-DVER=$(Version) | 147 | in puzzles do make -f Makefile.nestedvm NESTEDVM="$$NESTEDVM" VER=-DVER=$(Version) XFLAGS="-Wwrite-strings -Werror" |
148 | return puzzles/*.jar | 148 | return puzzles/*.jar |
149 | enddelegate | 149 | enddelegate |
150 | 150 | ||
@@ -154,7 +154,7 @@ enddelegate | |||
154 | in puzzles do mkdir js # so we can tell output .js files from emcc*.js | 154 | in puzzles do mkdir js # so we can tell output .js files from emcc*.js |
155 | delegate emscripten | 155 | delegate emscripten |
156 | in puzzles do make -f Makefile.emcc OUTPREFIX=js/ clean | 156 | in puzzles do make -f Makefile.emcc OUTPREFIX=js/ clean |
157 | in puzzles do make -f Makefile.emcc OUTPREFIX=js/ | 157 | in puzzles do make -f Makefile.emcc OUTPREFIX=js/ XFLAGS="-Wwrite-strings -Werror" |
158 | return puzzles/js/*.js | 158 | return puzzles/js/*.js |
159 | enddelegate | 159 | enddelegate |
160 | 160 | ||
diff --git a/apps/plugins/puzzles/src/Makefile b/apps/plugins/puzzles/src/Makefile index 09acd2dd39..a0fc6c5e74 100644 --- a/apps/plugins/puzzles/src/Makefile +++ b/apps/plugins/puzzles/src/Makefile | |||
@@ -1,719 +1,2603 @@ | |||
1 | # Makefile for puzzles under X/GTK and Unix. | 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. |
2 | # Makefile. Generated from Makefile.in by configure. | ||
3 | |||
4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. | ||
5 | |||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | |||
16 | |||
17 | # Makefile.am for puzzles under Unix with Autoconf/Automake. | ||
2 | # | 18 | # |
3 | # This file was created by `mkfiles.pl' from the `Recipe' file. | 19 | # This file was created by `mkfiles.pl' from the `Recipe' file. |
4 | # DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead. | 20 | # DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead. |
5 | 21 | ||
6 | # You can define this path to point at your tools if you need to | 22 | |
7 | # TOOLPATH = /opt/gcc/bin | 23 | |
8 | CC := $(TOOLPATH)$(CC) | 24 | am__is_gnu_make = { \ |
9 | # You can manually set this to `gtk-config' or `pkg-config gtk+-1.2' | 25 | if test -z '$(MAKELEVEL)'; then \ |
10 | # (depending on what works on your system) if you want to enforce | 26 | false; \ |
11 | # building with GTK 1.2, or you can set it to `pkg-config gtk+-2.0' | 27 | elif test -n '$(MAKE_HOST)'; then \ |
12 | # if you want to enforce 2.0. The default is to try 2.0 and fall back | 28 | true; \ |
13 | # to 1.2 if it isn't found. | 29 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ |
14 | GTK_CONFIG = sh -c 'pkg-config gtk+-2.0 $$0 2>/dev/null || gtk-config $$0' | 30 | true; \ |
15 | 31 | else \ | |
16 | CFLAGS := -O2 -Wall -ansi -pedantic -g -I./ -Iicons/ `$(GTK_CONFIG) \ | 32 | false; \ |
17 | --cflags` $(CFLAGS) | 33 | fi; \ |
18 | XLIBS = `$(GTK_CONFIG) --libs` -lm | 34 | } |
19 | ULIBS = -lm# | 35 | am__make_running_with_option = \ |
20 | INSTALL=install | 36 | case $${target_option-} in \ |
21 | INSTALL_PROGRAM=$(INSTALL) | 37 | ?) ;; \ |
22 | INSTALL_DATA=$(INSTALL) | 38 | *) echo "am__make_running_with_option: internal error: invalid" \ |
23 | prefix=/usr/local | 39 | "target option '$${target_option-}' specified" >&2; \ |
24 | exec_prefix=$(prefix) | 40 | exit 1;; \ |
25 | bindir=$(exec_prefix)/bin | 41 | esac; \ |
26 | gamesdir=$(exec_prefix)/games | 42 | has_opt=no; \ |
27 | mandir=$(prefix)/man | 43 | sane_makeflags=$$MAKEFLAGS; \ |
28 | man1dir=$(mandir)/man1 | 44 | if $(am__is_gnu_make); then \ |
29 | 45 | sane_makeflags=$$MFLAGS; \ | |
30 | all: $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube \ | 46 | else \ |
31 | $(BINPREFIX)dominosa $(BINPREFIX)fifteen \ | 47 | case $$MAKEFLAGS in \ |
32 | $(BINPREFIX)fifteensolver $(BINPREFIX)filling \ | 48 | *\\[\ \ ]*) \ |
33 | $(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood \ | 49 | bs=\\; \ |
34 | $(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture \ | 50 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ |
35 | $(BINPREFIX)galaxiessolver $(BINPREFIX)guess \ | 51 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ |
36 | $(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver \ | 52 | esac; \ |
37 | $(BINPREFIX)latincheck $(BINPREFIX)lightup \ | 53 | fi; \ |
38 | $(BINPREFIX)lightupsolver $(BINPREFIX)loopy \ | 54 | skip_next=no; \ |
39 | $(BINPREFIX)loopysolver $(BINPREFIX)magnets \ | 55 | strip_trailopt () \ |
40 | $(BINPREFIX)magnetssolver $(BINPREFIX)map \ | 56 | { \ |
41 | $(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc \ | 57 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ |
42 | $(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide \ | 58 | }; \ |
43 | $(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade \ | 59 | for flg in $$sane_makeflags; do \ |
44 | $(BINPREFIX)pattern $(BINPREFIX)patternpicture \ | 60 | test $$skip_next = yes && { skip_next=no; continue; }; \ |
45 | $(BINPREFIX)patternsolver $(BINPREFIX)pearl \ | 61 | case $$flg in \ |
46 | $(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range \ | 62 | *=*|--*) continue;; \ |
47 | $(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost \ | 63 | -*I) strip_trailopt 'I'; skip_next=yes;; \ |
48 | $(BINPREFIX)signpostsolver $(BINPREFIX)singles \ | 64 | -*I?*) strip_trailopt 'I';; \ |
49 | $(BINPREFIX)singlessolver $(BINPREFIX)sixteen \ | 65 | -*O) strip_trailopt 'O'; skip_next=yes;; \ |
50 | $(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo \ | 66 | -*O?*) strip_trailopt 'O';; \ |
51 | $(BINPREFIX)solosolver $(BINPREFIX)tents \ | 67 | -*l) strip_trailopt 'l'; skip_next=yes;; \ |
52 | $(BINPREFIX)tentssolver $(BINPREFIX)towers \ | 68 | -*l?*) strip_trailopt 'l';; \ |
53 | $(BINPREFIX)towerssolver $(BINPREFIX)tracks \ | 69 | -[dEDm]) skip_next=yes;; \ |
54 | $(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal \ | 70 | -[JT]) skip_next=yes;; \ |
55 | $(BINPREFIX)unequalsolver $(BINPREFIX)unruly \ | 71 | esac; \ |
56 | $(BINPREFIX)unrulysolver $(BINPREFIX)untangle | 72 | case $$flg in \ |
57 | 73 | *$$target_option*) has_opt=yes; break;; \ | |
58 | $(BINPREFIX)blackbox: blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \ | 74 | esac; \ |
59 | no-icon.o printing.o ps.o random.o version.o | 75 | done; \ |
60 | $(CC) -o $@ blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \ | 76 | test $$has_opt = yes |
61 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 77 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) |
62 | $(XLIBS) | 78 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) |
63 | 79 | pkgdatadir = $(datadir)/puzzles | |
64 | $(BINPREFIX)bridges: bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \ | 80 | pkgincludedir = $(includedir)/puzzles |
65 | midend.o misc.o no-icon.o printing.o ps.o random.o version.o | 81 | pkglibdir = $(libdir)/puzzles |
66 | $(CC) -o $@ bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \ | 82 | pkglibexecdir = $(libexecdir)/puzzles |
67 | midend.o misc.o no-icon.o printing.o ps.o random.o version.o \ | 83 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
68 | $(XLFLAGS) $(XLIBS) | 84 | install_sh_DATA = $(install_sh) -c -m 644 |
69 | 85 | install_sh_PROGRAM = $(install_sh) -c | |
70 | $(BINPREFIX)cube: cube.o drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 86 | install_sh_SCRIPT = $(install_sh) -c |
71 | printing.o ps.o random.o version.o | 87 | INSTALL_HEADER = $(INSTALL_DATA) |
72 | $(CC) -o $@ cube.o drawing.o gtk.o malloc.o midend.o misc.o \ | 88 | transform = $(program_transform_name) |
73 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 89 | NORMAL_INSTALL = : |
74 | $(XLIBS) | 90 | PRE_INSTALL = : |
75 | 91 | POST_INSTALL = : | |
76 | $(BINPREFIX)dominosa: dominosa.o drawing.o gtk.o laydomino.o malloc.o \ | 92 | NORMAL_UNINSTALL = : |
77 | midend.o misc.o no-icon.o printing.o ps.o random.o version.o | 93 | PRE_UNINSTALL = : |
78 | $(CC) -o $@ dominosa.o drawing.o gtk.o laydomino.o malloc.o midend.o \ | 94 | POST_UNINSTALL = : |
79 | misc.o no-icon.o printing.o ps.o random.o version.o \ | 95 | noinst_PROGRAMS = blackbox$(EXEEXT) bridges$(EXEEXT) cube$(EXEEXT) \ |
80 | $(XLFLAGS) $(XLIBS) | 96 | dominosa$(EXEEXT) fifteen$(EXEEXT) fifteensolver$(EXEEXT) \ |
81 | 97 | filling$(EXEEXT) fillingsolver$(EXEEXT) flip$(EXEEXT) \ | |
82 | $(BINPREFIX)fifteen: drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \ | 98 | flood$(EXEEXT) galaxies$(EXEEXT) galaxiespicture$(EXEEXT) \ |
83 | no-icon.o printing.o ps.o random.o version.o | 99 | galaxiessolver$(EXEEXT) guess$(EXEEXT) inertia$(EXEEXT) \ |
84 | $(CC) -o $@ drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \ | 100 | keen$(EXEEXT) keensolver$(EXEEXT) latincheck$(EXEEXT) \ |
85 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 101 | lightup$(EXEEXT) lightupsolver$(EXEEXT) loopy$(EXEEXT) \ |
86 | $(XLIBS) | 102 | loopysolver$(EXEEXT) magnets$(EXEEXT) magnetssolver$(EXEEXT) \ |
87 | 103 | map$(EXEEXT) mapsolver$(EXEEXT) mineobfusc$(EXEEXT) \ | |
88 | $(BINPREFIX)fifteensolver: fifteen2.o malloc.o misc.o nullfe.o random.o | 104 | mines$(EXEEXT) net$(EXEEXT) netslide$(EXEEXT) \ |
89 | $(CC) -o $@ fifteen2.o malloc.o misc.o nullfe.o random.o $(XLFLAGS) \ | 105 | nullgame$(EXEEXT) obfusc$(EXEEXT) palisade$(EXEEXT) \ |
90 | $(ULIBS) | 106 | pattern$(EXEEXT) patternpicture$(EXEEXT) \ |
91 | 107 | patternsolver$(EXEEXT) pearl$(EXEEXT) pearlbench$(EXEEXT) \ | |
92 | $(BINPREFIX)filling: drawing.o dsf.o filling.o gtk.o malloc.o midend.o \ | 108 | pegs$(EXEEXT) range$(EXEEXT) rect$(EXEEXT) samegame$(EXEEXT) \ |
93 | misc.o no-icon.o printing.o ps.o random.o version.o | 109 | signpost$(EXEEXT) signpostsolver$(EXEEXT) singles$(EXEEXT) \ |
94 | $(CC) -o $@ drawing.o dsf.o filling.o gtk.o malloc.o midend.o misc.o \ | 110 | singlessolver$(EXEEXT) sixteen$(EXEEXT) slant$(EXEEXT) \ |
95 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 111 | slantsolver$(EXEEXT) solo$(EXEEXT) solosolver$(EXEEXT) \ |
96 | $(XLIBS) | 112 | tents$(EXEEXT) tentssolver$(EXEEXT) towers$(EXEEXT) \ |
97 | 113 | towerssolver$(EXEEXT) tracks$(EXEEXT) twiddle$(EXEEXT) \ | |
98 | $(BINPREFIX)fillingsolver: dsf.o filling2.o malloc.o misc.o nullfe.o \ | 114 | undead$(EXEEXT) unequal$(EXEEXT) unequalsolver$(EXEEXT) \ |
99 | random.o | 115 | unruly$(EXEEXT) unrulysolver$(EXEEXT) untangle$(EXEEXT) |
100 | $(CC) -o $@ dsf.o filling2.o malloc.o misc.o nullfe.o random.o \ | 116 | bin_PROGRAMS = $(am__EXEEXT_1) |
101 | $(XLFLAGS) $(ULIBS) | 117 | subdir = . |
102 | 118 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
103 | $(BINPREFIX)flip: drawing.o flip.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 119 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac |
104 | printing.o ps.o random.o tree234.o version.o | 120 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
105 | $(CC) -o $@ drawing.o flip.o gtk.o malloc.o midend.o misc.o \ | 121 | $(ACLOCAL_M4) |
106 | no-icon.o printing.o ps.o random.o tree234.o version.o \ | 122 | DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ |
107 | $(XLFLAGS) $(XLIBS) | 123 | $(am__configure_deps) $(am__DIST_COMMON) |
108 | 124 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | |
109 | $(BINPREFIX)flood: drawing.o flood.o gtk.o malloc.o midend.o misc.o \ | 125 | configure.lineno config.status.lineno |
110 | no-icon.o printing.o ps.o random.o version.o | 126 | mkinstalldirs = $(install_sh) -d |
111 | $(CC) -o $@ drawing.o flood.o gtk.o malloc.o midend.o misc.o \ | 127 | CONFIG_CLEAN_FILES = |
112 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 128 | CONFIG_CLEAN_VPATH_FILES = |
113 | $(XLIBS) | 129 | LIBRARIES = $(noinst_LIBRARIES) |
114 | 130 | AR = ar | |
115 | $(BINPREFIX)galaxies: drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \ | 131 | ARFLAGS = cru |
116 | misc.o no-icon.o printing.o ps.o random.o version.o | 132 | AM_V_AR = $(am__v_AR_$(V)) |
117 | $(CC) -o $@ drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \ | 133 | am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) |
118 | misc.o no-icon.o printing.o ps.o random.o version.o \ | 134 | am__v_AR_0 = @echo " AR " $@; |
119 | $(XLFLAGS) $(XLIBS) | 135 | am__v_AR_1 = |
120 | 136 | libfifteen2_a_AR = $(AR) $(ARFLAGS) | |
121 | $(BINPREFIX)galaxiespicture: dsf.o galaxie4.o malloc.o misc.o nullfe.o \ | 137 | libfifteen2_a_LIBADD = |
122 | random.o | 138 | am__dirstamp = $(am__leading_dot)dirstamp |
123 | $(CC) -o $@ dsf.o galaxie4.o malloc.o misc.o nullfe.o random.o -lm \ | 139 | am_libfifteen2_a_OBJECTS = ./libfifteen2_a-fifteen.$(OBJEXT) |
124 | $(XLFLAGS) $(ULIBS) | 140 | libfifteen2_a_OBJECTS = $(am_libfifteen2_a_OBJECTS) |
125 | 141 | libfilling2_a_AR = $(AR) $(ARFLAGS) | |
126 | $(BINPREFIX)galaxiessolver: dsf.o galaxie2.o malloc.o misc.o nullfe.o \ | 142 | libfilling2_a_LIBADD = |
127 | random.o | 143 | am_libfilling2_a_OBJECTS = ./libfilling2_a-filling.$(OBJEXT) |
128 | $(CC) -o $@ dsf.o galaxie2.o malloc.o misc.o nullfe.o random.o -lm \ | 144 | libfilling2_a_OBJECTS = $(am_libfilling2_a_OBJECTS) |
129 | $(XLFLAGS) $(ULIBS) | 145 | libgalaxie2_a_AR = $(AR) $(ARFLAGS) |
130 | 146 | libgalaxie2_a_LIBADD = | |
131 | $(BINPREFIX)guess: drawing.o gtk.o guess.o malloc.o midend.o misc.o \ | 147 | am_libgalaxie2_a_OBJECTS = ./libgalaxie2_a-galaxies.$(OBJEXT) |
132 | no-icon.o printing.o ps.o random.o version.o | 148 | libgalaxie2_a_OBJECTS = $(am_libgalaxie2_a_OBJECTS) |
133 | $(CC) -o $@ drawing.o gtk.o guess.o malloc.o midend.o misc.o \ | 149 | libgalaxie4_a_AR = $(AR) $(ARFLAGS) |
134 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 150 | libgalaxie4_a_LIBADD = |
135 | $(XLIBS) | 151 | am_libgalaxie4_a_OBJECTS = ./libgalaxie4_a-galaxies.$(OBJEXT) |
136 | 152 | libgalaxie4_a_OBJECTS = $(am_libgalaxie4_a_OBJECTS) | |
137 | $(BINPREFIX)inertia: drawing.o gtk.o inertia.o malloc.o midend.o misc.o \ | 153 | libkeen2_a_AR = $(AR) $(ARFLAGS) |
138 | no-icon.o printing.o ps.o random.o version.o | 154 | libkeen2_a_LIBADD = |
139 | $(CC) -o $@ drawing.o gtk.o inertia.o malloc.o midend.o misc.o \ | 155 | am_libkeen2_a_OBJECTS = ./libkeen2_a-keen.$(OBJEXT) |
140 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 156 | libkeen2_a_OBJECTS = $(am_libkeen2_a_OBJECTS) |
141 | $(XLIBS) | 157 | liblatin6_a_AR = $(AR) $(ARFLAGS) |
142 | 158 | liblatin6_a_LIBADD = | |
143 | $(BINPREFIX)keen: drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \ | 159 | am_liblatin6_a_OBJECTS = ./liblatin6_a-latin.$(OBJEXT) |
144 | midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \ | 160 | liblatin6_a_OBJECTS = $(am_liblatin6_a_OBJECTS) |
145 | version.o | 161 | liblatin8_a_AR = $(AR) $(ARFLAGS) |
146 | $(CC) -o $@ drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \ | 162 | liblatin8_a_LIBADD = |
147 | midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \ | 163 | am_liblatin8_a_OBJECTS = ./liblatin8_a-latin.$(OBJEXT) |
148 | version.o $(XLFLAGS) $(XLIBS) | 164 | liblatin8_a_OBJECTS = $(am_liblatin8_a_OBJECTS) |
149 | 165 | liblightup2_a_AR = $(AR) $(ARFLAGS) | |
150 | $(BINPREFIX)keensolver: dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \ | 166 | liblightup2_a_LIBADD = |
151 | nullfe.o random.o tree234.o | 167 | am_liblightup2_a_OBJECTS = ./liblightup2_a-lightup.$(OBJEXT) |
152 | $(CC) -o $@ dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \ | 168 | liblightup2_a_OBJECTS = $(am_liblightup2_a_OBJECTS) |
153 | nullfe.o random.o tree234.o $(XLFLAGS) $(ULIBS) | 169 | libloopy2_a_AR = $(AR) $(ARFLAGS) |
154 | 170 | libloopy2_a_LIBADD = | |
155 | $(BINPREFIX)latincheck: latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 171 | am_libloopy2_a_OBJECTS = ./libloopy2_a-loopy.$(OBJEXT) |
156 | tree234.o | 172 | libloopy2_a_OBJECTS = $(am_libloopy2_a_OBJECTS) |
157 | $(CC) -o $@ latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 173 | libmagnets2_a_AR = $(AR) $(ARFLAGS) |
158 | tree234.o $(XLFLAGS) $(ULIBS) | 174 | libmagnets2_a_LIBADD = |
159 | 175 | am_libmagnets2_a_OBJECTS = ./libmagnets2_a-magnets.$(OBJEXT) | |
160 | $(BINPREFIX)lightup: combi.o drawing.o gtk.o lightup.o malloc.o midend.o \ | 176 | libmagnets2_a_OBJECTS = $(am_libmagnets2_a_OBJECTS) |
161 | misc.o no-icon.o printing.o ps.o random.o version.o | 177 | libmap2_a_AR = $(AR) $(ARFLAGS) |
162 | $(CC) -o $@ combi.o drawing.o gtk.o lightup.o malloc.o midend.o \ | 178 | libmap2_a_LIBADD = |
163 | misc.o no-icon.o printing.o ps.o random.o version.o \ | 179 | am_libmap2_a_OBJECTS = ./libmap2_a-map.$(OBJEXT) |
164 | $(XLFLAGS) $(XLIBS) | 180 | libmap2_a_OBJECTS = $(am_libmap2_a_OBJECTS) |
165 | 181 | libmines2_a_AR = $(AR) $(ARFLAGS) | |
166 | $(BINPREFIX)lightupsolver: combi.o lightup2.o malloc.o misc.o nullfe.o \ | 182 | libmines2_a_LIBADD = |
167 | random.o | 183 | am_libmines2_a_OBJECTS = ./libmines2_a-mines.$(OBJEXT) |
168 | $(CC) -o $@ combi.o lightup2.o malloc.o misc.o nullfe.o random.o \ | 184 | libmines2_a_OBJECTS = $(am_libmines2_a_OBJECTS) |
169 | $(XLFLAGS) $(ULIBS) | 185 | libpattern2_a_AR = $(AR) $(ARFLAGS) |
170 | 186 | libpattern2_a_LIBADD = | |
171 | $(BINPREFIX)loopy: drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \ | 187 | am_libpattern2_a_OBJECTS = ./libpattern2_a-pattern.$(OBJEXT) |
172 | midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \ | 188 | libpattern2_a_OBJECTS = $(am_libpattern2_a_OBJECTS) |
173 | tree234.o version.o | 189 | libpattern4_a_AR = $(AR) $(ARFLAGS) |
174 | $(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \ | 190 | libpattern4_a_LIBADD = |
175 | midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \ | 191 | am_libpattern4_a_OBJECTS = ./libpattern4_a-pattern.$(OBJEXT) |
176 | tree234.o version.o $(XLFLAGS) $(XLIBS) | 192 | libpattern4_a_OBJECTS = $(am_libpattern4_a_OBJECTS) |
177 | 193 | libpearl2_a_AR = $(AR) $(ARFLAGS) | |
178 | $(BINPREFIX)loopysolver: dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o \ | 194 | libpearl2_a_LIBADD = |
179 | nullfe.o penrose.o random.o tree234.o | 195 | am_libpearl2_a_OBJECTS = ./libpearl2_a-pearl.$(OBJEXT) |
180 | $(CC) -o $@ dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o nullfe.o \ | 196 | libpearl2_a_OBJECTS = $(am_libpearl2_a_OBJECTS) |
181 | penrose.o random.o tree234.o -lm $(XLFLAGS) $(ULIBS) | 197 | libsignpos2_a_AR = $(AR) $(ARFLAGS) |
182 | 198 | libsignpos2_a_LIBADD = | |
183 | $(BINPREFIX)magnets: drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \ | 199 | am_libsignpos2_a_OBJECTS = ./libsignpos2_a-signpost.$(OBJEXT) |
184 | misc.o no-icon.o printing.o ps.o random.o version.o | 200 | libsignpos2_a_OBJECTS = $(am_libsignpos2_a_OBJECTS) |
185 | $(CC) -o $@ drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \ | 201 | libsingles3_a_AR = $(AR) $(ARFLAGS) |
186 | misc.o no-icon.o printing.o ps.o random.o version.o \ | 202 | libsingles3_a_LIBADD = |
187 | $(XLFLAGS) $(XLIBS) | 203 | am_libsingles3_a_OBJECTS = ./libsingles3_a-singles.$(OBJEXT) |
188 | 204 | libsingles3_a_OBJECTS = $(am_libsingles3_a_OBJECTS) | |
189 | $(BINPREFIX)magnetssolver: laydomino.o magnets2.o malloc.o misc.o nullfe.o \ | 205 | libslant2_a_AR = $(AR) $(ARFLAGS) |
190 | random.o | 206 | libslant2_a_LIBADD = |
191 | $(CC) -o $@ laydomino.o magnets2.o malloc.o misc.o nullfe.o random.o \ | 207 | am_libslant2_a_OBJECTS = ./libslant2_a-slant.$(OBJEXT) |
192 | -lm $(XLFLAGS) $(ULIBS) | 208 | libslant2_a_OBJECTS = $(am_libslant2_a_OBJECTS) |
193 | 209 | libsolo2_a_AR = $(AR) $(ARFLAGS) | |
194 | $(BINPREFIX)map: drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \ | 210 | libsolo2_a_LIBADD = |
195 | no-icon.o printing.o ps.o random.o version.o | 211 | am_libsolo2_a_OBJECTS = ./libsolo2_a-solo.$(OBJEXT) |
196 | $(CC) -o $@ drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \ | 212 | libsolo2_a_OBJECTS = $(am_libsolo2_a_OBJECTS) |
197 | no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 213 | libtents3_a_AR = $(AR) $(ARFLAGS) |
198 | $(XLIBS) | 214 | libtents3_a_LIBADD = |
199 | 215 | am_libtents3_a_OBJECTS = ./libtents3_a-tents.$(OBJEXT) | |
200 | $(BINPREFIX)mapsolver: dsf.o malloc.o map2.o misc.o nullfe.o random.o | 216 | libtents3_a_OBJECTS = $(am_libtents3_a_OBJECTS) |
201 | $(CC) -o $@ dsf.o malloc.o map2.o misc.o nullfe.o random.o -lm \ | 217 | libtowers2_a_AR = $(AR) $(ARFLAGS) |
202 | $(XLFLAGS) $(ULIBS) | 218 | libtowers2_a_LIBADD = |
203 | 219 | am_libtowers2_a_OBJECTS = ./libtowers2_a-towers.$(OBJEXT) | |
204 | $(BINPREFIX)mineobfusc: malloc.o mines2.o misc.o nullfe.o random.o tree234.o | 220 | libtowers2_a_OBJECTS = $(am_libtowers2_a_OBJECTS) |
205 | $(CC) -o $@ malloc.o mines2.o misc.o nullfe.o random.o tree234.o \ | 221 | libunequal2_a_AR = $(AR) $(ARFLAGS) |
206 | $(XLFLAGS) $(ULIBS) | 222 | libunequal2_a_LIBADD = |
207 | 223 | am_libunequal2_a_OBJECTS = ./libunequal2_a-unequal.$(OBJEXT) | |
208 | $(BINPREFIX)mines: drawing.o gtk.o malloc.o midend.o mines.o misc.o \ | 224 | libunequal2_a_OBJECTS = $(am_libunequal2_a_OBJECTS) |
209 | no-icon.o printing.o ps.o random.o tree234.o version.o | 225 | libunruly2_a_AR = $(AR) $(ARFLAGS) |
210 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o mines.o misc.o \ | 226 | libunruly2_a_LIBADD = |
211 | no-icon.o printing.o ps.o random.o tree234.o version.o \ | 227 | am_libunruly2_a_OBJECTS = ./libunruly2_a-unruly.$(OBJEXT) |
212 | $(XLFLAGS) $(XLIBS) | 228 | libunruly2_a_OBJECTS = $(am_libunruly2_a_OBJECTS) |
213 | 229 | am__EXEEXT_1 = blackbox$(EXEEXT) bridges$(EXEEXT) cube$(EXEEXT) \ | |
214 | $(BINPREFIX)net: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \ | 230 | dominosa$(EXEEXT) fifteen$(EXEEXT) filling$(EXEEXT) \ |
215 | net.o no-icon.o printing.o ps.o random.o tree234.o version.o | 231 | flip$(EXEEXT) flood$(EXEEXT) galaxies$(EXEEXT) guess$(EXEEXT) \ |
216 | $(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \ | 232 | inertia$(EXEEXT) keen$(EXEEXT) lightup$(EXEEXT) loopy$(EXEEXT) \ |
217 | misc.o net.o no-icon.o printing.o ps.o random.o tree234.o \ | 233 | magnets$(EXEEXT) map$(EXEEXT) mines$(EXEEXT) net$(EXEEXT) \ |
218 | version.o $(XLFLAGS) $(XLIBS) | 234 | netslide$(EXEEXT) palisade$(EXEEXT) pattern$(EXEEXT) \ |
219 | 235 | pearl$(EXEEXT) pegs$(EXEEXT) range$(EXEEXT) rect$(EXEEXT) \ | |
220 | $(BINPREFIX)netslide: drawing.o gtk.o malloc.o midend.o misc.o netslide.o \ | 236 | samegame$(EXEEXT) signpost$(EXEEXT) singles$(EXEEXT) \ |
221 | no-icon.o printing.o ps.o random.o tree234.o version.o | 237 | sixteen$(EXEEXT) slant$(EXEEXT) solo$(EXEEXT) tents$(EXEEXT) \ |
222 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o netslide.o \ | 238 | towers$(EXEEXT) tracks$(EXEEXT) twiddle$(EXEEXT) \ |
223 | no-icon.o printing.o ps.o random.o tree234.o version.o \ | 239 | undead$(EXEEXT) unequal$(EXEEXT) unruly$(EXEEXT) \ |
224 | $(XLFLAGS) $(XLIBS) | 240 | untangle$(EXEEXT) |
225 | 241 | am__installdirs = "$(DESTDIR)$(bindir)" | |
226 | $(BINPREFIX)nullgame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 242 | PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) |
227 | nullgame.o printing.o ps.o random.o version.o | 243 | am_blackbox_OBJECTS = ./blackbox.$(OBJEXT) ./drawing.$(OBJEXT) \ |
228 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 244 | ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ |
229 | nullgame.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 245 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
230 | $(XLIBS) | 246 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
231 | 247 | blackbox_OBJECTS = $(am_blackbox_OBJECTS) | |
232 | $(BINPREFIX)obfusc: malloc.o misc.o nullfe.o obfusc.o random.o | 248 | am__DEPENDENCIES_1 = |
233 | $(CC) -o $@ malloc.o misc.o nullfe.o obfusc.o random.o $(XLFLAGS) \ | 249 | blackbox_DEPENDENCIES = $(am__DEPENDENCIES_1) |
234 | $(ULIBS) | 250 | am_bridges_OBJECTS = ./bridges.$(OBJEXT) ./drawing.$(OBJEXT) \ |
235 | 251 | ./dsf.$(OBJEXT) ./findloop.$(OBJEXT) ./gtk.$(OBJEXT) \ | |
236 | $(BINPREFIX)palisade: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \ | 252 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
237 | no-icon.o palisade.o printing.o ps.o random.o version.o | 253 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
238 | $(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \ | 254 | ./random.$(OBJEXT) ./version.$(OBJEXT) |
239 | no-icon.o palisade.o printing.o ps.o random.o version.o \ | 255 | bridges_OBJECTS = $(am_bridges_OBJECTS) |
240 | $(XLFLAGS) $(XLIBS) | 256 | bridges_DEPENDENCIES = $(am__DEPENDENCIES_1) |
241 | 257 | am_cube_OBJECTS = ./cube.$(OBJEXT) ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ | |
242 | $(BINPREFIX)pattern: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 258 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
243 | pattern.o printing.o ps.o random.o version.o | 259 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
244 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 260 | ./random.$(OBJEXT) ./version.$(OBJEXT) |
245 | pattern.o printing.o ps.o random.o version.o $(XLFLAGS) \ | 261 | cube_OBJECTS = $(am_cube_OBJECTS) |
246 | $(XLIBS) | 262 | cube_DEPENDENCIES = $(am__DEPENDENCIES_1) |
247 | 263 | am_dominosa_OBJECTS = ./dominosa.$(OBJEXT) ./drawing.$(OBJEXT) \ | |
248 | $(BINPREFIX)patternpicture: malloc.o misc.o nullfe.o pattern4.o random.o | 264 | ./gtk.$(OBJEXT) ./laydomino.$(OBJEXT) ./malloc.$(OBJEXT) \ |
249 | $(CC) -o $@ malloc.o misc.o nullfe.o pattern4.o random.o $(XLFLAGS) \ | 265 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
250 | $(ULIBS) | 266 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
251 | 267 | ./version.$(OBJEXT) | |
252 | $(BINPREFIX)patternsolver: malloc.o misc.o nullfe.o pattern2.o random.o | 268 | dominosa_OBJECTS = $(am_dominosa_OBJECTS) |
253 | $(CC) -o $@ malloc.o misc.o nullfe.o pattern2.o random.o $(XLFLAGS) \ | 269 | dominosa_DEPENDENCIES = $(am__DEPENDENCIES_1) |
254 | $(ULIBS) | 270 | am_fifteen_OBJECTS = ./drawing.$(OBJEXT) ./fifteen.$(OBJEXT) \ |
255 | 271 | ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ | |
256 | $(BINPREFIX)pearl: drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \ | 272 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
257 | misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \ | 273 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
258 | tdq.o tree234.o version.o | 274 | fifteen_OBJECTS = $(am_fifteen_OBJECTS) |
259 | $(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \ | 275 | fifteen_DEPENDENCIES = $(am__DEPENDENCIES_1) |
260 | misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \ | 276 | am_fifteensolver_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
261 | tdq.o tree234.o version.o $(XLFLAGS) $(XLIBS) | 277 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
262 | 278 | fifteensolver_OBJECTS = $(am_fifteensolver_OBJECTS) | |
263 | $(BINPREFIX)pearlbench: dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o \ | 279 | fifteensolver_DEPENDENCIES = libfifteen2_a-fifteen.$(OBJEXT) |
264 | pearl2.o penrose.o random.o tdq.o tree234.o | 280 | am_filling_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
265 | $(CC) -o $@ dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o pearl2.o \ | 281 | ./filling.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
266 | penrose.o random.o tdq.o tree234.o -lm $(XLFLAGS) $(ULIBS) | 282 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
267 | 283 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ | |
268 | $(BINPREFIX)pegs: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o pegs.o \ | 284 | ./version.$(OBJEXT) |
269 | printing.o ps.o random.o tree234.o version.o | 285 | filling_OBJECTS = $(am_filling_OBJECTS) |
270 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 286 | filling_DEPENDENCIES = $(am__DEPENDENCIES_1) |
271 | pegs.o printing.o ps.o random.o tree234.o version.o \ | 287 | am_fillingsolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
272 | $(XLFLAGS) $(XLIBS) | 288 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
273 | 289 | fillingsolver_OBJECTS = $(am_fillingsolver_OBJECTS) | |
274 | $(BINPREFIX)range: drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 290 | fillingsolver_DEPENDENCIES = libfilling2_a-filling.$(OBJEXT) |
275 | printing.o ps.o random.o range.o version.o | 291 | am_flip_OBJECTS = ./drawing.$(OBJEXT) ./flip.$(OBJEXT) ./gtk.$(OBJEXT) \ |
276 | $(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 292 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
277 | printing.o ps.o random.o range.o version.o $(XLFLAGS) \ | 293 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
278 | $(XLIBS) | 294 | ./random.$(OBJEXT) ./tree234.$(OBJEXT) ./version.$(OBJEXT) |
279 | 295 | flip_OBJECTS = $(am_flip_OBJECTS) | |
280 | $(BINPREFIX)rect: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 296 | flip_DEPENDENCIES = $(am__DEPENDENCIES_1) |
281 | printing.o ps.o random.o rect.o version.o | 297 | am_flood_OBJECTS = ./drawing.$(OBJEXT) ./flood.$(OBJEXT) \ |
282 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 298 | ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ |
283 | printing.o ps.o random.o rect.o version.o $(XLFLAGS) \ | 299 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
284 | $(XLIBS) | 300 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
285 | 301 | flood_OBJECTS = $(am_flood_OBJECTS) | |
286 | $(BINPREFIX)samegame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 302 | flood_DEPENDENCIES = $(am__DEPENDENCIES_1) |
287 | printing.o ps.o random.o samegame.o version.o | 303 | am_galaxies_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
288 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 304 | ./galaxies.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
289 | printing.o ps.o random.o samegame.o version.o $(XLFLAGS) \ | 305 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
290 | $(XLIBS) | 306 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
291 | 307 | ./version.$(OBJEXT) | |
292 | $(BINPREFIX)signpost: drawing.o dsf.o gtk.o malloc.o midend.o misc.o \ | 308 | galaxies_OBJECTS = $(am_galaxies_OBJECTS) |
293 | no-icon.o printing.o ps.o random.o signpost.o version.o | 309 | galaxies_DEPENDENCIES = $(am__DEPENDENCIES_1) |
294 | $(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 310 | am_galaxiespicture_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
295 | printing.o ps.o random.o signpost.o version.o $(XLFLAGS) \ | 311 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
296 | $(XLIBS) | 312 | galaxiespicture_OBJECTS = $(am_galaxiespicture_OBJECTS) |
297 | 313 | galaxiespicture_DEPENDENCIES = libgalaxie4_a-galaxies.$(OBJEXT) | |
298 | $(BINPREFIX)signpostsolver: dsf.o malloc.o misc.o nullfe.o random.o \ | 314 | am_galaxiessolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
299 | signpos2.o | 315 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
300 | $(CC) -o $@ dsf.o malloc.o misc.o nullfe.o random.o signpos2.o -lm \ | 316 | galaxiessolver_OBJECTS = $(am_galaxiessolver_OBJECTS) |
301 | $(XLFLAGS) $(ULIBS) | 317 | galaxiessolver_DEPENDENCIES = libgalaxie2_a-galaxies.$(OBJEXT) |
302 | 318 | am_guess_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ | |
303 | $(BINPREFIX)singles: drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \ | 319 | ./guess.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ |
304 | midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \ | 320 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
305 | tree234.o version.o | 321 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
306 | $(CC) -o $@ drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \ | 322 | guess_OBJECTS = $(am_guess_OBJECTS) |
307 | midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \ | 323 | guess_DEPENDENCIES = $(am__DEPENDENCIES_1) |
308 | tree234.o version.o $(XLFLAGS) $(XLIBS) | 324 | am_inertia_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
309 | 325 | ./inertia.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ | |
310 | $(BINPREFIX)singlessolver: dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \ | 326 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
311 | random.o singles3.o tree234.o | 327 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
312 | $(CC) -o $@ dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \ | 328 | inertia_OBJECTS = $(am_inertia_OBJECTS) |
313 | random.o singles3.o tree234.o $(XLFLAGS) $(ULIBS) | 329 | inertia_DEPENDENCIES = $(am__DEPENDENCIES_1) |
314 | 330 | am_keen_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) \ | |
315 | $(BINPREFIX)sixteen: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 331 | ./keen.$(OBJEXT) ./latin.$(OBJEXT) ./malloc.$(OBJEXT) \ |
316 | printing.o ps.o random.o sixteen.o version.o | 332 | ./maxflow.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
317 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 333 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
318 | printing.o ps.o random.o sixteen.o version.o $(XLFLAGS) \ | 334 | ./random.$(OBJEXT) ./tree234.$(OBJEXT) ./version.$(OBJEXT) |
319 | $(XLIBS) | 335 | keen_OBJECTS = $(am_keen_OBJECTS) |
320 | 336 | keen_DEPENDENCIES = $(am__DEPENDENCIES_1) | |
321 | $(BINPREFIX)slant: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \ | 337 | am_keensolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
322 | no-icon.o printing.o ps.o random.o slant.o version.o | 338 | ./maxflow.$(OBJEXT) ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) \ |
323 | $(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \ | 339 | ./random.$(OBJEXT) ./tree234.$(OBJEXT) |
324 | misc.o no-icon.o printing.o ps.o random.o slant.o version.o \ | 340 | keensolver_OBJECTS = $(am_keensolver_OBJECTS) |
325 | $(XLFLAGS) $(XLIBS) | 341 | keensolver_DEPENDENCIES = libkeen2_a-keen.$(OBJEXT) \ |
326 | 342 | liblatin6_a-latin.$(OBJEXT) | |
327 | $(BINPREFIX)slantsolver: dsf.o findloop.o malloc.o misc.o nullfe.o random.o \ | 343 | am_latincheck_OBJECTS = ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) \ |
328 | slant2.o | 344 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) \ |
329 | $(CC) -o $@ dsf.o findloop.o malloc.o misc.o nullfe.o random.o \ | 345 | ./tree234.$(OBJEXT) |
330 | slant2.o $(XLFLAGS) $(ULIBS) | 346 | latincheck_OBJECTS = $(am_latincheck_OBJECTS) |
331 | 347 | latincheck_DEPENDENCIES = liblatin8_a-latin.$(OBJEXT) | |
332 | $(BINPREFIX)solo: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \ | 348 | am_lightup_OBJECTS = ./combi.$(OBJEXT) ./drawing.$(OBJEXT) \ |
333 | no-icon.o printing.o ps.o random.o solo.o version.o | 349 | ./gtk.$(OBJEXT) ./lightup.$(OBJEXT) ./malloc.$(OBJEXT) \ |
334 | $(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \ | 350 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
335 | no-icon.o printing.o ps.o random.o solo.o version.o \ | 351 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
336 | $(XLFLAGS) $(XLIBS) | 352 | ./version.$(OBJEXT) |
337 | 353 | lightup_OBJECTS = $(am_lightup_OBJECTS) | |
338 | $(BINPREFIX)solosolver: divvy.o dsf.o malloc.o misc.o nullfe.o random.o \ | 354 | lightup_DEPENDENCIES = $(am__DEPENDENCIES_1) |
339 | solo2.o | 355 | am_lightupsolver_OBJECTS = ./combi.$(OBJEXT) ./malloc.$(OBJEXT) \ |
340 | $(CC) -o $@ divvy.o dsf.o malloc.o misc.o nullfe.o random.o solo2.o \ | 356 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
341 | $(XLFLAGS) $(ULIBS) | 357 | lightupsolver_OBJECTS = $(am_lightupsolver_OBJECTS) |
342 | 358 | lightupsolver_DEPENDENCIES = liblightup2_a-lightup.$(OBJEXT) | |
343 | $(BINPREFIX)tents: drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \ | 359 | am_loopy_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
344 | no-icon.o printing.o ps.o random.o tents.o version.o | 360 | ./grid.$(OBJEXT) ./gtk.$(OBJEXT) ./loopgen.$(OBJEXT) \ |
345 | $(CC) -o $@ drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \ | 361 | ./loopy.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ |
346 | no-icon.o printing.o ps.o random.o tents.o version.o \ | 362 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./penrose.$(OBJEXT) \ |
347 | $(XLFLAGS) $(XLIBS) | 363 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
348 | 364 | ./tree234.$(OBJEXT) ./version.$(OBJEXT) | |
349 | $(BINPREFIX)tentssolver: dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 365 | loopy_OBJECTS = $(am_loopy_OBJECTS) |
350 | tents3.o | 366 | loopy_DEPENDENCIES = $(am__DEPENDENCIES_1) |
351 | $(CC) -o $@ dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 367 | am_loopysolver_OBJECTS = ./dsf.$(OBJEXT) ./grid.$(OBJEXT) \ |
352 | tents3.o $(XLFLAGS) $(ULIBS) | 368 | ./loopgen.$(OBJEXT) ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
353 | 369 | ./nullfe.$(OBJEXT) ./penrose.$(OBJEXT) ./random.$(OBJEXT) \ | |
354 | $(BINPREFIX)towers: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \ | 370 | ./tree234.$(OBJEXT) |
355 | misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \ | 371 | loopysolver_OBJECTS = $(am_loopysolver_OBJECTS) |
356 | version.o | 372 | loopysolver_DEPENDENCIES = libloopy2_a-loopy.$(OBJEXT) |
357 | $(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \ | 373 | am_magnets_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
358 | misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \ | 374 | ./laydomino.$(OBJEXT) ./magnets.$(OBJEXT) ./malloc.$(OBJEXT) \ |
359 | version.o $(XLFLAGS) $(XLIBS) | 375 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
360 | 376 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ | |
361 | $(BINPREFIX)towerssolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \ | 377 | ./version.$(OBJEXT) |
362 | random.o towers2.o tree234.o | 378 | magnets_OBJECTS = $(am_magnets_OBJECTS) |
363 | $(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 379 | magnets_DEPENDENCIES = $(am__DEPENDENCIES_1) |
364 | towers2.o tree234.o $(XLFLAGS) $(ULIBS) | 380 | am_magnetssolver_OBJECTS = ./laydomino.$(OBJEXT) ./malloc.$(OBJEXT) \ |
365 | 381 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) | |
366 | $(BINPREFIX)tracks: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \ | 382 | magnetssolver_OBJECTS = $(am_magnetssolver_OBJECTS) |
367 | misc.o no-icon.o printing.o ps.o random.o tracks.o version.o | 383 | magnetssolver_DEPENDENCIES = libmagnets2_a-magnets.$(OBJEXT) |
368 | $(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \ | 384 | am_map_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) \ |
369 | misc.o no-icon.o printing.o ps.o random.o tracks.o version.o \ | 385 | ./malloc.$(OBJEXT) ./map.$(OBJEXT) ./midend.$(OBJEXT) \ |
370 | $(XLFLAGS) $(XLIBS) | 386 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
371 | 387 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) | |
372 | $(BINPREFIX)twiddle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 388 | map_OBJECTS = $(am_map_OBJECTS) |
373 | printing.o ps.o random.o twiddle.o version.o | 389 | map_DEPENDENCIES = $(am__DEPENDENCIES_1) |
374 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 390 | am_mapsolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
375 | printing.o ps.o random.o twiddle.o version.o $(XLFLAGS) \ | 391 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
376 | $(XLIBS) | 392 | mapsolver_OBJECTS = $(am_mapsolver_OBJECTS) |
377 | 393 | mapsolver_DEPENDENCIES = libmap2_a-map.$(OBJEXT) | |
378 | $(BINPREFIX)undead: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 394 | am_mineobfusc_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
379 | printing.o ps.o random.o undead.o version.o | 395 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) ./tree234.$(OBJEXT) |
380 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 396 | mineobfusc_OBJECTS = $(am_mineobfusc_OBJECTS) |
381 | printing.o ps.o random.o undead.o version.o $(XLFLAGS) \ | 397 | mineobfusc_DEPENDENCIES = libmines2_a-mines.$(OBJEXT) |
382 | $(XLIBS) | 398 | am_mines_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
383 | 399 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./mines.$(OBJEXT) \ | |
384 | $(BINPREFIX)unequal: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \ | 400 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
385 | misc.o no-icon.o printing.o ps.o random.o tree234.o \ | 401 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./tree234.$(OBJEXT) \ |
386 | unequal.o version.o | 402 | ./version.$(OBJEXT) |
387 | $(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \ | 403 | mines_OBJECTS = $(am_mines_OBJECTS) |
388 | misc.o no-icon.o printing.o ps.o random.o tree234.o \ | 404 | mines_DEPENDENCIES = $(am__DEPENDENCIES_1) |
389 | unequal.o version.o $(XLFLAGS) $(XLIBS) | 405 | am_net_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
390 | 406 | ./findloop.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ | |
391 | $(BINPREFIX)unequalsolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \ | 407 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./net.$(OBJEXT) \ |
392 | random.o tree234.o unequal2.o | 408 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
393 | $(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \ | 409 | ./random.$(OBJEXT) ./tree234.$(OBJEXT) ./version.$(OBJEXT) |
394 | tree234.o unequal2.o $(XLFLAGS) $(ULIBS) | 410 | net_OBJECTS = $(am_net_OBJECTS) |
395 | 411 | net_DEPENDENCIES = $(am__DEPENDENCIES_1) | |
396 | $(BINPREFIX)unruly: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 412 | am_netslide_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
397 | printing.o ps.o random.o unruly.o version.o | 413 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
398 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 414 | ./netslide.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
399 | printing.o ps.o random.o unruly.o version.o $(XLFLAGS) \ | 415 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./tree234.$(OBJEXT) \ |
400 | $(XLIBS) | 416 | ./version.$(OBJEXT) |
401 | 417 | netslide_OBJECTS = $(am_netslide_OBJECTS) | |
402 | $(BINPREFIX)unrulysolver: malloc.o misc.o nullfe.o random.o unruly2.o | 418 | netslide_DEPENDENCIES = $(am__DEPENDENCIES_1) |
403 | $(CC) -o $@ malloc.o misc.o nullfe.o random.o unruly2.o $(XLFLAGS) \ | 419 | am_nullgame_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
404 | $(ULIBS) | 420 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
405 | 421 | ./no-icon.$(OBJEXT) ./nullgame.$(OBJEXT) ./printing.$(OBJEXT) \ | |
406 | $(BINPREFIX)untangle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 422 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
407 | printing.o ps.o random.o tree234.o untangle.o version.o | 423 | nullgame_OBJECTS = $(am_nullgame_OBJECTS) |
408 | $(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \ | 424 | nullgame_DEPENDENCIES = $(am__DEPENDENCIES_1) |
409 | printing.o ps.o random.o tree234.o untangle.o version.o \ | 425 | am_obfusc_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
410 | $(XLFLAGS) $(XLIBS) | 426 | ./nullfe.$(OBJEXT) ./obfusc.$(OBJEXT) ./random.$(OBJEXT) |
411 | 427 | obfusc_OBJECTS = $(am_obfusc_OBJECTS) | |
412 | blackbox.o: ./blackbox.c ./puzzles.h | 428 | obfusc_DEPENDENCIES = |
413 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 429 | am_palisade_OBJECTS = ./divvy.$(OBJEXT) ./drawing.$(OBJEXT) \ |
414 | blackbo3.o: ./blackbox.c ./puzzles.h | 430 | ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
415 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 431 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
416 | bridges.o: ./bridges.c ./puzzles.h | 432 | ./palisade.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
417 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 433 | ./random.$(OBJEXT) ./version.$(OBJEXT) |
418 | bridges3.o: ./bridges.c ./puzzles.h | 434 | palisade_OBJECTS = $(am_palisade_OBJECTS) |
419 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 435 | palisade_DEPENDENCIES = $(am__DEPENDENCIES_1) |
420 | combi.o: ./combi.c ./puzzles.h | 436 | am_pattern_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
421 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 437 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
422 | cube.o: ./cube.c ./puzzles.h | 438 | ./no-icon.$(OBJEXT) ./pattern.$(OBJEXT) ./printing.$(OBJEXT) \ |
423 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 439 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./version.$(OBJEXT) |
424 | cube3.o: ./cube.c ./puzzles.h | 440 | pattern_OBJECTS = $(am_pattern_OBJECTS) |
425 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 441 | pattern_DEPENDENCIES = $(am__DEPENDENCIES_1) |
426 | divvy.o: ./divvy.c ./puzzles.h | 442 | am_patternpicture_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
427 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 443 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
428 | dominosa.o: ./dominosa.c ./puzzles.h | 444 | patternpicture_OBJECTS = $(am_patternpicture_OBJECTS) |
429 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 445 | patternpicture_DEPENDENCIES = libpattern4_a-pattern.$(OBJEXT) |
430 | dominos3.o: ./dominosa.c ./puzzles.h | 446 | am_patternsolver_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
431 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 447 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
432 | drawing.o: ./drawing.c ./puzzles.h | 448 | patternsolver_OBJECTS = $(am_patternsolver_OBJECTS) |
433 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 449 | patternsolver_DEPENDENCIES = libpattern2_a-pattern.$(OBJEXT) |
434 | dsf.o: ./dsf.c ./puzzles.h | 450 | am_pearl_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
435 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 451 | ./grid.$(OBJEXT) ./gtk.$(OBJEXT) ./loopgen.$(OBJEXT) \ |
436 | fifteen.o: ./fifteen.c ./puzzles.h | 452 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
437 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 453 | ./no-icon.$(OBJEXT) ./pearl.$(OBJEXT) ./penrose.$(OBJEXT) \ |
438 | fifteen5.o: ./fifteen.c ./puzzles.h | 454 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
439 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 455 | ./tdq.$(OBJEXT) ./tree234.$(OBJEXT) ./version.$(OBJEXT) |
440 | fifteen2.o: ./fifteen.c ./puzzles.h | 456 | pearl_OBJECTS = $(am_pearl_OBJECTS) |
441 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 457 | pearl_DEPENDENCIES = $(am__DEPENDENCIES_1) |
442 | filling.o: ./filling.c ./puzzles.h | 458 | am_pearlbench_OBJECTS = ./dsf.$(OBJEXT) ./grid.$(OBJEXT) \ |
443 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 459 | ./loopgen.$(OBJEXT) ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
444 | filling5.o: ./filling.c ./puzzles.h | 460 | ./nullfe.$(OBJEXT) ./penrose.$(OBJEXT) ./random.$(OBJEXT) \ |
445 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 461 | ./tdq.$(OBJEXT) ./tree234.$(OBJEXT) |
446 | filling2.o: ./filling.c ./puzzles.h | 462 | pearlbench_OBJECTS = $(am_pearlbench_OBJECTS) |
447 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 463 | pearlbench_DEPENDENCIES = libpearl2_a-pearl.$(OBJEXT) |
448 | findloop.o: ./findloop.c ./puzzles.h | 464 | am_pegs_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
449 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 465 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
450 | flip.o: ./flip.c ./puzzles.h ./tree234.h | 466 | ./no-icon.$(OBJEXT) ./pegs.$(OBJEXT) ./printing.$(OBJEXT) \ |
451 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 467 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./tree234.$(OBJEXT) \ |
452 | flip3.o: ./flip.c ./puzzles.h ./tree234.h | 468 | ./version.$(OBJEXT) |
453 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 469 | pegs_OBJECTS = $(am_pegs_OBJECTS) |
454 | flood.o: ./flood.c ./puzzles.h | 470 | pegs_DEPENDENCIES = $(am__DEPENDENCIES_1) |
455 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 471 | am_range_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) \ |
456 | flood3.o: ./flood.c ./puzzles.h | 472 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
457 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 473 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
458 | galaxies.o: ./galaxies.c ./puzzles.h | 474 | ./random.$(OBJEXT) ./range.$(OBJEXT) ./version.$(OBJEXT) |
459 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 475 | range_OBJECTS = $(am_range_OBJECTS) |
460 | galaxie7.o: ./galaxies.c ./puzzles.h | 476 | range_DEPENDENCIES = $(am__DEPENDENCIES_1) |
461 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 477 | am_rect_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
462 | galaxie4.o: ./galaxies.c ./puzzles.h | 478 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
463 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@ | 479 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
464 | galaxie2.o: ./galaxies.c ./puzzles.h | 480 | ./random.$(OBJEXT) ./rect.$(OBJEXT) ./version.$(OBJEXT) |
465 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 481 | rect_OBJECTS = $(am_rect_OBJECTS) |
466 | grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h | 482 | rect_DEPENDENCIES = $(am__DEPENDENCIES_1) |
467 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 483 | am_samegame_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
468 | gtk.o: ./gtk.c ./puzzles.h | 484 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
469 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 485 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
470 | guess.o: ./guess.c ./puzzles.h | 486 | ./random.$(OBJEXT) ./samegame.$(OBJEXT) ./version.$(OBJEXT) |
471 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 487 | samegame_OBJECTS = $(am_samegame_OBJECTS) |
472 | guess3.o: ./guess.c ./puzzles.h | 488 | samegame_DEPENDENCIES = $(am__DEPENDENCIES_1) |
473 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 489 | am_signpost_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
474 | inertia.o: ./inertia.c ./puzzles.h | 490 | ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) ./midend.$(OBJEXT) \ |
475 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 491 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
476 | inertia3.o: ./inertia.c ./puzzles.h | 492 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./signpost.$(OBJEXT) \ |
477 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 493 | ./version.$(OBJEXT) |
478 | keen.o: ./keen.c ./puzzles.h ./latin.h | 494 | signpost_OBJECTS = $(am_signpost_OBJECTS) |
479 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 495 | signpost_DEPENDENCIES = $(am__DEPENDENCIES_1) |
480 | keen5.o: ./keen.c ./puzzles.h ./latin.h | 496 | am_signpostsolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
481 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 497 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
482 | keen2.o: ./keen.c ./puzzles.h ./latin.h | 498 | signpostsolver_OBJECTS = $(am_signpostsolver_OBJECTS) |
483 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 499 | signpostsolver_DEPENDENCIES = libsignpos2_a-signpost.$(OBJEXT) |
484 | latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h | 500 | am_singles_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
485 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 501 | ./gtk.$(OBJEXT) ./latin.$(OBJEXT) ./malloc.$(OBJEXT) \ |
486 | latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h | 502 | ./maxflow.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
487 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@ | 503 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
488 | latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h | 504 | ./random.$(OBJEXT) ./singles.$(OBJEXT) ./tree234.$(OBJEXT) \ |
489 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 505 | ./version.$(OBJEXT) |
490 | laydomino.o: ./laydomino.c ./puzzles.h | 506 | singles_OBJECTS = $(am_singles_OBJECTS) |
491 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 507 | singles_DEPENDENCIES = $(am__DEPENDENCIES_1) |
492 | lightup.o: ./lightup.c ./puzzles.h | 508 | am_singlessolver_OBJECTS = ./dsf.$(OBJEXT) ./latin.$(OBJEXT) \ |
493 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 509 | ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) ./misc.$(OBJEXT) \ |
494 | lightup5.o: ./lightup.c ./puzzles.h | 510 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) ./tree234.$(OBJEXT) |
495 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 511 | singlessolver_OBJECTS = $(am_singlessolver_OBJECTS) |
496 | lightup2.o: ./lightup.c ./puzzles.h | 512 | singlessolver_DEPENDENCIES = libsingles3_a-singles.$(OBJEXT) |
497 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 513 | am_sixteen_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
498 | list.o: ./list.c ./puzzles.h | 514 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
499 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 515 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
500 | loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h | 516 | ./random.$(OBJEXT) ./sixteen.$(OBJEXT) ./version.$(OBJEXT) |
501 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 517 | sixteen_OBJECTS = $(am_sixteen_OBJECTS) |
502 | loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h | 518 | sixteen_DEPENDENCIES = $(am__DEPENDENCIES_1) |
503 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 519 | am_slant_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
504 | loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h | 520 | ./findloop.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
505 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 521 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
506 | loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h | 522 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
507 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 523 | ./slant.$(OBJEXT) ./version.$(OBJEXT) |
508 | magnets.o: ./magnets.c ./puzzles.h | 524 | slant_OBJECTS = $(am_slant_OBJECTS) |
509 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 525 | slant_DEPENDENCIES = $(am__DEPENDENCIES_1) |
510 | magnets5.o: ./magnets.c ./puzzles.h | 526 | am_slantsolver_OBJECTS = ./dsf.$(OBJEXT) ./findloop.$(OBJEXT) \ |
511 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 527 | ./malloc.$(OBJEXT) ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) \ |
512 | magnets2.o: ./magnets.c ./puzzles.h | 528 | ./random.$(OBJEXT) |
513 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 529 | slantsolver_OBJECTS = $(am_slantsolver_OBJECTS) |
514 | malloc.o: ./malloc.c ./puzzles.h | 530 | slantsolver_DEPENDENCIES = libslant2_a-slant.$(OBJEXT) |
515 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 531 | am_solo_OBJECTS = ./divvy.$(OBJEXT) ./drawing.$(OBJEXT) \ |
516 | map.o: ./map.c ./puzzles.h | 532 | ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
517 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 533 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
518 | map5.o: ./map.c ./puzzles.h | 534 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
519 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 535 | ./solo.$(OBJEXT) ./version.$(OBJEXT) |
520 | map2.o: ./map.c ./puzzles.h | 536 | solo_OBJECTS = $(am_solo_OBJECTS) |
521 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 537 | solo_DEPENDENCIES = $(am__DEPENDENCIES_1) |
522 | maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h | 538 | am_solosolver_OBJECTS = ./divvy.$(OBJEXT) ./dsf.$(OBJEXT) \ |
523 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 539 | ./malloc.$(OBJEXT) ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) \ |
524 | midend.o: ./midend.c ./puzzles.h | 540 | ./random.$(OBJEXT) |
525 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 541 | solosolver_OBJECTS = $(am_solosolver_OBJECTS) |
526 | mines.o: ./mines.c ./tree234.h ./puzzles.h | 542 | solosolver_DEPENDENCIES = libsolo2_a-solo.$(OBJEXT) |
527 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 543 | am_tents_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) ./gtk.$(OBJEXT) \ |
528 | mines5.o: ./mines.c ./tree234.h ./puzzles.h | 544 | ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) ./midend.$(OBJEXT) \ |
529 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 545 | ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) \ |
530 | mines2.o: ./mines.c ./tree234.h ./puzzles.h | 546 | ./ps.$(OBJEXT) ./random.$(OBJEXT) ./tents.$(OBJEXT) \ |
531 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@ | 547 | ./version.$(OBJEXT) |
532 | misc.o: ./misc.c ./puzzles.h | 548 | tents_OBJECTS = $(am_tents_OBJECTS) |
533 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 549 | tents_DEPENDENCIES = $(am__DEPENDENCIES_1) |
534 | net.o: ./net.c ./puzzles.h ./tree234.h | 550 | am_tentssolver_OBJECTS = ./dsf.$(OBJEXT) ./malloc.$(OBJEXT) \ |
535 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 551 | ./maxflow.$(OBJEXT) ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) \ |
536 | net3.o: ./net.c ./puzzles.h ./tree234.h | 552 | ./random.$(OBJEXT) |
537 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 553 | tentssolver_OBJECTS = $(am_tentssolver_OBJECTS) |
538 | netslide.o: ./netslide.c ./puzzles.h ./tree234.h | 554 | tentssolver_DEPENDENCIES = libtents3_a-tents.$(OBJEXT) |
539 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 555 | am_towers_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
540 | netslid3.o: ./netslide.c ./puzzles.h ./tree234.h | 556 | ./latin.$(OBJEXT) ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) \ |
541 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 557 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
542 | no-icon.o: ./no-icon.c | 558 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
543 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 559 | ./towers.$(OBJEXT) ./tree234.$(OBJEXT) ./version.$(OBJEXT) |
544 | nullfe.o: ./nullfe.c ./puzzles.h | 560 | towers_OBJECTS = $(am_towers_OBJECTS) |
545 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 561 | towers_DEPENDENCIES = $(am__DEPENDENCIES_1) |
546 | nullgame.o: ./nullgame.c ./puzzles.h | 562 | am_towerssolver_OBJECTS = ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) \ |
547 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 563 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) \ |
548 | obfusc.o: ./obfusc.c ./puzzles.h | 564 | ./tree234.$(OBJEXT) |
549 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 565 | towerssolver_OBJECTS = $(am_towerssolver_OBJECTS) |
550 | osx.o: ./osx.m ./puzzles.h | 566 | towerssolver_DEPENDENCIES = liblatin6_a-latin.$(OBJEXT) \ |
551 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 567 | libtowers2_a-towers.$(OBJEXT) |
552 | palisade.o: ./palisade.c ./puzzles.h | 568 | am_tracks_OBJECTS = ./drawing.$(OBJEXT) ./dsf.$(OBJEXT) \ |
553 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 569 | ./findloop.$(OBJEXT) ./gtk.$(OBJEXT) ./malloc.$(OBJEXT) \ |
554 | palisad3.o: ./palisade.c ./puzzles.h | 570 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
555 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 571 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
556 | pattern.o: ./pattern.c ./puzzles.h | 572 | ./tracks.$(OBJEXT) ./version.$(OBJEXT) |
557 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 573 | tracks_OBJECTS = $(am_tracks_OBJECTS) |
558 | pattern7.o: ./pattern.c ./puzzles.h | 574 | tracks_DEPENDENCIES = $(am__DEPENDENCIES_1) |
559 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 575 | am_twiddle_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
560 | pattern4.o: ./pattern.c ./puzzles.h | 576 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
561 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@ | 577 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
562 | pattern2.o: ./pattern.c ./puzzles.h | 578 | ./random.$(OBJEXT) ./twiddle.$(OBJEXT) ./version.$(OBJEXT) |
563 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 579 | twiddle_OBJECTS = $(am_twiddle_OBJECTS) |
564 | pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h | 580 | twiddle_DEPENDENCIES = $(am__DEPENDENCIES_1) |
565 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 581 | am_undead_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
566 | pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h | 582 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
567 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 583 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
568 | pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h | 584 | ./random.$(OBJEXT) ./undead.$(OBJEXT) ./version.$(OBJEXT) |
569 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 585 | undead_OBJECTS = $(am_undead_OBJECTS) |
570 | pegs.o: ./pegs.c ./puzzles.h ./tree234.h | 586 | undead_DEPENDENCIES = $(am__DEPENDENCIES_1) |
571 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 587 | am_unequal_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
572 | pegs3.o: ./pegs.c ./puzzles.h ./tree234.h | 588 | ./latin.$(OBJEXT) ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) \ |
573 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 589 | ./midend.$(OBJEXT) ./misc.$(OBJEXT) ./no-icon.$(OBJEXT) \ |
574 | penrose.o: ./penrose.c ./puzzles.h ./penrose.h | 590 | ./printing.$(OBJEXT) ./ps.$(OBJEXT) ./random.$(OBJEXT) \ |
575 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 591 | ./tree234.$(OBJEXT) ./unequal.$(OBJEXT) ./version.$(OBJEXT) |
576 | printing.o: ./printing.c ./puzzles.h | 592 | unequal_OBJECTS = $(am_unequal_OBJECTS) |
577 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 593 | unequal_DEPENDENCIES = $(am__DEPENDENCIES_1) |
578 | ps.o: ./ps.c ./puzzles.h | 594 | am_unequalsolver_OBJECTS = ./malloc.$(OBJEXT) ./maxflow.$(OBJEXT) \ |
579 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 595 | ./misc.$(OBJEXT) ./nullfe.$(OBJEXT) ./random.$(OBJEXT) \ |
580 | random.o: ./random.c ./puzzles.h | 596 | ./tree234.$(OBJEXT) |
581 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 597 | unequalsolver_OBJECTS = $(am_unequalsolver_OBJECTS) |
582 | range.o: ./range.c ./puzzles.h | 598 | unequalsolver_DEPENDENCIES = liblatin6_a-latin.$(OBJEXT) \ |
583 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 599 | libunequal2_a-unequal.$(OBJEXT) |
584 | range3.o: ./range.c ./puzzles.h | 600 | am_unruly_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
585 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 601 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
586 | rect.o: ./rect.c ./puzzles.h | 602 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
587 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 603 | ./random.$(OBJEXT) ./unruly.$(OBJEXT) ./version.$(OBJEXT) |
588 | rect3.o: ./rect.c ./puzzles.h | 604 | unruly_OBJECTS = $(am_unruly_OBJECTS) |
589 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 605 | unruly_DEPENDENCIES = $(am__DEPENDENCIES_1) |
590 | samegame.o: ./samegame.c ./puzzles.h | 606 | am_unrulysolver_OBJECTS = ./malloc.$(OBJEXT) ./misc.$(OBJEXT) \ |
591 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 607 | ./nullfe.$(OBJEXT) ./random.$(OBJEXT) |
592 | samegam3.o: ./samegame.c ./puzzles.h | 608 | unrulysolver_OBJECTS = $(am_unrulysolver_OBJECTS) |
593 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 609 | unrulysolver_DEPENDENCIES = libunruly2_a-unruly.$(OBJEXT) |
594 | signpost.o: ./signpost.c ./puzzles.h | 610 | am_untangle_OBJECTS = ./drawing.$(OBJEXT) ./gtk.$(OBJEXT) \ |
595 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 611 | ./malloc.$(OBJEXT) ./midend.$(OBJEXT) ./misc.$(OBJEXT) \ |
596 | signpos5.o: ./signpost.c ./puzzles.h | 612 | ./no-icon.$(OBJEXT) ./printing.$(OBJEXT) ./ps.$(OBJEXT) \ |
597 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 613 | ./random.$(OBJEXT) ./tree234.$(OBJEXT) ./untangle.$(OBJEXT) \ |
598 | signpos2.o: ./signpost.c ./puzzles.h | 614 | ./version.$(OBJEXT) |
599 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 615 | untangle_OBJECTS = $(am_untangle_OBJECTS) |
600 | singles.o: ./singles.c ./puzzles.h ./latin.h | 616 | untangle_DEPENDENCIES = $(am__DEPENDENCIES_1) |
601 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 617 | AM_V_P = $(am__v_P_$(V)) |
602 | singles5.o: ./singles.c ./puzzles.h ./latin.h | 618 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) |
603 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 619 | am__v_P_0 = false |
604 | singles3.o: ./singles.c ./puzzles.h ./latin.h | 620 | am__v_P_1 = : |
605 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 621 | AM_V_GEN = $(am__v_GEN_$(V)) |
606 | sixteen.o: ./sixteen.c ./puzzles.h | 622 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) |
607 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 623 | am__v_GEN_0 = @echo " GEN " $@; |
608 | sixteen3.o: ./sixteen.c ./puzzles.h | 624 | am__v_GEN_1 = |
609 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 625 | AM_V_at = $(am__v_at_$(V)) |
610 | slant.o: ./slant.c ./puzzles.h | 626 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) |
611 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 627 | am__v_at_0 = @ |
612 | slant5.o: ./slant.c ./puzzles.h | 628 | am__v_at_1 = |
613 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 629 | DEFAULT_INCLUDES = -I. |
614 | slant2.o: ./slant.c ./puzzles.h | 630 | depcomp = $(SHELL) $(top_srcdir)/depcomp |
615 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 631 | am__depfiles_maybe = depfiles |
616 | solo.o: ./solo.c ./puzzles.h | 632 | am__mv = mv -f |
617 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 633 | AM_V_lt = $(am__v_lt_$(V)) |
618 | solo5.o: ./solo.c ./puzzles.h | 634 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) |
619 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 635 | am__v_lt_0 = --silent |
620 | solo2.o: ./solo.c ./puzzles.h | 636 | am__v_lt_1 = |
621 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 637 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
622 | tdq.o: ./tdq.c ./puzzles.h | 638 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
623 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 639 | AM_V_CC = $(am__v_CC_$(V)) |
624 | tents.o: ./tents.c ./puzzles.h ./maxflow.h | 640 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) |
625 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 641 | am__v_CC_0 = @echo " CC " $@; |
626 | tents5.o: ./tents.c ./puzzles.h ./maxflow.h | 642 | am__v_CC_1 = |
627 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 643 | CCLD = $(CC) |
628 | tents3.o: ./tents.c ./puzzles.h ./maxflow.h | 644 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ |
629 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 645 | AM_V_CCLD = $(am__v_CCLD_$(V)) |
630 | towers.o: ./towers.c ./puzzles.h ./latin.h | 646 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) |
631 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 647 | am__v_CCLD_0 = @echo " CCLD " $@; |
632 | towers5.o: ./towers.c ./puzzles.h ./latin.h | 648 | am__v_CCLD_1 = |
633 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 649 | SOURCES = $(libfifteen2_a_SOURCES) $(libfilling2_a_SOURCES) \ |
634 | towers2.o: ./towers.c ./puzzles.h ./latin.h | 650 | $(libgalaxie2_a_SOURCES) $(libgalaxie4_a_SOURCES) \ |
635 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 651 | $(libkeen2_a_SOURCES) $(liblatin6_a_SOURCES) \ |
636 | tracks.o: ./tracks.c ./puzzles.h | 652 | $(liblatin8_a_SOURCES) $(liblightup2_a_SOURCES) \ |
637 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 653 | $(libloopy2_a_SOURCES) $(libmagnets2_a_SOURCES) \ |
638 | tracks3.o: ./tracks.c ./puzzles.h | 654 | $(libmap2_a_SOURCES) $(libmines2_a_SOURCES) \ |
639 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 655 | $(libpattern2_a_SOURCES) $(libpattern4_a_SOURCES) \ |
640 | tree234.o: ./tree234.c ./tree234.h ./puzzles.h | 656 | $(libpearl2_a_SOURCES) $(libsignpos2_a_SOURCES) \ |
641 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 657 | $(libsingles3_a_SOURCES) $(libslant2_a_SOURCES) \ |
642 | twiddle.o: ./twiddle.c ./puzzles.h | 658 | $(libsolo2_a_SOURCES) $(libtents3_a_SOURCES) \ |
643 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 659 | $(libtowers2_a_SOURCES) $(libunequal2_a_SOURCES) \ |
644 | twiddle3.o: ./twiddle.c ./puzzles.h | 660 | $(libunruly2_a_SOURCES) $(blackbox_SOURCES) $(bridges_SOURCES) \ |
645 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 661 | $(cube_SOURCES) $(dominosa_SOURCES) $(fifteen_SOURCES) \ |
646 | undead.o: ./undead.c ./puzzles.h | 662 | $(fifteensolver_SOURCES) $(filling_SOURCES) \ |
647 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 663 | $(fillingsolver_SOURCES) $(flip_SOURCES) $(flood_SOURCES) \ |
648 | undead3.o: ./undead.c ./puzzles.h | 664 | $(galaxies_SOURCES) $(galaxiespicture_SOURCES) \ |
649 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 665 | $(galaxiessolver_SOURCES) $(guess_SOURCES) $(inertia_SOURCES) \ |
650 | unequal.o: ./unequal.c ./puzzles.h ./latin.h | 666 | $(keen_SOURCES) $(keensolver_SOURCES) $(latincheck_SOURCES) \ |
651 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 667 | $(lightup_SOURCES) $(lightupsolver_SOURCES) $(loopy_SOURCES) \ |
652 | unequal5.o: ./unequal.c ./puzzles.h ./latin.h | 668 | $(loopysolver_SOURCES) $(magnets_SOURCES) \ |
653 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 669 | $(magnetssolver_SOURCES) $(map_SOURCES) $(mapsolver_SOURCES) \ |
654 | unequal2.o: ./unequal.c ./puzzles.h ./latin.h | 670 | $(mineobfusc_SOURCES) $(mines_SOURCES) $(net_SOURCES) \ |
655 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 671 | $(netslide_SOURCES) $(nullgame_SOURCES) $(obfusc_SOURCES) \ |
656 | unruly.o: ./unruly.c ./puzzles.h | 672 | $(palisade_SOURCES) $(pattern_SOURCES) \ |
657 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 673 | $(patternpicture_SOURCES) $(patternsolver_SOURCES) \ |
658 | unruly5.o: ./unruly.c ./puzzles.h | 674 | $(pearl_SOURCES) $(pearlbench_SOURCES) $(pegs_SOURCES) \ |
659 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 675 | $(range_SOURCES) $(rect_SOURCES) $(samegame_SOURCES) \ |
660 | unruly2.o: ./unruly.c ./puzzles.h | 676 | $(signpost_SOURCES) $(signpostsolver_SOURCES) \ |
661 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@ | 677 | $(singles_SOURCES) $(singlessolver_SOURCES) $(sixteen_SOURCES) \ |
662 | untangle.o: ./untangle.c ./puzzles.h ./tree234.h | 678 | $(slant_SOURCES) $(slantsolver_SOURCES) $(solo_SOURCES) \ |
663 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 679 | $(solosolver_SOURCES) $(tents_SOURCES) $(tentssolver_SOURCES) \ |
664 | untangl3.o: ./untangle.c ./puzzles.h ./tree234.h | 680 | $(towers_SOURCES) $(towerssolver_SOURCES) $(tracks_SOURCES) \ |
665 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 681 | $(twiddle_SOURCES) $(undead_SOURCES) $(unequal_SOURCES) \ |
666 | version.o: ./version.c ./version.h | 682 | $(unequalsolver_SOURCES) $(unruly_SOURCES) \ |
667 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 683 | $(unrulysolver_SOURCES) $(untangle_SOURCES) |
668 | windows.o: ./windows.c ./puzzles.h ./resource.h | 684 | DIST_SOURCES = $(libfifteen2_a_SOURCES) $(libfilling2_a_SOURCES) \ |
669 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@ | 685 | $(libgalaxie2_a_SOURCES) $(libgalaxie4_a_SOURCES) \ |
670 | windows1.o: ./windows.c ./puzzles.h ./resource.h | 686 | $(libkeen2_a_SOURCES) $(liblatin6_a_SOURCES) \ |
671 | $(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@ | 687 | $(liblatin8_a_SOURCES) $(liblightup2_a_SOURCES) \ |
672 | 688 | $(libloopy2_a_SOURCES) $(libmagnets2_a_SOURCES) \ | |
673 | GAMES += blackbox | 689 | $(libmap2_a_SOURCES) $(libmines2_a_SOURCES) \ |
674 | GAMES += bridges | 690 | $(libpattern2_a_SOURCES) $(libpattern4_a_SOURCES) \ |
675 | GAMES += cube | 691 | $(libpearl2_a_SOURCES) $(libsignpos2_a_SOURCES) \ |
676 | GAMES += dominosa | 692 | $(libsingles3_a_SOURCES) $(libslant2_a_SOURCES) \ |
677 | GAMES += fifteen | 693 | $(libsolo2_a_SOURCES) $(libtents3_a_SOURCES) \ |
678 | GAMES += filling | 694 | $(libtowers2_a_SOURCES) $(libunequal2_a_SOURCES) \ |
679 | GAMES += flip | 695 | $(libunruly2_a_SOURCES) $(blackbox_SOURCES) $(bridges_SOURCES) \ |
680 | GAMES += flood | 696 | $(cube_SOURCES) $(dominosa_SOURCES) $(fifteen_SOURCES) \ |
681 | GAMES += galaxies | 697 | $(fifteensolver_SOURCES) $(filling_SOURCES) \ |
682 | GAMES += guess | 698 | $(fillingsolver_SOURCES) $(flip_SOURCES) $(flood_SOURCES) \ |
683 | GAMES += inertia | 699 | $(galaxies_SOURCES) $(galaxiespicture_SOURCES) \ |
684 | GAMES += keen | 700 | $(galaxiessolver_SOURCES) $(guess_SOURCES) $(inertia_SOURCES) \ |
685 | GAMES += lightup | 701 | $(keen_SOURCES) $(keensolver_SOURCES) $(latincheck_SOURCES) \ |
686 | GAMES += loopy | 702 | $(lightup_SOURCES) $(lightupsolver_SOURCES) $(loopy_SOURCES) \ |
687 | GAMES += magnets | 703 | $(loopysolver_SOURCES) $(magnets_SOURCES) \ |
688 | GAMES += map | 704 | $(magnetssolver_SOURCES) $(map_SOURCES) $(mapsolver_SOURCES) \ |
689 | GAMES += mines | 705 | $(mineobfusc_SOURCES) $(mines_SOURCES) $(net_SOURCES) \ |
690 | GAMES += net | 706 | $(netslide_SOURCES) $(nullgame_SOURCES) $(obfusc_SOURCES) \ |
691 | GAMES += netslide | 707 | $(palisade_SOURCES) $(pattern_SOURCES) \ |
692 | GAMES += palisade | 708 | $(patternpicture_SOURCES) $(patternsolver_SOURCES) \ |
693 | GAMES += pattern | 709 | $(pearl_SOURCES) $(pearlbench_SOURCES) $(pegs_SOURCES) \ |
694 | GAMES += pearl | 710 | $(range_SOURCES) $(rect_SOURCES) $(samegame_SOURCES) \ |
695 | GAMES += pegs | 711 | $(signpost_SOURCES) $(signpostsolver_SOURCES) \ |
696 | GAMES += range | 712 | $(singles_SOURCES) $(singlessolver_SOURCES) $(sixteen_SOURCES) \ |
697 | GAMES += rect | 713 | $(slant_SOURCES) $(slantsolver_SOURCES) $(solo_SOURCES) \ |
698 | GAMES += samegame | 714 | $(solosolver_SOURCES) $(tents_SOURCES) $(tentssolver_SOURCES) \ |
699 | GAMES += signpost | 715 | $(towers_SOURCES) $(towerssolver_SOURCES) $(tracks_SOURCES) \ |
700 | GAMES += singles | 716 | $(twiddle_SOURCES) $(undead_SOURCES) $(unequal_SOURCES) \ |
701 | GAMES += sixteen | 717 | $(unequalsolver_SOURCES) $(unruly_SOURCES) \ |
702 | GAMES += slant | 718 | $(unrulysolver_SOURCES) $(untangle_SOURCES) |
703 | GAMES += solo | 719 | am__can_run_installinfo = \ |
704 | GAMES += tents | 720 | case $$AM_UPDATE_INFO_DIR in \ |
705 | GAMES += towers | 721 | n|no|NO) false;; \ |
706 | GAMES += tracks | 722 | *) (install-info --version) >/dev/null 2>&1;; \ |
707 | GAMES += twiddle | 723 | esac |
708 | GAMES += undead | 724 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) |
709 | GAMES += unequal | 725 | # Read a list of newline-separated strings from the standard input, |
710 | GAMES += unruly | 726 | # and print each of them once, without duplicates. Input order is |
711 | GAMES += untangle | 727 | # *not* preserved. |
712 | install: | 728 | am__uniquify_input = $(AWK) '\ |
713 | for i in $(GAMES); do \ | 729 | BEGIN { nonempty = 0; } \ |
714 | $(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \ | 730 | { items[$$0] = 1; nonempty = 1; } \ |
715 | || exit 1; \ | 731 | END { if (nonempty) { for (i in items) print i; }; } \ |
732 | ' | ||
733 | # Make sure the list of sources is unique. This is necessary because, | ||
734 | # e.g., the same source file might be shared among _SOURCES variables | ||
735 | # for different programs/libraries. | ||
736 | am__define_uniq_tagged_files = \ | ||
737 | list='$(am__tagged_files)'; \ | ||
738 | unique=`for i in $$list; do \ | ||
739 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
740 | done | $(am__uniquify_input)` | ||
741 | ETAGS = etags | ||
742 | CTAGS = ctags | ||
743 | CSCOPE = cscope | ||
744 | AM_RECURSIVE_TARGETS = cscope | ||
745 | am__DIST_COMMON = $(srcdir)/Makefile.in README compile depcomp \ | ||
746 | install-sh missing | ||
747 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
748 | distdir = $(PACKAGE)-$(VERSION) | ||
749 | top_distdir = $(distdir) | ||
750 | am__remove_distdir = \ | ||
751 | if test -d "$(distdir)"; then \ | ||
752 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ | ||
753 | && rm -rf "$(distdir)" \ | ||
754 | || { sleep 5 && rm -rf "$(distdir)"; }; \ | ||
755 | else :; fi | ||
756 | am__post_remove_distdir = $(am__remove_distdir) | ||
757 | DIST_ARCHIVES = $(distdir).tar.gz | ||
758 | GZIP_ENV = --best | ||
759 | DIST_TARGETS = dist-gzip | ||
760 | distuninstallcheck_listfiles = find . -type f -print | ||
761 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | ||
762 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | ||
763 | distcleancheck_listfiles = find . -type f -print | ||
764 | ACLOCAL = ${SHELL} /home/franklin/puzzles/missing aclocal-1.15 | ||
765 | AMTAR = $${TAR-tar} | ||
766 | AM_DEFAULT_VERBOSITY = 1 | ||
767 | AUTOCONF = ${SHELL} /home/franklin/puzzles/missing autoconf | ||
768 | AUTOHEADER = ${SHELL} /home/franklin/puzzles/missing autoheader | ||
769 | AUTOMAKE = ${SHELL} /home/franklin/puzzles/missing automake-1.15 | ||
770 | AWK = gawk | ||
771 | CC = gcc | ||
772 | CCDEPMODE = depmode=gcc3 | ||
773 | CFLAGS = -g -O2 -Wall -Werror -std=c89 | ||
774 | CPPFLAGS = | ||
775 | CYGPATH_W = echo | ||
776 | DEFS = -DPACKAGE_NAME=\"puzzles\" -DPACKAGE_TARNAME=\"puzzles\" -DPACKAGE_VERSION=\"6.66\" -DPACKAGE_STRING=\"puzzles\ 6.66\" -DPACKAGE_BUGREPORT=\"anakin@pobox.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"puzzles\" -DVERSION=\"6.66\" | ||
777 | DEPDIR = .deps | ||
778 | ECHO_C = | ||
779 | ECHO_N = -n | ||
780 | ECHO_T = | ||
781 | EXEEXT = | ||
782 | GTK_CFLAGS = -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include | ||
783 | GTK_LIBS = -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 | ||
784 | INSTALL = /usr/bin/install -c | ||
785 | INSTALL_DATA = ${INSTALL} -m 644 | ||
786 | INSTALL_PROGRAM = ${INSTALL} | ||
787 | INSTALL_SCRIPT = ${INSTALL} | ||
788 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
789 | LDFLAGS = | ||
790 | LIBOBJS = | ||
791 | LIBS = | ||
792 | LTLIBOBJS = | ||
793 | MAKEINFO = ${SHELL} /home/franklin/puzzles/missing makeinfo | ||
794 | MKDIR_P = /usr/bin/mkdir -p | ||
795 | OBJEXT = o | ||
796 | PACKAGE = puzzles | ||
797 | PACKAGE_BUGREPORT = anakin@pobox.com | ||
798 | PACKAGE_NAME = puzzles | ||
799 | PACKAGE_STRING = puzzles 6.66 | ||
800 | PACKAGE_TARNAME = puzzles | ||
801 | PACKAGE_URL = | ||
802 | PACKAGE_VERSION = 6.66 | ||
803 | PATH_SEPARATOR = : | ||
804 | PKG_CONFIG = /usr/bin/pkg-config | ||
805 | PKG_CONFIG_LIBDIR = | ||
806 | PKG_CONFIG_PATH = | ||
807 | RANLIB = ranlib | ||
808 | SET_MAKE = | ||
809 | SHELL = /bin/sh | ||
810 | STRIP = | ||
811 | VERSION = 6.66 | ||
812 | abs_builddir = /home/franklin/puzzles | ||
813 | abs_srcdir = /home/franklin/puzzles | ||
814 | abs_top_builddir = /home/franklin/puzzles | ||
815 | abs_top_srcdir = /home/franklin/puzzles | ||
816 | ac_ct_CC = gcc | ||
817 | am__include = include | ||
818 | am__leading_dot = . | ||
819 | am__quote = | ||
820 | am__tar = $${TAR-tar} chof - "$$tardir" | ||
821 | am__untar = $${TAR-tar} xf - | ||
822 | bindir = ${exec_prefix}/bin | ||
823 | build_alias = | ||
824 | builddir = . | ||
825 | datadir = ${datarootdir} | ||
826 | datarootdir = ${prefix}/share | ||
827 | docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} | ||
828 | dvidir = ${docdir} | ||
829 | exec_prefix = ${prefix} | ||
830 | host_alias = | ||
831 | htmldir = ${docdir} | ||
832 | includedir = ${prefix}/include | ||
833 | infodir = ${datarootdir}/info | ||
834 | install_sh = ${SHELL} /home/franklin/puzzles/install-sh | ||
835 | libdir = ${exec_prefix}/lib | ||
836 | libexecdir = ${exec_prefix}/libexec | ||
837 | localedir = ${datarootdir}/locale | ||
838 | localstatedir = ${prefix}/var | ||
839 | mandir = ${datarootdir}/man | ||
840 | mkdir_p = $(MKDIR_P) | ||
841 | oldincludedir = /usr/include | ||
842 | pdfdir = ${docdir} | ||
843 | prefix = /usr/local | ||
844 | program_transform_name = s,x,x, | ||
845 | psdir = ${docdir} | ||
846 | sbindir = ${exec_prefix}/sbin | ||
847 | sharedstatedir = ${prefix}/com | ||
848 | srcdir = . | ||
849 | sysconfdir = ${prefix}/etc | ||
850 | target_alias = | ||
851 | top_build_prefix = | ||
852 | top_builddir = . | ||
853 | top_srcdir = . | ||
854 | GAMES = blackbox bridges cube dominosa fifteen filling flip flood \ | ||
855 | galaxies guess inertia keen lightup loopy magnets map mines \ | ||
856 | net netslide palisade pattern pearl pegs range rect samegame \ | ||
857 | signpost singles sixteen slant solo tents towers tracks \ | ||
858 | twiddle undead unequal unruly untangle | ||
859 | AUTOMAKE_OPTIONS = subdir-objects | ||
860 | allsources = ./blackbox.c ./bridges.c ./combi.c ./cube.c ./divvy.c \ | ||
861 | ./dominosa.c ./drawing.c ./dsf.c ./fifteen.c ./filling.c \ | ||
862 | ./findloop.c ./flip.c ./flood.c ./galaxies.c ./grid.c \ | ||
863 | ./grid.h ./gtk.c ./guess.c ./inertia.c ./keen.c ./latin.c \ | ||
864 | ./latin.h ./laydomino.c ./lightup.c ./list.c ./loopgen.c \ | ||
865 | ./loopgen.h ./loopy.c ./magnets.c ./malloc.c ./map.c \ | ||
866 | ./maxflow.c ./maxflow.h ./midend.c ./mines.c ./misc.c \ | ||
867 | ./net.c ./netslide.c ./no-icon.c ./nullfe.c ./nullgame.c \ | ||
868 | ./obfusc.c ./osx.m ./palisade.c ./pattern.c ./pearl.c \ | ||
869 | ./pegs.c ./penrose.c ./penrose.h ./printing.c ./ps.c \ | ||
870 | ./puzzles.h ./random.c ./range.c ./rect.c ./resource.h \ | ||
871 | ./samegame.c ./signpost.c ./singles.c ./sixteen.c ./slant.c \ | ||
872 | ./solo.c ./tdq.c ./tents.c ./towers.c ./tracks.c ./tree234.c \ | ||
873 | ./tree234.h ./twiddle.c ./undead.c ./unequal.c ./unruly.c \ | ||
874 | ./untangle.c ./version.c ./version.h ./windows.c | ||
875 | |||
876 | AM_CPPFLAGS = -I$(srcdir)/./ -I$(srcdir)/icons/ | ||
877 | AM_CFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) | ||
878 | blackbox_SOURCES = ./blackbox.c ./drawing.c ./gtk.c ./malloc.c ./midend.c \ | ||
879 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
880 | ./random.c ./version.c ./version.h | ||
881 | |||
882 | blackbox_LDADD = $(GTK_LIBS) -lm | ||
883 | bridges_SOURCES = ./bridges.c ./drawing.c ./dsf.c ./findloop.c ./gtk.c \ | ||
884 | ./malloc.c ./midend.c ./misc.c ./no-icon.c ./printing.c \ | ||
885 | ./ps.c ./puzzles.h ./random.c ./version.c ./version.h | ||
886 | |||
887 | bridges_LDADD = $(GTK_LIBS) -lm | ||
888 | cube_SOURCES = ./cube.c ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
889 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
890 | ./version.c ./version.h | ||
891 | |||
892 | cube_LDADD = $(GTK_LIBS) -lm | ||
893 | dominosa_SOURCES = ./dominosa.c ./drawing.c ./gtk.c ./laydomino.c ./malloc.c \ | ||
894 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
895 | ./puzzles.h ./random.c ./version.c ./version.h | ||
896 | |||
897 | dominosa_LDADD = $(GTK_LIBS) -lm | ||
898 | fifteen_SOURCES = ./drawing.c ./fifteen.c ./gtk.c ./malloc.c ./midend.c \ | ||
899 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
900 | ./random.c ./version.c ./version.h | ||
901 | |||
902 | fifteen_LDADD = $(GTK_LIBS) -lm | ||
903 | fifteensolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
904 | ./random.c | ||
905 | |||
906 | fifteensolver_LDADD = libfifteen2_a-fifteen.$(OBJEXT) -lm | ||
907 | filling_SOURCES = ./drawing.c ./dsf.c ./filling.c ./gtk.c ./malloc.c \ | ||
908 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
909 | ./puzzles.h ./random.c ./version.c ./version.h | ||
910 | |||
911 | filling_LDADD = $(GTK_LIBS) -lm | ||
912 | fillingsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
913 | ./random.c | ||
914 | |||
915 | fillingsolver_LDADD = libfilling2_a-filling.$(OBJEXT) -lm | ||
916 | flip_SOURCES = ./drawing.c ./flip.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
917 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
918 | ./tree234.c ./tree234.h ./version.c ./version.h | ||
919 | |||
920 | flip_LDADD = $(GTK_LIBS) -lm | ||
921 | flood_SOURCES = ./drawing.c ./flood.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
922 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
923 | ./version.c ./version.h | ||
924 | |||
925 | flood_LDADD = $(GTK_LIBS) -lm | ||
926 | galaxies_SOURCES = ./drawing.c ./dsf.c ./galaxies.c ./gtk.c ./malloc.c \ | ||
927 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
928 | ./puzzles.h ./random.c ./version.c ./version.h | ||
929 | |||
930 | galaxies_LDADD = $(GTK_LIBS) -lm | ||
931 | galaxiespicture_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
932 | ./random.c | ||
933 | |||
934 | galaxiespicture_LDADD = libgalaxie4_a-galaxies.$(OBJEXT) -lm | ||
935 | galaxiessolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
936 | ./random.c | ||
937 | |||
938 | galaxiessolver_LDADD = libgalaxie2_a-galaxies.$(OBJEXT) -lm | ||
939 | guess_SOURCES = ./drawing.c ./gtk.c ./guess.c ./malloc.c ./midend.c ./misc.c \ | ||
940 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
941 | ./version.c ./version.h | ||
942 | |||
943 | guess_LDADD = $(GTK_LIBS) -lm | ||
944 | inertia_SOURCES = ./drawing.c ./gtk.c ./inertia.c ./malloc.c ./midend.c \ | ||
945 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
946 | ./random.c ./version.c ./version.h | ||
947 | |||
948 | inertia_LDADD = $(GTK_LIBS) -lm | ||
949 | keen_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./keen.c ./latin.c ./latin.h \ | ||
950 | ./malloc.c ./maxflow.c ./maxflow.h ./midend.c ./misc.c \ | ||
951 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
952 | ./tree234.c ./tree234.h ./version.c ./version.h | ||
953 | |||
954 | keen_LDADD = $(GTK_LIBS) -lm | ||
955 | keensolver_SOURCES = ./dsf.c ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \ | ||
956 | ./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h | ||
957 | |||
958 | keensolver_LDADD = libkeen2_a-keen.$(OBJEXT) liblatin6_a-latin.$(OBJEXT) -lm | ||
959 | latincheck_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c ./nullfe.c \ | ||
960 | ./puzzles.h ./random.c ./tree234.c ./tree234.h | ||
961 | |||
962 | latincheck_LDADD = liblatin8_a-latin.$(OBJEXT) -lm | ||
963 | lightup_SOURCES = ./combi.c ./drawing.c ./gtk.c ./lightup.c ./malloc.c \ | ||
964 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
965 | ./puzzles.h ./random.c ./version.c ./version.h | ||
966 | |||
967 | lightup_LDADD = $(GTK_LIBS) -lm | ||
968 | lightupsolver_SOURCES = ./combi.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
969 | ./random.c | ||
970 | |||
971 | lightupsolver_LDADD = liblightup2_a-lightup.$(OBJEXT) -lm | ||
972 | loopy_SOURCES = ./drawing.c ./dsf.c ./grid.c ./grid.h ./gtk.c ./loopgen.c \ | ||
973 | ./loopgen.h ./loopy.c ./malloc.c ./midend.c ./misc.c \ | ||
974 | ./no-icon.c ./penrose.c ./penrose.h ./printing.c ./ps.c \ | ||
975 | ./puzzles.h ./random.c ./tree234.c ./tree234.h ./version.c \ | ||
976 | ./version.h | ||
977 | |||
978 | loopy_LDADD = $(GTK_LIBS) -lm | ||
979 | loopysolver_SOURCES = ./dsf.c ./grid.c ./grid.h ./loopgen.c ./loopgen.h \ | ||
980 | ./malloc.c ./misc.c ./nullfe.c ./penrose.c ./penrose.h \ | ||
981 | ./puzzles.h ./random.c ./tree234.c ./tree234.h | ||
982 | |||
983 | loopysolver_LDADD = libloopy2_a-loopy.$(OBJEXT) -lm | ||
984 | magnets_SOURCES = ./drawing.c ./gtk.c ./laydomino.c ./magnets.c ./malloc.c \ | ||
985 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
986 | ./puzzles.h ./random.c ./version.c ./version.h | ||
987 | |||
988 | magnets_LDADD = $(GTK_LIBS) -lm | ||
989 | magnetssolver_SOURCES = ./laydomino.c ./malloc.c ./misc.c ./nullfe.c \ | ||
990 | ./puzzles.h ./random.c | ||
991 | |||
992 | magnetssolver_LDADD = libmagnets2_a-magnets.$(OBJEXT) -lm | ||
993 | map_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./map.c ./midend.c \ | ||
994 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
995 | ./random.c ./version.c ./version.h | ||
996 | |||
997 | map_LDADD = $(GTK_LIBS) -lm | ||
998 | mapsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
999 | ./random.c | ||
1000 | |||
1001 | mapsolver_LDADD = libmap2_a-map.$(OBJEXT) -lm | ||
1002 | mineobfusc_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h ./random.c \ | ||
1003 | ./tree234.c ./tree234.h | ||
1004 | |||
1005 | mineobfusc_LDADD = libmines2_a-mines.$(OBJEXT) -lm | ||
1006 | mines_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./mines.c ./misc.c \ | ||
1007 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1008 | ./tree234.c ./tree234.h ./version.c ./version.h | ||
1009 | |||
1010 | mines_LDADD = $(GTK_LIBS) -lm | ||
1011 | net_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c ./midend.c \ | ||
1012 | ./misc.c ./net.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
1013 | ./random.c ./tree234.c ./tree234.h ./version.c ./version.h | ||
1014 | |||
1015 | net_LDADD = $(GTK_LIBS) -lm | ||
1016 | netslide_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1017 | ./netslide.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
1018 | ./random.c ./tree234.c ./tree234.h ./version.c ./version.h | ||
1019 | |||
1020 | netslide_LDADD = $(GTK_LIBS) -lm | ||
1021 | nullgame_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1022 | ./no-icon.c ./nullgame.c ./printing.c ./ps.c ./puzzles.h \ | ||
1023 | ./random.c ./version.c ./version.h | ||
1024 | |||
1025 | nullgame_LDADD = $(GTK_LIBS) -lm | ||
1026 | obfusc_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./obfusc.c ./puzzles.h \ | ||
1027 | ./random.c | ||
1028 | |||
1029 | obfusc_LDADD = -lm | ||
1030 | palisade_SOURCES = ./divvy.c ./drawing.c ./dsf.c ./gtk.c ./malloc.c \ | ||
1031 | ./midend.c ./misc.c ./no-icon.c ./palisade.c ./printing.c \ | ||
1032 | ./ps.c ./puzzles.h ./random.c ./version.c ./version.h | ||
1033 | |||
1034 | palisade_LDADD = $(GTK_LIBS) -lm | ||
1035 | pattern_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1036 | ./no-icon.c ./pattern.c ./printing.c ./ps.c ./puzzles.h \ | ||
1037 | ./random.c ./version.c ./version.h | ||
1038 | |||
1039 | pattern_LDADD = $(GTK_LIBS) -lm | ||
1040 | patternpicture_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
1041 | ./random.c | ||
1042 | |||
1043 | patternpicture_LDADD = libpattern4_a-pattern.$(OBJEXT) -lm | ||
1044 | patternsolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
1045 | ./random.c | ||
1046 | |||
1047 | patternsolver_LDADD = libpattern2_a-pattern.$(OBJEXT) -lm | ||
1048 | pearl_SOURCES = ./drawing.c ./dsf.c ./grid.c ./grid.h ./gtk.c ./loopgen.c \ | ||
1049 | ./loopgen.h ./malloc.c ./midend.c ./misc.c ./no-icon.c \ | ||
1050 | ./pearl.c ./penrose.c ./penrose.h ./printing.c ./ps.c \ | ||
1051 | ./puzzles.h ./random.c ./tdq.c ./tree234.c ./tree234.h \ | ||
1052 | ./version.c ./version.h | ||
1053 | |||
1054 | pearl_LDADD = $(GTK_LIBS) -lm | ||
1055 | pearlbench_SOURCES = ./dsf.c ./grid.c ./grid.h ./loopgen.c ./loopgen.h \ | ||
1056 | ./malloc.c ./misc.c ./nullfe.c ./penrose.c ./penrose.h \ | ||
1057 | ./puzzles.h ./random.c ./tdq.c ./tree234.c ./tree234.h | ||
1058 | |||
1059 | pearlbench_LDADD = libpearl2_a-pearl.$(OBJEXT) -lm | ||
1060 | pegs_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1061 | ./no-icon.c ./pegs.c ./printing.c ./ps.c ./puzzles.h \ | ||
1062 | ./random.c ./tree234.c ./tree234.h ./version.c ./version.h | ||
1063 | |||
1064 | pegs_LDADD = $(GTK_LIBS) -lm | ||
1065 | range_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1066 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1067 | ./range.c ./version.c ./version.h | ||
1068 | |||
1069 | range_LDADD = $(GTK_LIBS) -lm | ||
1070 | rect_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1071 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1072 | ./rect.c ./version.c ./version.h | ||
1073 | |||
1074 | rect_LDADD = $(GTK_LIBS) -lm | ||
1075 | samegame_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1076 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1077 | ./samegame.c ./version.c ./version.h | ||
1078 | |||
1079 | samegame_LDADD = $(GTK_LIBS) -lm | ||
1080 | signpost_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c \ | ||
1081 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
1082 | ./random.c ./signpost.c ./version.c ./version.h | ||
1083 | |||
1084 | signpost_LDADD = $(GTK_LIBS) -lm | ||
1085 | signpostsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \ | ||
1086 | ./random.c | ||
1087 | |||
1088 | signpostsolver_LDADD = libsignpos2_a-signpost.$(OBJEXT) -lm | ||
1089 | singles_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./latin.c ./latin.h ./malloc.c \ | ||
1090 | ./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \ | ||
1091 | ./printing.c ./ps.c ./puzzles.h ./random.c ./singles.c \ | ||
1092 | ./tree234.c ./tree234.h ./version.c ./version.h | ||
1093 | |||
1094 | singles_LDADD = $(GTK_LIBS) -lm | ||
1095 | singlessolver_SOURCES = ./dsf.c ./latin.c ./latin.h ./malloc.c ./maxflow.c \ | ||
1096 | ./maxflow.h ./misc.c ./nullfe.c ./puzzles.h ./random.c \ | ||
1097 | ./tree234.c ./tree234.h | ||
1098 | |||
1099 | singlessolver_LDADD = libsingles3_a-singles.$(OBJEXT) -lm | ||
1100 | sixteen_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1101 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1102 | ./sixteen.c ./version.c ./version.h | ||
1103 | |||
1104 | sixteen_LDADD = $(GTK_LIBS) -lm | ||
1105 | slant_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c \ | ||
1106 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
1107 | ./puzzles.h ./random.c ./slant.c ./version.c ./version.h | ||
1108 | |||
1109 | slant_LDADD = $(GTK_LIBS) -lm | ||
1110 | slantsolver_SOURCES = ./dsf.c ./findloop.c ./malloc.c ./misc.c ./nullfe.c \ | ||
1111 | ./puzzles.h ./random.c | ||
1112 | |||
1113 | slantsolver_LDADD = libslant2_a-slant.$(OBJEXT) -lm | ||
1114 | solo_SOURCES = ./divvy.c ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c \ | ||
1115 | ./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \ | ||
1116 | ./random.c ./solo.c ./version.c ./version.h | ||
1117 | |||
1118 | solo_LDADD = $(GTK_LIBS) -lm | ||
1119 | solosolver_SOURCES = ./divvy.c ./dsf.c ./malloc.c ./misc.c ./nullfe.c \ | ||
1120 | ./puzzles.h ./random.c | ||
1121 | |||
1122 | solosolver_LDADD = libsolo2_a-solo.$(OBJEXT) -lm | ||
1123 | tents_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./maxflow.c \ | ||
1124 | ./maxflow.h ./midend.c ./misc.c ./no-icon.c ./printing.c \ | ||
1125 | ./ps.c ./puzzles.h ./random.c ./tents.c ./version.c \ | ||
1126 | ./version.h | ||
1127 | |||
1128 | tents_LDADD = $(GTK_LIBS) -lm | ||
1129 | tentssolver_SOURCES = ./dsf.c ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \ | ||
1130 | ./nullfe.c ./puzzles.h ./random.c | ||
1131 | |||
1132 | tentssolver_LDADD = libtents3_a-tents.$(OBJEXT) -lm | ||
1133 | towers_SOURCES = ./drawing.c ./gtk.c ./latin.c ./latin.h ./malloc.c \ | ||
1134 | ./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \ | ||
1135 | ./printing.c ./ps.c ./puzzles.h ./random.c ./towers.c \ | ||
1136 | ./tree234.c ./tree234.h ./version.c ./version.h | ||
1137 | |||
1138 | towers_LDADD = $(GTK_LIBS) -lm | ||
1139 | towerssolver_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \ | ||
1140 | ./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h | ||
1141 | |||
1142 | towerssolver_LDADD = liblatin6_a-latin.$(OBJEXT) \ | ||
1143 | libtowers2_a-towers.$(OBJEXT) -lm | ||
1144 | |||
1145 | tracks_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c \ | ||
1146 | ./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \ | ||
1147 | ./puzzles.h ./random.c ./tracks.c ./version.c ./version.h | ||
1148 | |||
1149 | tracks_LDADD = $(GTK_LIBS) -lm | ||
1150 | twiddle_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1151 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1152 | ./twiddle.c ./version.c ./version.h | ||
1153 | |||
1154 | twiddle_LDADD = $(GTK_LIBS) -lm | ||
1155 | undead_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1156 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1157 | ./undead.c ./version.c ./version.h | ||
1158 | |||
1159 | undead_LDADD = $(GTK_LIBS) -lm | ||
1160 | unequal_SOURCES = ./drawing.c ./gtk.c ./latin.c ./latin.h ./malloc.c \ | ||
1161 | ./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \ | ||
1162 | ./printing.c ./ps.c ./puzzles.h ./random.c ./tree234.c \ | ||
1163 | ./tree234.h ./unequal.c ./version.c ./version.h | ||
1164 | |||
1165 | unequal_LDADD = $(GTK_LIBS) -lm | ||
1166 | unequalsolver_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \ | ||
1167 | ./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h | ||
1168 | |||
1169 | unequalsolver_LDADD = liblatin6_a-latin.$(OBJEXT) \ | ||
1170 | libunequal2_a-unequal.$(OBJEXT) -lm | ||
1171 | |||
1172 | unruly_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1173 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1174 | ./unruly.c ./version.c ./version.h | ||
1175 | |||
1176 | unruly_LDADD = $(GTK_LIBS) -lm | ||
1177 | unrulysolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h ./random.c | ||
1178 | unrulysolver_LDADD = libunruly2_a-unruly.$(OBJEXT) -lm | ||
1179 | untangle_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \ | ||
1180 | ./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \ | ||
1181 | ./tree234.c ./tree234.h ./untangle.c ./version.c ./version.h | ||
1182 | |||
1183 | untangle_LDADD = $(GTK_LIBS) -lm | ||
1184 | libfifteen2_a_SOURCES = ./fifteen.c ./puzzles.h | ||
1185 | libfifteen2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1186 | libfilling2_a_SOURCES = ./filling.c ./puzzles.h | ||
1187 | libfilling2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1188 | libgalaxie2_a_SOURCES = ./galaxies.c ./puzzles.h | ||
1189 | libgalaxie2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1190 | libgalaxie4_a_SOURCES = ./galaxies.c ./puzzles.h | ||
1191 | libgalaxie4_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) \ | ||
1192 | -DSTANDALONE_PICTURE_GENERATOR | ||
1193 | |||
1194 | libkeen2_a_SOURCES = ./keen.c ./puzzles.h ./latin.h | ||
1195 | libkeen2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1196 | liblatin6_a_SOURCES = ./latin.c ./puzzles.h ./tree234.h ./maxflow.h \ | ||
1197 | ./latin.h | ||
1198 | |||
1199 | liblatin6_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1200 | liblatin8_a_SOURCES = ./latin.c ./puzzles.h ./tree234.h ./maxflow.h \ | ||
1201 | ./latin.h | ||
1202 | |||
1203 | liblatin8_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_LATIN_TEST | ||
1204 | liblightup2_a_SOURCES = ./lightup.c ./puzzles.h | ||
1205 | liblightup2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1206 | libloopy2_a_SOURCES = ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h | ||
1207 | libloopy2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1208 | libmagnets2_a_SOURCES = ./magnets.c ./puzzles.h | ||
1209 | libmagnets2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1210 | libmap2_a_SOURCES = ./map.c ./puzzles.h | ||
1211 | libmap2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1212 | libmines2_a_SOURCES = ./mines.c ./tree234.h ./puzzles.h | ||
1213 | libmines2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_OBFUSCATOR | ||
1214 | libpattern2_a_SOURCES = ./pattern.c ./puzzles.h | ||
1215 | libpattern2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1216 | libpattern4_a_SOURCES = ./pattern.c ./puzzles.h | ||
1217 | libpattern4_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) \ | ||
1218 | -DSTANDALONE_PICTURE_GENERATOR | ||
1219 | |||
1220 | libpearl2_a_SOURCES = ./pearl.c ./puzzles.h ./grid.h ./loopgen.h | ||
1221 | libpearl2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1222 | libsignpos2_a_SOURCES = ./signpost.c ./puzzles.h | ||
1223 | libsignpos2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1224 | libsingles3_a_SOURCES = ./singles.c ./puzzles.h ./latin.h | ||
1225 | libsingles3_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1226 | libslant2_a_SOURCES = ./slant.c ./puzzles.h | ||
1227 | libslant2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1228 | libsolo2_a_SOURCES = ./solo.c ./puzzles.h | ||
1229 | libsolo2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1230 | libtents3_a_SOURCES = ./tents.c ./puzzles.h ./maxflow.h | ||
1231 | libtents3_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1232 | libtowers2_a_SOURCES = ./towers.c ./puzzles.h ./latin.h | ||
1233 | libtowers2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1234 | libunequal2_a_SOURCES = ./unequal.c ./puzzles.h ./latin.h | ||
1235 | libunequal2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1236 | libunruly2_a_SOURCES = ./unruly.c ./puzzles.h | ||
1237 | libunruly2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER | ||
1238 | noinst_LIBRARIES = libfifteen2.a libfilling2.a libgalaxie2.a libgalaxie4.a \ | ||
1239 | libkeen2.a liblatin6.a liblatin8.a liblightup2.a libloopy2.a \ | ||
1240 | libmagnets2.a libmap2.a libmines2.a libpattern2.a \ | ||
1241 | libpattern4.a libpearl2.a libsignpos2.a libsingles3.a \ | ||
1242 | libslant2.a libsolo2.a libtents3.a libtowers2.a \ | ||
1243 | libunequal2.a libunruly2.a | ||
1244 | |||
1245 | all: all-am | ||
1246 | |||
1247 | .SUFFIXES: | ||
1248 | .SUFFIXES: .c .o .obj | ||
1249 | am--refresh: Makefile | ||
1250 | @: | ||
1251 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
1252 | @for dep in $?; do \ | ||
1253 | case '$(am__configure_deps)' in \ | ||
1254 | *$$dep*) \ | ||
1255 | echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ | ||
1256 | $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ | ||
1257 | && exit 0; \ | ||
1258 | exit 1;; \ | ||
1259 | esac; \ | ||
1260 | done; \ | ||
1261 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ | ||
1262 | $(am__cd) $(top_srcdir) && \ | ||
1263 | $(AUTOMAKE) --foreign Makefile | ||
1264 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
1265 | @case '$?' in \ | ||
1266 | *config.status*) \ | ||
1267 | echo ' $(SHELL) ./config.status'; \ | ||
1268 | $(SHELL) ./config.status;; \ | ||
1269 | *) \ | ||
1270 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | ||
1271 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | ||
1272 | esac; | ||
1273 | |||
1274 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
1275 | $(SHELL) ./config.status --recheck | ||
1276 | |||
1277 | $(top_srcdir)/configure: $(am__configure_deps) | ||
1278 | $(am__cd) $(srcdir) && $(AUTOCONF) | ||
1279 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
1280 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | ||
1281 | $(am__aclocal_m4_deps): | ||
1282 | |||
1283 | clean-noinstLIBRARIES: | ||
1284 | -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) | ||
1285 | ./$(am__dirstamp): | ||
1286 | @$(MKDIR_P) . | ||
1287 | @: > ./$(am__dirstamp) | ||
1288 | $(DEPDIR)/$(am__dirstamp): | ||
1289 | @$(MKDIR_P) ./$(DEPDIR) | ||
1290 | @: > $(DEPDIR)/$(am__dirstamp) | ||
1291 | ./libfifteen2_a-fifteen.$(OBJEXT): ./$(am__dirstamp) \ | ||
1292 | $(DEPDIR)/$(am__dirstamp) | ||
1293 | |||
1294 | libfifteen2.a: $(libfifteen2_a_OBJECTS) $(libfifteen2_a_DEPENDENCIES) $(EXTRA_libfifteen2_a_DEPENDENCIES) | ||
1295 | $(AM_V_at)-rm -f libfifteen2.a | ||
1296 | $(AM_V_AR)$(libfifteen2_a_AR) libfifteen2.a $(libfifteen2_a_OBJECTS) $(libfifteen2_a_LIBADD) | ||
1297 | $(AM_V_at)$(RANLIB) libfifteen2.a | ||
1298 | ./libfilling2_a-filling.$(OBJEXT): ./$(am__dirstamp) \ | ||
1299 | $(DEPDIR)/$(am__dirstamp) | ||
1300 | |||
1301 | libfilling2.a: $(libfilling2_a_OBJECTS) $(libfilling2_a_DEPENDENCIES) $(EXTRA_libfilling2_a_DEPENDENCIES) | ||
1302 | $(AM_V_at)-rm -f libfilling2.a | ||
1303 | $(AM_V_AR)$(libfilling2_a_AR) libfilling2.a $(libfilling2_a_OBJECTS) $(libfilling2_a_LIBADD) | ||
1304 | $(AM_V_at)$(RANLIB) libfilling2.a | ||
1305 | ./libgalaxie2_a-galaxies.$(OBJEXT): ./$(am__dirstamp) \ | ||
1306 | $(DEPDIR)/$(am__dirstamp) | ||
1307 | |||
1308 | libgalaxie2.a: $(libgalaxie2_a_OBJECTS) $(libgalaxie2_a_DEPENDENCIES) $(EXTRA_libgalaxie2_a_DEPENDENCIES) | ||
1309 | $(AM_V_at)-rm -f libgalaxie2.a | ||
1310 | $(AM_V_AR)$(libgalaxie2_a_AR) libgalaxie2.a $(libgalaxie2_a_OBJECTS) $(libgalaxie2_a_LIBADD) | ||
1311 | $(AM_V_at)$(RANLIB) libgalaxie2.a | ||
1312 | ./libgalaxie4_a-galaxies.$(OBJEXT): ./$(am__dirstamp) \ | ||
1313 | $(DEPDIR)/$(am__dirstamp) | ||
1314 | |||
1315 | libgalaxie4.a: $(libgalaxie4_a_OBJECTS) $(libgalaxie4_a_DEPENDENCIES) $(EXTRA_libgalaxie4_a_DEPENDENCIES) | ||
1316 | $(AM_V_at)-rm -f libgalaxie4.a | ||
1317 | $(AM_V_AR)$(libgalaxie4_a_AR) libgalaxie4.a $(libgalaxie4_a_OBJECTS) $(libgalaxie4_a_LIBADD) | ||
1318 | $(AM_V_at)$(RANLIB) libgalaxie4.a | ||
1319 | ./libkeen2_a-keen.$(OBJEXT): ./$(am__dirstamp) \ | ||
1320 | $(DEPDIR)/$(am__dirstamp) | ||
1321 | |||
1322 | libkeen2.a: $(libkeen2_a_OBJECTS) $(libkeen2_a_DEPENDENCIES) $(EXTRA_libkeen2_a_DEPENDENCIES) | ||
1323 | $(AM_V_at)-rm -f libkeen2.a | ||
1324 | $(AM_V_AR)$(libkeen2_a_AR) libkeen2.a $(libkeen2_a_OBJECTS) $(libkeen2_a_LIBADD) | ||
1325 | $(AM_V_at)$(RANLIB) libkeen2.a | ||
1326 | ./liblatin6_a-latin.$(OBJEXT): ./$(am__dirstamp) \ | ||
1327 | $(DEPDIR)/$(am__dirstamp) | ||
1328 | |||
1329 | liblatin6.a: $(liblatin6_a_OBJECTS) $(liblatin6_a_DEPENDENCIES) $(EXTRA_liblatin6_a_DEPENDENCIES) | ||
1330 | $(AM_V_at)-rm -f liblatin6.a | ||
1331 | $(AM_V_AR)$(liblatin6_a_AR) liblatin6.a $(liblatin6_a_OBJECTS) $(liblatin6_a_LIBADD) | ||
1332 | $(AM_V_at)$(RANLIB) liblatin6.a | ||
1333 | ./liblatin8_a-latin.$(OBJEXT): ./$(am__dirstamp) \ | ||
1334 | $(DEPDIR)/$(am__dirstamp) | ||
1335 | |||
1336 | liblatin8.a: $(liblatin8_a_OBJECTS) $(liblatin8_a_DEPENDENCIES) $(EXTRA_liblatin8_a_DEPENDENCIES) | ||
1337 | $(AM_V_at)-rm -f liblatin8.a | ||
1338 | $(AM_V_AR)$(liblatin8_a_AR) liblatin8.a $(liblatin8_a_OBJECTS) $(liblatin8_a_LIBADD) | ||
1339 | $(AM_V_at)$(RANLIB) liblatin8.a | ||
1340 | ./liblightup2_a-lightup.$(OBJEXT): ./$(am__dirstamp) \ | ||
1341 | $(DEPDIR)/$(am__dirstamp) | ||
1342 | |||
1343 | liblightup2.a: $(liblightup2_a_OBJECTS) $(liblightup2_a_DEPENDENCIES) $(EXTRA_liblightup2_a_DEPENDENCIES) | ||
1344 | $(AM_V_at)-rm -f liblightup2.a | ||
1345 | $(AM_V_AR)$(liblightup2_a_AR) liblightup2.a $(liblightup2_a_OBJECTS) $(liblightup2_a_LIBADD) | ||
1346 | $(AM_V_at)$(RANLIB) liblightup2.a | ||
1347 | ./libloopy2_a-loopy.$(OBJEXT): ./$(am__dirstamp) \ | ||
1348 | $(DEPDIR)/$(am__dirstamp) | ||
1349 | |||
1350 | libloopy2.a: $(libloopy2_a_OBJECTS) $(libloopy2_a_DEPENDENCIES) $(EXTRA_libloopy2_a_DEPENDENCIES) | ||
1351 | $(AM_V_at)-rm -f libloopy2.a | ||
1352 | $(AM_V_AR)$(libloopy2_a_AR) libloopy2.a $(libloopy2_a_OBJECTS) $(libloopy2_a_LIBADD) | ||
1353 | $(AM_V_at)$(RANLIB) libloopy2.a | ||
1354 | ./libmagnets2_a-magnets.$(OBJEXT): ./$(am__dirstamp) \ | ||
1355 | $(DEPDIR)/$(am__dirstamp) | ||
1356 | |||
1357 | libmagnets2.a: $(libmagnets2_a_OBJECTS) $(libmagnets2_a_DEPENDENCIES) $(EXTRA_libmagnets2_a_DEPENDENCIES) | ||
1358 | $(AM_V_at)-rm -f libmagnets2.a | ||
1359 | $(AM_V_AR)$(libmagnets2_a_AR) libmagnets2.a $(libmagnets2_a_OBJECTS) $(libmagnets2_a_LIBADD) | ||
1360 | $(AM_V_at)$(RANLIB) libmagnets2.a | ||
1361 | ./libmap2_a-map.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1362 | |||
1363 | libmap2.a: $(libmap2_a_OBJECTS) $(libmap2_a_DEPENDENCIES) $(EXTRA_libmap2_a_DEPENDENCIES) | ||
1364 | $(AM_V_at)-rm -f libmap2.a | ||
1365 | $(AM_V_AR)$(libmap2_a_AR) libmap2.a $(libmap2_a_OBJECTS) $(libmap2_a_LIBADD) | ||
1366 | $(AM_V_at)$(RANLIB) libmap2.a | ||
1367 | ./libmines2_a-mines.$(OBJEXT): ./$(am__dirstamp) \ | ||
1368 | $(DEPDIR)/$(am__dirstamp) | ||
1369 | |||
1370 | libmines2.a: $(libmines2_a_OBJECTS) $(libmines2_a_DEPENDENCIES) $(EXTRA_libmines2_a_DEPENDENCIES) | ||
1371 | $(AM_V_at)-rm -f libmines2.a | ||
1372 | $(AM_V_AR)$(libmines2_a_AR) libmines2.a $(libmines2_a_OBJECTS) $(libmines2_a_LIBADD) | ||
1373 | $(AM_V_at)$(RANLIB) libmines2.a | ||
1374 | ./libpattern2_a-pattern.$(OBJEXT): ./$(am__dirstamp) \ | ||
1375 | $(DEPDIR)/$(am__dirstamp) | ||
1376 | |||
1377 | libpattern2.a: $(libpattern2_a_OBJECTS) $(libpattern2_a_DEPENDENCIES) $(EXTRA_libpattern2_a_DEPENDENCIES) | ||
1378 | $(AM_V_at)-rm -f libpattern2.a | ||
1379 | $(AM_V_AR)$(libpattern2_a_AR) libpattern2.a $(libpattern2_a_OBJECTS) $(libpattern2_a_LIBADD) | ||
1380 | $(AM_V_at)$(RANLIB) libpattern2.a | ||
1381 | ./libpattern4_a-pattern.$(OBJEXT): ./$(am__dirstamp) \ | ||
1382 | $(DEPDIR)/$(am__dirstamp) | ||
1383 | |||
1384 | libpattern4.a: $(libpattern4_a_OBJECTS) $(libpattern4_a_DEPENDENCIES) $(EXTRA_libpattern4_a_DEPENDENCIES) | ||
1385 | $(AM_V_at)-rm -f libpattern4.a | ||
1386 | $(AM_V_AR)$(libpattern4_a_AR) libpattern4.a $(libpattern4_a_OBJECTS) $(libpattern4_a_LIBADD) | ||
1387 | $(AM_V_at)$(RANLIB) libpattern4.a | ||
1388 | ./libpearl2_a-pearl.$(OBJEXT): ./$(am__dirstamp) \ | ||
1389 | $(DEPDIR)/$(am__dirstamp) | ||
1390 | |||
1391 | libpearl2.a: $(libpearl2_a_OBJECTS) $(libpearl2_a_DEPENDENCIES) $(EXTRA_libpearl2_a_DEPENDENCIES) | ||
1392 | $(AM_V_at)-rm -f libpearl2.a | ||
1393 | $(AM_V_AR)$(libpearl2_a_AR) libpearl2.a $(libpearl2_a_OBJECTS) $(libpearl2_a_LIBADD) | ||
1394 | $(AM_V_at)$(RANLIB) libpearl2.a | ||
1395 | ./libsignpos2_a-signpost.$(OBJEXT): ./$(am__dirstamp) \ | ||
1396 | $(DEPDIR)/$(am__dirstamp) | ||
1397 | |||
1398 | libsignpos2.a: $(libsignpos2_a_OBJECTS) $(libsignpos2_a_DEPENDENCIES) $(EXTRA_libsignpos2_a_DEPENDENCIES) | ||
1399 | $(AM_V_at)-rm -f libsignpos2.a | ||
1400 | $(AM_V_AR)$(libsignpos2_a_AR) libsignpos2.a $(libsignpos2_a_OBJECTS) $(libsignpos2_a_LIBADD) | ||
1401 | $(AM_V_at)$(RANLIB) libsignpos2.a | ||
1402 | ./libsingles3_a-singles.$(OBJEXT): ./$(am__dirstamp) \ | ||
1403 | $(DEPDIR)/$(am__dirstamp) | ||
1404 | |||
1405 | libsingles3.a: $(libsingles3_a_OBJECTS) $(libsingles3_a_DEPENDENCIES) $(EXTRA_libsingles3_a_DEPENDENCIES) | ||
1406 | $(AM_V_at)-rm -f libsingles3.a | ||
1407 | $(AM_V_AR)$(libsingles3_a_AR) libsingles3.a $(libsingles3_a_OBJECTS) $(libsingles3_a_LIBADD) | ||
1408 | $(AM_V_at)$(RANLIB) libsingles3.a | ||
1409 | ./libslant2_a-slant.$(OBJEXT): ./$(am__dirstamp) \ | ||
1410 | $(DEPDIR)/$(am__dirstamp) | ||
1411 | |||
1412 | libslant2.a: $(libslant2_a_OBJECTS) $(libslant2_a_DEPENDENCIES) $(EXTRA_libslant2_a_DEPENDENCIES) | ||
1413 | $(AM_V_at)-rm -f libslant2.a | ||
1414 | $(AM_V_AR)$(libslant2_a_AR) libslant2.a $(libslant2_a_OBJECTS) $(libslant2_a_LIBADD) | ||
1415 | $(AM_V_at)$(RANLIB) libslant2.a | ||
1416 | ./libsolo2_a-solo.$(OBJEXT): ./$(am__dirstamp) \ | ||
1417 | $(DEPDIR)/$(am__dirstamp) | ||
1418 | |||
1419 | libsolo2.a: $(libsolo2_a_OBJECTS) $(libsolo2_a_DEPENDENCIES) $(EXTRA_libsolo2_a_DEPENDENCIES) | ||
1420 | $(AM_V_at)-rm -f libsolo2.a | ||
1421 | $(AM_V_AR)$(libsolo2_a_AR) libsolo2.a $(libsolo2_a_OBJECTS) $(libsolo2_a_LIBADD) | ||
1422 | $(AM_V_at)$(RANLIB) libsolo2.a | ||
1423 | ./libtents3_a-tents.$(OBJEXT): ./$(am__dirstamp) \ | ||
1424 | $(DEPDIR)/$(am__dirstamp) | ||
1425 | |||
1426 | libtents3.a: $(libtents3_a_OBJECTS) $(libtents3_a_DEPENDENCIES) $(EXTRA_libtents3_a_DEPENDENCIES) | ||
1427 | $(AM_V_at)-rm -f libtents3.a | ||
1428 | $(AM_V_AR)$(libtents3_a_AR) libtents3.a $(libtents3_a_OBJECTS) $(libtents3_a_LIBADD) | ||
1429 | $(AM_V_at)$(RANLIB) libtents3.a | ||
1430 | ./libtowers2_a-towers.$(OBJEXT): ./$(am__dirstamp) \ | ||
1431 | $(DEPDIR)/$(am__dirstamp) | ||
1432 | |||
1433 | libtowers2.a: $(libtowers2_a_OBJECTS) $(libtowers2_a_DEPENDENCIES) $(EXTRA_libtowers2_a_DEPENDENCIES) | ||
1434 | $(AM_V_at)-rm -f libtowers2.a | ||
1435 | $(AM_V_AR)$(libtowers2_a_AR) libtowers2.a $(libtowers2_a_OBJECTS) $(libtowers2_a_LIBADD) | ||
1436 | $(AM_V_at)$(RANLIB) libtowers2.a | ||
1437 | ./libunequal2_a-unequal.$(OBJEXT): ./$(am__dirstamp) \ | ||
1438 | $(DEPDIR)/$(am__dirstamp) | ||
1439 | |||
1440 | libunequal2.a: $(libunequal2_a_OBJECTS) $(libunequal2_a_DEPENDENCIES) $(EXTRA_libunequal2_a_DEPENDENCIES) | ||
1441 | $(AM_V_at)-rm -f libunequal2.a | ||
1442 | $(AM_V_AR)$(libunequal2_a_AR) libunequal2.a $(libunequal2_a_OBJECTS) $(libunequal2_a_LIBADD) | ||
1443 | $(AM_V_at)$(RANLIB) libunequal2.a | ||
1444 | ./libunruly2_a-unruly.$(OBJEXT): ./$(am__dirstamp) \ | ||
1445 | $(DEPDIR)/$(am__dirstamp) | ||
1446 | |||
1447 | libunruly2.a: $(libunruly2_a_OBJECTS) $(libunruly2_a_DEPENDENCIES) $(EXTRA_libunruly2_a_DEPENDENCIES) | ||
1448 | $(AM_V_at)-rm -f libunruly2.a | ||
1449 | $(AM_V_AR)$(libunruly2_a_AR) libunruly2.a $(libunruly2_a_OBJECTS) $(libunruly2_a_LIBADD) | ||
1450 | $(AM_V_at)$(RANLIB) libunruly2.a | ||
1451 | install-binPROGRAMS: $(bin_PROGRAMS) | ||
1452 | @$(NORMAL_INSTALL) | ||
1453 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | ||
1454 | if test -n "$$list"; then \ | ||
1455 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ | ||
1456 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ | ||
1457 | fi; \ | ||
1458 | for p in $$list; do echo "$$p $$p"; done | \ | ||
1459 | sed 's/$(EXEEXT)$$//' | \ | ||
1460 | while read p p1; do if test -f $$p \ | ||
1461 | ; then echo "$$p"; echo "$$p"; else :; fi; \ | ||
1462 | done | \ | ||
1463 | sed -e 'p;s,.*/,,;n;h' \ | ||
1464 | -e 's|.*|.|' \ | ||
1465 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | ||
1466 | sed 'N;N;N;s,\n, ,g' | \ | ||
1467 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | ||
1468 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | ||
1469 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | ||
1470 | else { print "f", $$3 "/" $$4, $$1; } } \ | ||
1471 | END { for (d in files) print "f", d, files[d] }' | \ | ||
1472 | while read type dir files; do \ | ||
1473 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | ||
1474 | test -z "$$files" || { \ | ||
1475 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ | ||
1476 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ | ||
1477 | } \ | ||
1478 | ; done | ||
1479 | |||
1480 | uninstall-binPROGRAMS: | ||
1481 | @$(NORMAL_UNINSTALL) | ||
1482 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ | ||
1483 | files=`for p in $$list; do echo "$$p"; done | \ | ||
1484 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | ||
1485 | -e 's/$$/$(EXEEXT)/' \ | ||
1486 | `; \ | ||
1487 | test -n "$$list" || exit 0; \ | ||
1488 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ | ||
1489 | cd "$(DESTDIR)$(bindir)" && rm -f $$files | ||
1490 | |||
1491 | clean-binPROGRAMS: | ||
1492 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) | ||
1493 | |||
1494 | clean-noinstPROGRAMS: | ||
1495 | -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) | ||
1496 | ./blackbox.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1497 | ./drawing.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1498 | ./gtk.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1499 | ./malloc.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1500 | ./midend.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1501 | ./misc.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1502 | ./no-icon.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1503 | ./printing.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1504 | ./ps.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1505 | ./random.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1506 | ./version.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1507 | |||
1508 | blackbox$(EXEEXT): $(blackbox_OBJECTS) $(blackbox_DEPENDENCIES) $(EXTRA_blackbox_DEPENDENCIES) | ||
1509 | @rm -f blackbox$(EXEEXT) | ||
1510 | $(AM_V_CCLD)$(LINK) $(blackbox_OBJECTS) $(blackbox_LDADD) $(LIBS) | ||
1511 | ./bridges.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1512 | ./dsf.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1513 | ./findloop.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1514 | |||
1515 | bridges$(EXEEXT): $(bridges_OBJECTS) $(bridges_DEPENDENCIES) $(EXTRA_bridges_DEPENDENCIES) | ||
1516 | @rm -f bridges$(EXEEXT) | ||
1517 | $(AM_V_CCLD)$(LINK) $(bridges_OBJECTS) $(bridges_LDADD) $(LIBS) | ||
1518 | ./cube.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1519 | |||
1520 | cube$(EXEEXT): $(cube_OBJECTS) $(cube_DEPENDENCIES) $(EXTRA_cube_DEPENDENCIES) | ||
1521 | @rm -f cube$(EXEEXT) | ||
1522 | $(AM_V_CCLD)$(LINK) $(cube_OBJECTS) $(cube_LDADD) $(LIBS) | ||
1523 | ./dominosa.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1524 | ./laydomino.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1525 | |||
1526 | dominosa$(EXEEXT): $(dominosa_OBJECTS) $(dominosa_DEPENDENCIES) $(EXTRA_dominosa_DEPENDENCIES) | ||
1527 | @rm -f dominosa$(EXEEXT) | ||
1528 | $(AM_V_CCLD)$(LINK) $(dominosa_OBJECTS) $(dominosa_LDADD) $(LIBS) | ||
1529 | ./fifteen.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1530 | |||
1531 | fifteen$(EXEEXT): $(fifteen_OBJECTS) $(fifteen_DEPENDENCIES) $(EXTRA_fifteen_DEPENDENCIES) | ||
1532 | @rm -f fifteen$(EXEEXT) | ||
1533 | $(AM_V_CCLD)$(LINK) $(fifteen_OBJECTS) $(fifteen_LDADD) $(LIBS) | ||
1534 | ./nullfe.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1535 | |||
1536 | fifteensolver$(EXEEXT): $(fifteensolver_OBJECTS) $(fifteensolver_DEPENDENCIES) $(EXTRA_fifteensolver_DEPENDENCIES) | ||
1537 | @rm -f fifteensolver$(EXEEXT) | ||
1538 | $(AM_V_CCLD)$(LINK) $(fifteensolver_OBJECTS) $(fifteensolver_LDADD) $(LIBS) | ||
1539 | ./filling.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1540 | |||
1541 | filling$(EXEEXT): $(filling_OBJECTS) $(filling_DEPENDENCIES) $(EXTRA_filling_DEPENDENCIES) | ||
1542 | @rm -f filling$(EXEEXT) | ||
1543 | $(AM_V_CCLD)$(LINK) $(filling_OBJECTS) $(filling_LDADD) $(LIBS) | ||
1544 | |||
1545 | fillingsolver$(EXEEXT): $(fillingsolver_OBJECTS) $(fillingsolver_DEPENDENCIES) $(EXTRA_fillingsolver_DEPENDENCIES) | ||
1546 | @rm -f fillingsolver$(EXEEXT) | ||
1547 | $(AM_V_CCLD)$(LINK) $(fillingsolver_OBJECTS) $(fillingsolver_LDADD) $(LIBS) | ||
1548 | ./flip.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1549 | ./tree234.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1550 | |||
1551 | flip$(EXEEXT): $(flip_OBJECTS) $(flip_DEPENDENCIES) $(EXTRA_flip_DEPENDENCIES) | ||
1552 | @rm -f flip$(EXEEXT) | ||
1553 | $(AM_V_CCLD)$(LINK) $(flip_OBJECTS) $(flip_LDADD) $(LIBS) | ||
1554 | ./flood.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1555 | |||
1556 | flood$(EXEEXT): $(flood_OBJECTS) $(flood_DEPENDENCIES) $(EXTRA_flood_DEPENDENCIES) | ||
1557 | @rm -f flood$(EXEEXT) | ||
1558 | $(AM_V_CCLD)$(LINK) $(flood_OBJECTS) $(flood_LDADD) $(LIBS) | ||
1559 | ./galaxies.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1560 | |||
1561 | galaxies$(EXEEXT): $(galaxies_OBJECTS) $(galaxies_DEPENDENCIES) $(EXTRA_galaxies_DEPENDENCIES) | ||
1562 | @rm -f galaxies$(EXEEXT) | ||
1563 | $(AM_V_CCLD)$(LINK) $(galaxies_OBJECTS) $(galaxies_LDADD) $(LIBS) | ||
1564 | |||
1565 | galaxiespicture$(EXEEXT): $(galaxiespicture_OBJECTS) $(galaxiespicture_DEPENDENCIES) $(EXTRA_galaxiespicture_DEPENDENCIES) | ||
1566 | @rm -f galaxiespicture$(EXEEXT) | ||
1567 | $(AM_V_CCLD)$(LINK) $(galaxiespicture_OBJECTS) $(galaxiespicture_LDADD) $(LIBS) | ||
1568 | |||
1569 | galaxiessolver$(EXEEXT): $(galaxiessolver_OBJECTS) $(galaxiessolver_DEPENDENCIES) $(EXTRA_galaxiessolver_DEPENDENCIES) | ||
1570 | @rm -f galaxiessolver$(EXEEXT) | ||
1571 | $(AM_V_CCLD)$(LINK) $(galaxiessolver_OBJECTS) $(galaxiessolver_LDADD) $(LIBS) | ||
1572 | ./guess.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1573 | |||
1574 | guess$(EXEEXT): $(guess_OBJECTS) $(guess_DEPENDENCIES) $(EXTRA_guess_DEPENDENCIES) | ||
1575 | @rm -f guess$(EXEEXT) | ||
1576 | $(AM_V_CCLD)$(LINK) $(guess_OBJECTS) $(guess_LDADD) $(LIBS) | ||
1577 | ./inertia.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1578 | |||
1579 | inertia$(EXEEXT): $(inertia_OBJECTS) $(inertia_DEPENDENCIES) $(EXTRA_inertia_DEPENDENCIES) | ||
1580 | @rm -f inertia$(EXEEXT) | ||
1581 | $(AM_V_CCLD)$(LINK) $(inertia_OBJECTS) $(inertia_LDADD) $(LIBS) | ||
1582 | ./keen.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1583 | ./latin.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1584 | ./maxflow.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1585 | |||
1586 | keen$(EXEEXT): $(keen_OBJECTS) $(keen_DEPENDENCIES) $(EXTRA_keen_DEPENDENCIES) | ||
1587 | @rm -f keen$(EXEEXT) | ||
1588 | $(AM_V_CCLD)$(LINK) $(keen_OBJECTS) $(keen_LDADD) $(LIBS) | ||
1589 | |||
1590 | keensolver$(EXEEXT): $(keensolver_OBJECTS) $(keensolver_DEPENDENCIES) $(EXTRA_keensolver_DEPENDENCIES) | ||
1591 | @rm -f keensolver$(EXEEXT) | ||
1592 | $(AM_V_CCLD)$(LINK) $(keensolver_OBJECTS) $(keensolver_LDADD) $(LIBS) | ||
1593 | |||
1594 | latincheck$(EXEEXT): $(latincheck_OBJECTS) $(latincheck_DEPENDENCIES) $(EXTRA_latincheck_DEPENDENCIES) | ||
1595 | @rm -f latincheck$(EXEEXT) | ||
1596 | $(AM_V_CCLD)$(LINK) $(latincheck_OBJECTS) $(latincheck_LDADD) $(LIBS) | ||
1597 | ./combi.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1598 | ./lightup.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1599 | |||
1600 | lightup$(EXEEXT): $(lightup_OBJECTS) $(lightup_DEPENDENCIES) $(EXTRA_lightup_DEPENDENCIES) | ||
1601 | @rm -f lightup$(EXEEXT) | ||
1602 | $(AM_V_CCLD)$(LINK) $(lightup_OBJECTS) $(lightup_LDADD) $(LIBS) | ||
1603 | |||
1604 | lightupsolver$(EXEEXT): $(lightupsolver_OBJECTS) $(lightupsolver_DEPENDENCIES) $(EXTRA_lightupsolver_DEPENDENCIES) | ||
1605 | @rm -f lightupsolver$(EXEEXT) | ||
1606 | $(AM_V_CCLD)$(LINK) $(lightupsolver_OBJECTS) $(lightupsolver_LDADD) $(LIBS) | ||
1607 | ./grid.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1608 | ./loopgen.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1609 | ./loopy.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1610 | ./penrose.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1611 | |||
1612 | loopy$(EXEEXT): $(loopy_OBJECTS) $(loopy_DEPENDENCIES) $(EXTRA_loopy_DEPENDENCIES) | ||
1613 | @rm -f loopy$(EXEEXT) | ||
1614 | $(AM_V_CCLD)$(LINK) $(loopy_OBJECTS) $(loopy_LDADD) $(LIBS) | ||
1615 | |||
1616 | loopysolver$(EXEEXT): $(loopysolver_OBJECTS) $(loopysolver_DEPENDENCIES) $(EXTRA_loopysolver_DEPENDENCIES) | ||
1617 | @rm -f loopysolver$(EXEEXT) | ||
1618 | $(AM_V_CCLD)$(LINK) $(loopysolver_OBJECTS) $(loopysolver_LDADD) $(LIBS) | ||
1619 | ./magnets.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1620 | |||
1621 | magnets$(EXEEXT): $(magnets_OBJECTS) $(magnets_DEPENDENCIES) $(EXTRA_magnets_DEPENDENCIES) | ||
1622 | @rm -f magnets$(EXEEXT) | ||
1623 | $(AM_V_CCLD)$(LINK) $(magnets_OBJECTS) $(magnets_LDADD) $(LIBS) | ||
1624 | |||
1625 | magnetssolver$(EXEEXT): $(magnetssolver_OBJECTS) $(magnetssolver_DEPENDENCIES) $(EXTRA_magnetssolver_DEPENDENCIES) | ||
1626 | @rm -f magnetssolver$(EXEEXT) | ||
1627 | $(AM_V_CCLD)$(LINK) $(magnetssolver_OBJECTS) $(magnetssolver_LDADD) $(LIBS) | ||
1628 | ./map.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1629 | |||
1630 | map$(EXEEXT): $(map_OBJECTS) $(map_DEPENDENCIES) $(EXTRA_map_DEPENDENCIES) | ||
1631 | @rm -f map$(EXEEXT) | ||
1632 | $(AM_V_CCLD)$(LINK) $(map_OBJECTS) $(map_LDADD) $(LIBS) | ||
1633 | |||
1634 | mapsolver$(EXEEXT): $(mapsolver_OBJECTS) $(mapsolver_DEPENDENCIES) $(EXTRA_mapsolver_DEPENDENCIES) | ||
1635 | @rm -f mapsolver$(EXEEXT) | ||
1636 | $(AM_V_CCLD)$(LINK) $(mapsolver_OBJECTS) $(mapsolver_LDADD) $(LIBS) | ||
1637 | |||
1638 | mineobfusc$(EXEEXT): $(mineobfusc_OBJECTS) $(mineobfusc_DEPENDENCIES) $(EXTRA_mineobfusc_DEPENDENCIES) | ||
1639 | @rm -f mineobfusc$(EXEEXT) | ||
1640 | $(AM_V_CCLD)$(LINK) $(mineobfusc_OBJECTS) $(mineobfusc_LDADD) $(LIBS) | ||
1641 | ./mines.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1642 | |||
1643 | mines$(EXEEXT): $(mines_OBJECTS) $(mines_DEPENDENCIES) $(EXTRA_mines_DEPENDENCIES) | ||
1644 | @rm -f mines$(EXEEXT) | ||
1645 | $(AM_V_CCLD)$(LINK) $(mines_OBJECTS) $(mines_LDADD) $(LIBS) | ||
1646 | ./net.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1647 | |||
1648 | net$(EXEEXT): $(net_OBJECTS) $(net_DEPENDENCIES) $(EXTRA_net_DEPENDENCIES) | ||
1649 | @rm -f net$(EXEEXT) | ||
1650 | $(AM_V_CCLD)$(LINK) $(net_OBJECTS) $(net_LDADD) $(LIBS) | ||
1651 | ./netslide.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1652 | |||
1653 | netslide$(EXEEXT): $(netslide_OBJECTS) $(netslide_DEPENDENCIES) $(EXTRA_netslide_DEPENDENCIES) | ||
1654 | @rm -f netslide$(EXEEXT) | ||
1655 | $(AM_V_CCLD)$(LINK) $(netslide_OBJECTS) $(netslide_LDADD) $(LIBS) | ||
1656 | ./nullgame.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1657 | |||
1658 | nullgame$(EXEEXT): $(nullgame_OBJECTS) $(nullgame_DEPENDENCIES) $(EXTRA_nullgame_DEPENDENCIES) | ||
1659 | @rm -f nullgame$(EXEEXT) | ||
1660 | $(AM_V_CCLD)$(LINK) $(nullgame_OBJECTS) $(nullgame_LDADD) $(LIBS) | ||
1661 | ./obfusc.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1662 | |||
1663 | obfusc$(EXEEXT): $(obfusc_OBJECTS) $(obfusc_DEPENDENCIES) $(EXTRA_obfusc_DEPENDENCIES) | ||
1664 | @rm -f obfusc$(EXEEXT) | ||
1665 | $(AM_V_CCLD)$(LINK) $(obfusc_OBJECTS) $(obfusc_LDADD) $(LIBS) | ||
1666 | ./divvy.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1667 | ./palisade.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1668 | |||
1669 | palisade$(EXEEXT): $(palisade_OBJECTS) $(palisade_DEPENDENCIES) $(EXTRA_palisade_DEPENDENCIES) | ||
1670 | @rm -f palisade$(EXEEXT) | ||
1671 | $(AM_V_CCLD)$(LINK) $(palisade_OBJECTS) $(palisade_LDADD) $(LIBS) | ||
1672 | ./pattern.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1673 | |||
1674 | pattern$(EXEEXT): $(pattern_OBJECTS) $(pattern_DEPENDENCIES) $(EXTRA_pattern_DEPENDENCIES) | ||
1675 | @rm -f pattern$(EXEEXT) | ||
1676 | $(AM_V_CCLD)$(LINK) $(pattern_OBJECTS) $(pattern_LDADD) $(LIBS) | ||
1677 | |||
1678 | patternpicture$(EXEEXT): $(patternpicture_OBJECTS) $(patternpicture_DEPENDENCIES) $(EXTRA_patternpicture_DEPENDENCIES) | ||
1679 | @rm -f patternpicture$(EXEEXT) | ||
1680 | $(AM_V_CCLD)$(LINK) $(patternpicture_OBJECTS) $(patternpicture_LDADD) $(LIBS) | ||
1681 | |||
1682 | patternsolver$(EXEEXT): $(patternsolver_OBJECTS) $(patternsolver_DEPENDENCIES) $(EXTRA_patternsolver_DEPENDENCIES) | ||
1683 | @rm -f patternsolver$(EXEEXT) | ||
1684 | $(AM_V_CCLD)$(LINK) $(patternsolver_OBJECTS) $(patternsolver_LDADD) $(LIBS) | ||
1685 | ./pearl.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1686 | ./tdq.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1687 | |||
1688 | pearl$(EXEEXT): $(pearl_OBJECTS) $(pearl_DEPENDENCIES) $(EXTRA_pearl_DEPENDENCIES) | ||
1689 | @rm -f pearl$(EXEEXT) | ||
1690 | $(AM_V_CCLD)$(LINK) $(pearl_OBJECTS) $(pearl_LDADD) $(LIBS) | ||
1691 | |||
1692 | pearlbench$(EXEEXT): $(pearlbench_OBJECTS) $(pearlbench_DEPENDENCIES) $(EXTRA_pearlbench_DEPENDENCIES) | ||
1693 | @rm -f pearlbench$(EXEEXT) | ||
1694 | $(AM_V_CCLD)$(LINK) $(pearlbench_OBJECTS) $(pearlbench_LDADD) $(LIBS) | ||
1695 | ./pegs.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1696 | |||
1697 | pegs$(EXEEXT): $(pegs_OBJECTS) $(pegs_DEPENDENCIES) $(EXTRA_pegs_DEPENDENCIES) | ||
1698 | @rm -f pegs$(EXEEXT) | ||
1699 | $(AM_V_CCLD)$(LINK) $(pegs_OBJECTS) $(pegs_LDADD) $(LIBS) | ||
1700 | ./range.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1701 | |||
1702 | range$(EXEEXT): $(range_OBJECTS) $(range_DEPENDENCIES) $(EXTRA_range_DEPENDENCIES) | ||
1703 | @rm -f range$(EXEEXT) | ||
1704 | $(AM_V_CCLD)$(LINK) $(range_OBJECTS) $(range_LDADD) $(LIBS) | ||
1705 | ./rect.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1706 | |||
1707 | rect$(EXEEXT): $(rect_OBJECTS) $(rect_DEPENDENCIES) $(EXTRA_rect_DEPENDENCIES) | ||
1708 | @rm -f rect$(EXEEXT) | ||
1709 | $(AM_V_CCLD)$(LINK) $(rect_OBJECTS) $(rect_LDADD) $(LIBS) | ||
1710 | ./samegame.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1711 | |||
1712 | samegame$(EXEEXT): $(samegame_OBJECTS) $(samegame_DEPENDENCIES) $(EXTRA_samegame_DEPENDENCIES) | ||
1713 | @rm -f samegame$(EXEEXT) | ||
1714 | $(AM_V_CCLD)$(LINK) $(samegame_OBJECTS) $(samegame_LDADD) $(LIBS) | ||
1715 | ./signpost.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1716 | |||
1717 | signpost$(EXEEXT): $(signpost_OBJECTS) $(signpost_DEPENDENCIES) $(EXTRA_signpost_DEPENDENCIES) | ||
1718 | @rm -f signpost$(EXEEXT) | ||
1719 | $(AM_V_CCLD)$(LINK) $(signpost_OBJECTS) $(signpost_LDADD) $(LIBS) | ||
1720 | |||
1721 | signpostsolver$(EXEEXT): $(signpostsolver_OBJECTS) $(signpostsolver_DEPENDENCIES) $(EXTRA_signpostsolver_DEPENDENCIES) | ||
1722 | @rm -f signpostsolver$(EXEEXT) | ||
1723 | $(AM_V_CCLD)$(LINK) $(signpostsolver_OBJECTS) $(signpostsolver_LDADD) $(LIBS) | ||
1724 | ./singles.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1725 | |||
1726 | singles$(EXEEXT): $(singles_OBJECTS) $(singles_DEPENDENCIES) $(EXTRA_singles_DEPENDENCIES) | ||
1727 | @rm -f singles$(EXEEXT) | ||
1728 | $(AM_V_CCLD)$(LINK) $(singles_OBJECTS) $(singles_LDADD) $(LIBS) | ||
1729 | |||
1730 | singlessolver$(EXEEXT): $(singlessolver_OBJECTS) $(singlessolver_DEPENDENCIES) $(EXTRA_singlessolver_DEPENDENCIES) | ||
1731 | @rm -f singlessolver$(EXEEXT) | ||
1732 | $(AM_V_CCLD)$(LINK) $(singlessolver_OBJECTS) $(singlessolver_LDADD) $(LIBS) | ||
1733 | ./sixteen.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1734 | |||
1735 | sixteen$(EXEEXT): $(sixteen_OBJECTS) $(sixteen_DEPENDENCIES) $(EXTRA_sixteen_DEPENDENCIES) | ||
1736 | @rm -f sixteen$(EXEEXT) | ||
1737 | $(AM_V_CCLD)$(LINK) $(sixteen_OBJECTS) $(sixteen_LDADD) $(LIBS) | ||
1738 | ./slant.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1739 | |||
1740 | slant$(EXEEXT): $(slant_OBJECTS) $(slant_DEPENDENCIES) $(EXTRA_slant_DEPENDENCIES) | ||
1741 | @rm -f slant$(EXEEXT) | ||
1742 | $(AM_V_CCLD)$(LINK) $(slant_OBJECTS) $(slant_LDADD) $(LIBS) | ||
1743 | |||
1744 | slantsolver$(EXEEXT): $(slantsolver_OBJECTS) $(slantsolver_DEPENDENCIES) $(EXTRA_slantsolver_DEPENDENCIES) | ||
1745 | @rm -f slantsolver$(EXEEXT) | ||
1746 | $(AM_V_CCLD)$(LINK) $(slantsolver_OBJECTS) $(slantsolver_LDADD) $(LIBS) | ||
1747 | ./solo.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1748 | |||
1749 | solo$(EXEEXT): $(solo_OBJECTS) $(solo_DEPENDENCIES) $(EXTRA_solo_DEPENDENCIES) | ||
1750 | @rm -f solo$(EXEEXT) | ||
1751 | $(AM_V_CCLD)$(LINK) $(solo_OBJECTS) $(solo_LDADD) $(LIBS) | ||
1752 | |||
1753 | solosolver$(EXEEXT): $(solosolver_OBJECTS) $(solosolver_DEPENDENCIES) $(EXTRA_solosolver_DEPENDENCIES) | ||
1754 | @rm -f solosolver$(EXEEXT) | ||
1755 | $(AM_V_CCLD)$(LINK) $(solosolver_OBJECTS) $(solosolver_LDADD) $(LIBS) | ||
1756 | ./tents.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1757 | |||
1758 | tents$(EXEEXT): $(tents_OBJECTS) $(tents_DEPENDENCIES) $(EXTRA_tents_DEPENDENCIES) | ||
1759 | @rm -f tents$(EXEEXT) | ||
1760 | $(AM_V_CCLD)$(LINK) $(tents_OBJECTS) $(tents_LDADD) $(LIBS) | ||
1761 | |||
1762 | tentssolver$(EXEEXT): $(tentssolver_OBJECTS) $(tentssolver_DEPENDENCIES) $(EXTRA_tentssolver_DEPENDENCIES) | ||
1763 | @rm -f tentssolver$(EXEEXT) | ||
1764 | $(AM_V_CCLD)$(LINK) $(tentssolver_OBJECTS) $(tentssolver_LDADD) $(LIBS) | ||
1765 | ./towers.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1766 | |||
1767 | towers$(EXEEXT): $(towers_OBJECTS) $(towers_DEPENDENCIES) $(EXTRA_towers_DEPENDENCIES) | ||
1768 | @rm -f towers$(EXEEXT) | ||
1769 | $(AM_V_CCLD)$(LINK) $(towers_OBJECTS) $(towers_LDADD) $(LIBS) | ||
1770 | |||
1771 | towerssolver$(EXEEXT): $(towerssolver_OBJECTS) $(towerssolver_DEPENDENCIES) $(EXTRA_towerssolver_DEPENDENCIES) | ||
1772 | @rm -f towerssolver$(EXEEXT) | ||
1773 | $(AM_V_CCLD)$(LINK) $(towerssolver_OBJECTS) $(towerssolver_LDADD) $(LIBS) | ||
1774 | ./tracks.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1775 | |||
1776 | tracks$(EXEEXT): $(tracks_OBJECTS) $(tracks_DEPENDENCIES) $(EXTRA_tracks_DEPENDENCIES) | ||
1777 | @rm -f tracks$(EXEEXT) | ||
1778 | $(AM_V_CCLD)$(LINK) $(tracks_OBJECTS) $(tracks_LDADD) $(LIBS) | ||
1779 | ./twiddle.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1780 | |||
1781 | twiddle$(EXEEXT): $(twiddle_OBJECTS) $(twiddle_DEPENDENCIES) $(EXTRA_twiddle_DEPENDENCIES) | ||
1782 | @rm -f twiddle$(EXEEXT) | ||
1783 | $(AM_V_CCLD)$(LINK) $(twiddle_OBJECTS) $(twiddle_LDADD) $(LIBS) | ||
1784 | ./undead.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1785 | |||
1786 | undead$(EXEEXT): $(undead_OBJECTS) $(undead_DEPENDENCIES) $(EXTRA_undead_DEPENDENCIES) | ||
1787 | @rm -f undead$(EXEEXT) | ||
1788 | $(AM_V_CCLD)$(LINK) $(undead_OBJECTS) $(undead_LDADD) $(LIBS) | ||
1789 | ./unequal.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1790 | |||
1791 | unequal$(EXEEXT): $(unequal_OBJECTS) $(unequal_DEPENDENCIES) $(EXTRA_unequal_DEPENDENCIES) | ||
1792 | @rm -f unequal$(EXEEXT) | ||
1793 | $(AM_V_CCLD)$(LINK) $(unequal_OBJECTS) $(unequal_LDADD) $(LIBS) | ||
1794 | |||
1795 | unequalsolver$(EXEEXT): $(unequalsolver_OBJECTS) $(unequalsolver_DEPENDENCIES) $(EXTRA_unequalsolver_DEPENDENCIES) | ||
1796 | @rm -f unequalsolver$(EXEEXT) | ||
1797 | $(AM_V_CCLD)$(LINK) $(unequalsolver_OBJECTS) $(unequalsolver_LDADD) $(LIBS) | ||
1798 | ./unruly.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1799 | |||
1800 | unruly$(EXEEXT): $(unruly_OBJECTS) $(unruly_DEPENDENCIES) $(EXTRA_unruly_DEPENDENCIES) | ||
1801 | @rm -f unruly$(EXEEXT) | ||
1802 | $(AM_V_CCLD)$(LINK) $(unruly_OBJECTS) $(unruly_LDADD) $(LIBS) | ||
1803 | |||
1804 | unrulysolver$(EXEEXT): $(unrulysolver_OBJECTS) $(unrulysolver_DEPENDENCIES) $(EXTRA_unrulysolver_DEPENDENCIES) | ||
1805 | @rm -f unrulysolver$(EXEEXT) | ||
1806 | $(AM_V_CCLD)$(LINK) $(unrulysolver_OBJECTS) $(unrulysolver_LDADD) $(LIBS) | ||
1807 | ./untangle.$(OBJEXT): ./$(am__dirstamp) $(DEPDIR)/$(am__dirstamp) | ||
1808 | |||
1809 | untangle$(EXEEXT): $(untangle_OBJECTS) $(untangle_DEPENDENCIES) $(EXTRA_untangle_DEPENDENCIES) | ||
1810 | @rm -f untangle$(EXEEXT) | ||
1811 | $(AM_V_CCLD)$(LINK) $(untangle_OBJECTS) $(untangle_LDADD) $(LIBS) | ||
1812 | |||
1813 | mostlyclean-compile: | ||
1814 | -rm -f *.$(OBJEXT) | ||
1815 | -rm -f ./*.$(OBJEXT) | ||
1816 | |||
1817 | distclean-compile: | ||
1818 | -rm -f *.tab.c | ||
1819 | |||
1820 | include ./$(DEPDIR)/blackbox.Po | ||
1821 | include ./$(DEPDIR)/bridges.Po | ||
1822 | include ./$(DEPDIR)/combi.Po | ||
1823 | include ./$(DEPDIR)/cube.Po | ||
1824 | include ./$(DEPDIR)/divvy.Po | ||
1825 | include ./$(DEPDIR)/dominosa.Po | ||
1826 | include ./$(DEPDIR)/drawing.Po | ||
1827 | include ./$(DEPDIR)/dsf.Po | ||
1828 | include ./$(DEPDIR)/fifteen.Po | ||
1829 | include ./$(DEPDIR)/filling.Po | ||
1830 | include ./$(DEPDIR)/findloop.Po | ||
1831 | include ./$(DEPDIR)/flip.Po | ||
1832 | include ./$(DEPDIR)/flood.Po | ||
1833 | include ./$(DEPDIR)/galaxies.Po | ||
1834 | include ./$(DEPDIR)/grid.Po | ||
1835 | include ./$(DEPDIR)/gtk.Po | ||
1836 | include ./$(DEPDIR)/guess.Po | ||
1837 | include ./$(DEPDIR)/inertia.Po | ||
1838 | include ./$(DEPDIR)/keen.Po | ||
1839 | include ./$(DEPDIR)/latin.Po | ||
1840 | include ./$(DEPDIR)/laydomino.Po | ||
1841 | include ./$(DEPDIR)/libfifteen2_a-fifteen.Po | ||
1842 | include ./$(DEPDIR)/libfilling2_a-filling.Po | ||
1843 | include ./$(DEPDIR)/libgalaxie2_a-galaxies.Po | ||
1844 | include ./$(DEPDIR)/libgalaxie4_a-galaxies.Po | ||
1845 | include ./$(DEPDIR)/libkeen2_a-keen.Po | ||
1846 | include ./$(DEPDIR)/liblatin6_a-latin.Po | ||
1847 | include ./$(DEPDIR)/liblatin8_a-latin.Po | ||
1848 | include ./$(DEPDIR)/liblightup2_a-lightup.Po | ||
1849 | include ./$(DEPDIR)/libloopy2_a-loopy.Po | ||
1850 | include ./$(DEPDIR)/libmagnets2_a-magnets.Po | ||
1851 | include ./$(DEPDIR)/libmap2_a-map.Po | ||
1852 | include ./$(DEPDIR)/libmines2_a-mines.Po | ||
1853 | include ./$(DEPDIR)/libpattern2_a-pattern.Po | ||
1854 | include ./$(DEPDIR)/libpattern4_a-pattern.Po | ||
1855 | include ./$(DEPDIR)/libpearl2_a-pearl.Po | ||
1856 | include ./$(DEPDIR)/libsignpos2_a-signpost.Po | ||
1857 | include ./$(DEPDIR)/libsingles3_a-singles.Po | ||
1858 | include ./$(DEPDIR)/libslant2_a-slant.Po | ||
1859 | include ./$(DEPDIR)/libsolo2_a-solo.Po | ||
1860 | include ./$(DEPDIR)/libtents3_a-tents.Po | ||
1861 | include ./$(DEPDIR)/libtowers2_a-towers.Po | ||
1862 | include ./$(DEPDIR)/libunequal2_a-unequal.Po | ||
1863 | include ./$(DEPDIR)/libunruly2_a-unruly.Po | ||
1864 | include ./$(DEPDIR)/lightup.Po | ||
1865 | include ./$(DEPDIR)/loopgen.Po | ||
1866 | include ./$(DEPDIR)/loopy.Po | ||
1867 | include ./$(DEPDIR)/magnets.Po | ||
1868 | include ./$(DEPDIR)/malloc.Po | ||
1869 | include ./$(DEPDIR)/map.Po | ||
1870 | include ./$(DEPDIR)/maxflow.Po | ||
1871 | include ./$(DEPDIR)/midend.Po | ||
1872 | include ./$(DEPDIR)/mines.Po | ||
1873 | include ./$(DEPDIR)/misc.Po | ||
1874 | include ./$(DEPDIR)/net.Po | ||
1875 | include ./$(DEPDIR)/netslide.Po | ||
1876 | include ./$(DEPDIR)/no-icon.Po | ||
1877 | include ./$(DEPDIR)/nullfe.Po | ||
1878 | include ./$(DEPDIR)/nullgame.Po | ||
1879 | include ./$(DEPDIR)/obfusc.Po | ||
1880 | include ./$(DEPDIR)/palisade.Po | ||
1881 | include ./$(DEPDIR)/pattern.Po | ||
1882 | include ./$(DEPDIR)/pearl.Po | ||
1883 | include ./$(DEPDIR)/pegs.Po | ||
1884 | include ./$(DEPDIR)/penrose.Po | ||
1885 | include ./$(DEPDIR)/printing.Po | ||
1886 | include ./$(DEPDIR)/ps.Po | ||
1887 | include ./$(DEPDIR)/random.Po | ||
1888 | include ./$(DEPDIR)/range.Po | ||
1889 | include ./$(DEPDIR)/rect.Po | ||
1890 | include ./$(DEPDIR)/samegame.Po | ||
1891 | include ./$(DEPDIR)/signpost.Po | ||
1892 | include ./$(DEPDIR)/singles.Po | ||
1893 | include ./$(DEPDIR)/sixteen.Po | ||
1894 | include ./$(DEPDIR)/slant.Po | ||
1895 | include ./$(DEPDIR)/solo.Po | ||
1896 | include ./$(DEPDIR)/tdq.Po | ||
1897 | include ./$(DEPDIR)/tents.Po | ||
1898 | include ./$(DEPDIR)/towers.Po | ||
1899 | include ./$(DEPDIR)/tracks.Po | ||
1900 | include ./$(DEPDIR)/tree234.Po | ||
1901 | include ./$(DEPDIR)/twiddle.Po | ||
1902 | include ./$(DEPDIR)/undead.Po | ||
1903 | include ./$(DEPDIR)/unequal.Po | ||
1904 | include ./$(DEPDIR)/unruly.Po | ||
1905 | include ./$(DEPDIR)/untangle.Po | ||
1906 | include ./$(DEPDIR)/version.Po | ||
1907 | |||
1908 | .c.o: | ||
1909 | $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ | ||
1910 | $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ | ||
1911 | $(am__mv) $$depbase.Tpo $$depbase.Po | ||
1912 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ | ||
1913 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1914 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ $< | ||
1915 | |||
1916 | .c.obj: | ||
1917 | $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ | ||
1918 | $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ | ||
1919 | $(am__mv) $$depbase.Tpo $$depbase.Po | ||
1920 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ | ||
1921 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1922 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` | ||
1923 | |||
1924 | ./libfifteen2_a-fifteen.o: ./fifteen.c | ||
1925 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfifteen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libfifteen2_a-fifteen.o -MD -MP -MF $(DEPDIR)/libfifteen2_a-fifteen.Tpo -c -o ./libfifteen2_a-fifteen.o `test -f './fifteen.c' || echo '$(srcdir)/'`./fifteen.c | ||
1926 | $(AM_V_at)$(am__mv) $(DEPDIR)/libfifteen2_a-fifteen.Tpo $(DEPDIR)/libfifteen2_a-fifteen.Po | ||
1927 | # $(AM_V_CC)source='./fifteen.c' object='./libfifteen2_a-fifteen.o' libtool=no \ | ||
1928 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1929 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfifteen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libfifteen2_a-fifteen.o `test -f './fifteen.c' || echo '$(srcdir)/'`./fifteen.c | ||
1930 | |||
1931 | ./libfifteen2_a-fifteen.obj: ./fifteen.c | ||
1932 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfifteen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libfifteen2_a-fifteen.obj -MD -MP -MF $(DEPDIR)/libfifteen2_a-fifteen.Tpo -c -o ./libfifteen2_a-fifteen.obj `if test -f './fifteen.c'; then $(CYGPATH_W) './fifteen.c'; else $(CYGPATH_W) '$(srcdir)/./fifteen.c'; fi` | ||
1933 | $(AM_V_at)$(am__mv) $(DEPDIR)/libfifteen2_a-fifteen.Tpo $(DEPDIR)/libfifteen2_a-fifteen.Po | ||
1934 | # $(AM_V_CC)source='./fifteen.c' object='./libfifteen2_a-fifteen.obj' libtool=no \ | ||
1935 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1936 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfifteen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libfifteen2_a-fifteen.obj `if test -f './fifteen.c'; then $(CYGPATH_W) './fifteen.c'; else $(CYGPATH_W) '$(srcdir)/./fifteen.c'; fi` | ||
1937 | |||
1938 | ./libfilling2_a-filling.o: ./filling.c | ||
1939 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfilling2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libfilling2_a-filling.o -MD -MP -MF $(DEPDIR)/libfilling2_a-filling.Tpo -c -o ./libfilling2_a-filling.o `test -f './filling.c' || echo '$(srcdir)/'`./filling.c | ||
1940 | $(AM_V_at)$(am__mv) $(DEPDIR)/libfilling2_a-filling.Tpo $(DEPDIR)/libfilling2_a-filling.Po | ||
1941 | # $(AM_V_CC)source='./filling.c' object='./libfilling2_a-filling.o' libtool=no \ | ||
1942 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1943 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfilling2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libfilling2_a-filling.o `test -f './filling.c' || echo '$(srcdir)/'`./filling.c | ||
1944 | |||
1945 | ./libfilling2_a-filling.obj: ./filling.c | ||
1946 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfilling2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libfilling2_a-filling.obj -MD -MP -MF $(DEPDIR)/libfilling2_a-filling.Tpo -c -o ./libfilling2_a-filling.obj `if test -f './filling.c'; then $(CYGPATH_W) './filling.c'; else $(CYGPATH_W) '$(srcdir)/./filling.c'; fi` | ||
1947 | $(AM_V_at)$(am__mv) $(DEPDIR)/libfilling2_a-filling.Tpo $(DEPDIR)/libfilling2_a-filling.Po | ||
1948 | # $(AM_V_CC)source='./filling.c' object='./libfilling2_a-filling.obj' libtool=no \ | ||
1949 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1950 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfilling2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libfilling2_a-filling.obj `if test -f './filling.c'; then $(CYGPATH_W) './filling.c'; else $(CYGPATH_W) '$(srcdir)/./filling.c'; fi` | ||
1951 | |||
1952 | ./libgalaxie2_a-galaxies.o: ./galaxies.c | ||
1953 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libgalaxie2_a-galaxies.o -MD -MP -MF $(DEPDIR)/libgalaxie2_a-galaxies.Tpo -c -o ./libgalaxie2_a-galaxies.o `test -f './galaxies.c' || echo '$(srcdir)/'`./galaxies.c | ||
1954 | $(AM_V_at)$(am__mv) $(DEPDIR)/libgalaxie2_a-galaxies.Tpo $(DEPDIR)/libgalaxie2_a-galaxies.Po | ||
1955 | # $(AM_V_CC)source='./galaxies.c' object='./libgalaxie2_a-galaxies.o' libtool=no \ | ||
1956 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1957 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libgalaxie2_a-galaxies.o `test -f './galaxies.c' || echo '$(srcdir)/'`./galaxies.c | ||
1958 | |||
1959 | ./libgalaxie2_a-galaxies.obj: ./galaxies.c | ||
1960 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libgalaxie2_a-galaxies.obj -MD -MP -MF $(DEPDIR)/libgalaxie2_a-galaxies.Tpo -c -o ./libgalaxie2_a-galaxies.obj `if test -f './galaxies.c'; then $(CYGPATH_W) './galaxies.c'; else $(CYGPATH_W) '$(srcdir)/./galaxies.c'; fi` | ||
1961 | $(AM_V_at)$(am__mv) $(DEPDIR)/libgalaxie2_a-galaxies.Tpo $(DEPDIR)/libgalaxie2_a-galaxies.Po | ||
1962 | # $(AM_V_CC)source='./galaxies.c' object='./libgalaxie2_a-galaxies.obj' libtool=no \ | ||
1963 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1964 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libgalaxie2_a-galaxies.obj `if test -f './galaxies.c'; then $(CYGPATH_W) './galaxies.c'; else $(CYGPATH_W) '$(srcdir)/./galaxies.c'; fi` | ||
1965 | |||
1966 | ./libgalaxie4_a-galaxies.o: ./galaxies.c | ||
1967 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libgalaxie4_a-galaxies.o -MD -MP -MF $(DEPDIR)/libgalaxie4_a-galaxies.Tpo -c -o ./libgalaxie4_a-galaxies.o `test -f './galaxies.c' || echo '$(srcdir)/'`./galaxies.c | ||
1968 | $(AM_V_at)$(am__mv) $(DEPDIR)/libgalaxie4_a-galaxies.Tpo $(DEPDIR)/libgalaxie4_a-galaxies.Po | ||
1969 | # $(AM_V_CC)source='./galaxies.c' object='./libgalaxie4_a-galaxies.o' libtool=no \ | ||
1970 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1971 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libgalaxie4_a-galaxies.o `test -f './galaxies.c' || echo '$(srcdir)/'`./galaxies.c | ||
1972 | |||
1973 | ./libgalaxie4_a-galaxies.obj: ./galaxies.c | ||
1974 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libgalaxie4_a-galaxies.obj -MD -MP -MF $(DEPDIR)/libgalaxie4_a-galaxies.Tpo -c -o ./libgalaxie4_a-galaxies.obj `if test -f './galaxies.c'; then $(CYGPATH_W) './galaxies.c'; else $(CYGPATH_W) '$(srcdir)/./galaxies.c'; fi` | ||
1975 | $(AM_V_at)$(am__mv) $(DEPDIR)/libgalaxie4_a-galaxies.Tpo $(DEPDIR)/libgalaxie4_a-galaxies.Po | ||
1976 | # $(AM_V_CC)source='./galaxies.c' object='./libgalaxie4_a-galaxies.obj' libtool=no \ | ||
1977 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1978 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgalaxie4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libgalaxie4_a-galaxies.obj `if test -f './galaxies.c'; then $(CYGPATH_W) './galaxies.c'; else $(CYGPATH_W) '$(srcdir)/./galaxies.c'; fi` | ||
1979 | |||
1980 | ./libkeen2_a-keen.o: ./keen.c | ||
1981 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libkeen2_a-keen.o -MD -MP -MF $(DEPDIR)/libkeen2_a-keen.Tpo -c -o ./libkeen2_a-keen.o `test -f './keen.c' || echo '$(srcdir)/'`./keen.c | ||
1982 | $(AM_V_at)$(am__mv) $(DEPDIR)/libkeen2_a-keen.Tpo $(DEPDIR)/libkeen2_a-keen.Po | ||
1983 | # $(AM_V_CC)source='./keen.c' object='./libkeen2_a-keen.o' libtool=no \ | ||
1984 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1985 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libkeen2_a-keen.o `test -f './keen.c' || echo '$(srcdir)/'`./keen.c | ||
1986 | |||
1987 | ./libkeen2_a-keen.obj: ./keen.c | ||
1988 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libkeen2_a-keen.obj -MD -MP -MF $(DEPDIR)/libkeen2_a-keen.Tpo -c -o ./libkeen2_a-keen.obj `if test -f './keen.c'; then $(CYGPATH_W) './keen.c'; else $(CYGPATH_W) '$(srcdir)/./keen.c'; fi` | ||
1989 | $(AM_V_at)$(am__mv) $(DEPDIR)/libkeen2_a-keen.Tpo $(DEPDIR)/libkeen2_a-keen.Po | ||
1990 | # $(AM_V_CC)source='./keen.c' object='./libkeen2_a-keen.obj' libtool=no \ | ||
1991 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1992 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkeen2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libkeen2_a-keen.obj `if test -f './keen.c'; then $(CYGPATH_W) './keen.c'; else $(CYGPATH_W) '$(srcdir)/./keen.c'; fi` | ||
1993 | |||
1994 | ./liblatin6_a-latin.o: ./latin.c | ||
1995 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin6_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblatin6_a-latin.o -MD -MP -MF $(DEPDIR)/liblatin6_a-latin.Tpo -c -o ./liblatin6_a-latin.o `test -f './latin.c' || echo '$(srcdir)/'`./latin.c | ||
1996 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblatin6_a-latin.Tpo $(DEPDIR)/liblatin6_a-latin.Po | ||
1997 | # $(AM_V_CC)source='./latin.c' object='./liblatin6_a-latin.o' libtool=no \ | ||
1998 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
1999 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin6_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblatin6_a-latin.o `test -f './latin.c' || echo '$(srcdir)/'`./latin.c | ||
2000 | |||
2001 | ./liblatin6_a-latin.obj: ./latin.c | ||
2002 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin6_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblatin6_a-latin.obj -MD -MP -MF $(DEPDIR)/liblatin6_a-latin.Tpo -c -o ./liblatin6_a-latin.obj `if test -f './latin.c'; then $(CYGPATH_W) './latin.c'; else $(CYGPATH_W) '$(srcdir)/./latin.c'; fi` | ||
2003 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblatin6_a-latin.Tpo $(DEPDIR)/liblatin6_a-latin.Po | ||
2004 | # $(AM_V_CC)source='./latin.c' object='./liblatin6_a-latin.obj' libtool=no \ | ||
2005 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2006 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin6_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblatin6_a-latin.obj `if test -f './latin.c'; then $(CYGPATH_W) './latin.c'; else $(CYGPATH_W) '$(srcdir)/./latin.c'; fi` | ||
2007 | |||
2008 | ./liblatin8_a-latin.o: ./latin.c | ||
2009 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin8_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblatin8_a-latin.o -MD -MP -MF $(DEPDIR)/liblatin8_a-latin.Tpo -c -o ./liblatin8_a-latin.o `test -f './latin.c' || echo '$(srcdir)/'`./latin.c | ||
2010 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblatin8_a-latin.Tpo $(DEPDIR)/liblatin8_a-latin.Po | ||
2011 | # $(AM_V_CC)source='./latin.c' object='./liblatin8_a-latin.o' libtool=no \ | ||
2012 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2013 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin8_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblatin8_a-latin.o `test -f './latin.c' || echo '$(srcdir)/'`./latin.c | ||
2014 | |||
2015 | ./liblatin8_a-latin.obj: ./latin.c | ||
2016 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin8_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblatin8_a-latin.obj -MD -MP -MF $(DEPDIR)/liblatin8_a-latin.Tpo -c -o ./liblatin8_a-latin.obj `if test -f './latin.c'; then $(CYGPATH_W) './latin.c'; else $(CYGPATH_W) '$(srcdir)/./latin.c'; fi` | ||
2017 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblatin8_a-latin.Tpo $(DEPDIR)/liblatin8_a-latin.Po | ||
2018 | # $(AM_V_CC)source='./latin.c' object='./liblatin8_a-latin.obj' libtool=no \ | ||
2019 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2020 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblatin8_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblatin8_a-latin.obj `if test -f './latin.c'; then $(CYGPATH_W) './latin.c'; else $(CYGPATH_W) '$(srcdir)/./latin.c'; fi` | ||
2021 | |||
2022 | ./liblightup2_a-lightup.o: ./lightup.c | ||
2023 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblightup2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblightup2_a-lightup.o -MD -MP -MF $(DEPDIR)/liblightup2_a-lightup.Tpo -c -o ./liblightup2_a-lightup.o `test -f './lightup.c' || echo '$(srcdir)/'`./lightup.c | ||
2024 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblightup2_a-lightup.Tpo $(DEPDIR)/liblightup2_a-lightup.Po | ||
2025 | # $(AM_V_CC)source='./lightup.c' object='./liblightup2_a-lightup.o' libtool=no \ | ||
2026 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2027 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblightup2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblightup2_a-lightup.o `test -f './lightup.c' || echo '$(srcdir)/'`./lightup.c | ||
2028 | |||
2029 | ./liblightup2_a-lightup.obj: ./lightup.c | ||
2030 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblightup2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./liblightup2_a-lightup.obj -MD -MP -MF $(DEPDIR)/liblightup2_a-lightup.Tpo -c -o ./liblightup2_a-lightup.obj `if test -f './lightup.c'; then $(CYGPATH_W) './lightup.c'; else $(CYGPATH_W) '$(srcdir)/./lightup.c'; fi` | ||
2031 | $(AM_V_at)$(am__mv) $(DEPDIR)/liblightup2_a-lightup.Tpo $(DEPDIR)/liblightup2_a-lightup.Po | ||
2032 | # $(AM_V_CC)source='./lightup.c' object='./liblightup2_a-lightup.obj' libtool=no \ | ||
2033 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2034 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblightup2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./liblightup2_a-lightup.obj `if test -f './lightup.c'; then $(CYGPATH_W) './lightup.c'; else $(CYGPATH_W) '$(srcdir)/./lightup.c'; fi` | ||
2035 | |||
2036 | ./libloopy2_a-loopy.o: ./loopy.c | ||
2037 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libloopy2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libloopy2_a-loopy.o -MD -MP -MF $(DEPDIR)/libloopy2_a-loopy.Tpo -c -o ./libloopy2_a-loopy.o `test -f './loopy.c' || echo '$(srcdir)/'`./loopy.c | ||
2038 | $(AM_V_at)$(am__mv) $(DEPDIR)/libloopy2_a-loopy.Tpo $(DEPDIR)/libloopy2_a-loopy.Po | ||
2039 | # $(AM_V_CC)source='./loopy.c' object='./libloopy2_a-loopy.o' libtool=no \ | ||
2040 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2041 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libloopy2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libloopy2_a-loopy.o `test -f './loopy.c' || echo '$(srcdir)/'`./loopy.c | ||
2042 | |||
2043 | ./libloopy2_a-loopy.obj: ./loopy.c | ||
2044 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libloopy2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libloopy2_a-loopy.obj -MD -MP -MF $(DEPDIR)/libloopy2_a-loopy.Tpo -c -o ./libloopy2_a-loopy.obj `if test -f './loopy.c'; then $(CYGPATH_W) './loopy.c'; else $(CYGPATH_W) '$(srcdir)/./loopy.c'; fi` | ||
2045 | $(AM_V_at)$(am__mv) $(DEPDIR)/libloopy2_a-loopy.Tpo $(DEPDIR)/libloopy2_a-loopy.Po | ||
2046 | # $(AM_V_CC)source='./loopy.c' object='./libloopy2_a-loopy.obj' libtool=no \ | ||
2047 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2048 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libloopy2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libloopy2_a-loopy.obj `if test -f './loopy.c'; then $(CYGPATH_W) './loopy.c'; else $(CYGPATH_W) '$(srcdir)/./loopy.c'; fi` | ||
2049 | |||
2050 | ./libmagnets2_a-magnets.o: ./magnets.c | ||
2051 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmagnets2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmagnets2_a-magnets.o -MD -MP -MF $(DEPDIR)/libmagnets2_a-magnets.Tpo -c -o ./libmagnets2_a-magnets.o `test -f './magnets.c' || echo '$(srcdir)/'`./magnets.c | ||
2052 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmagnets2_a-magnets.Tpo $(DEPDIR)/libmagnets2_a-magnets.Po | ||
2053 | # $(AM_V_CC)source='./magnets.c' object='./libmagnets2_a-magnets.o' libtool=no \ | ||
2054 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2055 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmagnets2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmagnets2_a-magnets.o `test -f './magnets.c' || echo '$(srcdir)/'`./magnets.c | ||
2056 | |||
2057 | ./libmagnets2_a-magnets.obj: ./magnets.c | ||
2058 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmagnets2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmagnets2_a-magnets.obj -MD -MP -MF $(DEPDIR)/libmagnets2_a-magnets.Tpo -c -o ./libmagnets2_a-magnets.obj `if test -f './magnets.c'; then $(CYGPATH_W) './magnets.c'; else $(CYGPATH_W) '$(srcdir)/./magnets.c'; fi` | ||
2059 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmagnets2_a-magnets.Tpo $(DEPDIR)/libmagnets2_a-magnets.Po | ||
2060 | # $(AM_V_CC)source='./magnets.c' object='./libmagnets2_a-magnets.obj' libtool=no \ | ||
2061 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2062 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmagnets2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmagnets2_a-magnets.obj `if test -f './magnets.c'; then $(CYGPATH_W) './magnets.c'; else $(CYGPATH_W) '$(srcdir)/./magnets.c'; fi` | ||
2063 | |||
2064 | ./libmap2_a-map.o: ./map.c | ||
2065 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmap2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmap2_a-map.o -MD -MP -MF $(DEPDIR)/libmap2_a-map.Tpo -c -o ./libmap2_a-map.o `test -f './map.c' || echo '$(srcdir)/'`./map.c | ||
2066 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmap2_a-map.Tpo $(DEPDIR)/libmap2_a-map.Po | ||
2067 | # $(AM_V_CC)source='./map.c' object='./libmap2_a-map.o' libtool=no \ | ||
2068 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2069 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmap2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmap2_a-map.o `test -f './map.c' || echo '$(srcdir)/'`./map.c | ||
2070 | |||
2071 | ./libmap2_a-map.obj: ./map.c | ||
2072 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmap2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmap2_a-map.obj -MD -MP -MF $(DEPDIR)/libmap2_a-map.Tpo -c -o ./libmap2_a-map.obj `if test -f './map.c'; then $(CYGPATH_W) './map.c'; else $(CYGPATH_W) '$(srcdir)/./map.c'; fi` | ||
2073 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmap2_a-map.Tpo $(DEPDIR)/libmap2_a-map.Po | ||
2074 | # $(AM_V_CC)source='./map.c' object='./libmap2_a-map.obj' libtool=no \ | ||
2075 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2076 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmap2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmap2_a-map.obj `if test -f './map.c'; then $(CYGPATH_W) './map.c'; else $(CYGPATH_W) '$(srcdir)/./map.c'; fi` | ||
2077 | |||
2078 | ./libmines2_a-mines.o: ./mines.c | ||
2079 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmines2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmines2_a-mines.o -MD -MP -MF $(DEPDIR)/libmines2_a-mines.Tpo -c -o ./libmines2_a-mines.o `test -f './mines.c' || echo '$(srcdir)/'`./mines.c | ||
2080 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmines2_a-mines.Tpo $(DEPDIR)/libmines2_a-mines.Po | ||
2081 | # $(AM_V_CC)source='./mines.c' object='./libmines2_a-mines.o' libtool=no \ | ||
2082 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2083 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmines2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmines2_a-mines.o `test -f './mines.c' || echo '$(srcdir)/'`./mines.c | ||
2084 | |||
2085 | ./libmines2_a-mines.obj: ./mines.c | ||
2086 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmines2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libmines2_a-mines.obj -MD -MP -MF $(DEPDIR)/libmines2_a-mines.Tpo -c -o ./libmines2_a-mines.obj `if test -f './mines.c'; then $(CYGPATH_W) './mines.c'; else $(CYGPATH_W) '$(srcdir)/./mines.c'; fi` | ||
2087 | $(AM_V_at)$(am__mv) $(DEPDIR)/libmines2_a-mines.Tpo $(DEPDIR)/libmines2_a-mines.Po | ||
2088 | # $(AM_V_CC)source='./mines.c' object='./libmines2_a-mines.obj' libtool=no \ | ||
2089 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2090 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmines2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libmines2_a-mines.obj `if test -f './mines.c'; then $(CYGPATH_W) './mines.c'; else $(CYGPATH_W) '$(srcdir)/./mines.c'; fi` | ||
2091 | |||
2092 | ./libpattern2_a-pattern.o: ./pattern.c | ||
2093 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpattern2_a-pattern.o -MD -MP -MF $(DEPDIR)/libpattern2_a-pattern.Tpo -c -o ./libpattern2_a-pattern.o `test -f './pattern.c' || echo '$(srcdir)/'`./pattern.c | ||
2094 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpattern2_a-pattern.Tpo $(DEPDIR)/libpattern2_a-pattern.Po | ||
2095 | # $(AM_V_CC)source='./pattern.c' object='./libpattern2_a-pattern.o' libtool=no \ | ||
2096 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2097 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpattern2_a-pattern.o `test -f './pattern.c' || echo '$(srcdir)/'`./pattern.c | ||
2098 | |||
2099 | ./libpattern2_a-pattern.obj: ./pattern.c | ||
2100 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpattern2_a-pattern.obj -MD -MP -MF $(DEPDIR)/libpattern2_a-pattern.Tpo -c -o ./libpattern2_a-pattern.obj `if test -f './pattern.c'; then $(CYGPATH_W) './pattern.c'; else $(CYGPATH_W) '$(srcdir)/./pattern.c'; fi` | ||
2101 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpattern2_a-pattern.Tpo $(DEPDIR)/libpattern2_a-pattern.Po | ||
2102 | # $(AM_V_CC)source='./pattern.c' object='./libpattern2_a-pattern.obj' libtool=no \ | ||
2103 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2104 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpattern2_a-pattern.obj `if test -f './pattern.c'; then $(CYGPATH_W) './pattern.c'; else $(CYGPATH_W) '$(srcdir)/./pattern.c'; fi` | ||
2105 | |||
2106 | ./libpattern4_a-pattern.o: ./pattern.c | ||
2107 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpattern4_a-pattern.o -MD -MP -MF $(DEPDIR)/libpattern4_a-pattern.Tpo -c -o ./libpattern4_a-pattern.o `test -f './pattern.c' || echo '$(srcdir)/'`./pattern.c | ||
2108 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpattern4_a-pattern.Tpo $(DEPDIR)/libpattern4_a-pattern.Po | ||
2109 | # $(AM_V_CC)source='./pattern.c' object='./libpattern4_a-pattern.o' libtool=no \ | ||
2110 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2111 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpattern4_a-pattern.o `test -f './pattern.c' || echo '$(srcdir)/'`./pattern.c | ||
2112 | |||
2113 | ./libpattern4_a-pattern.obj: ./pattern.c | ||
2114 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpattern4_a-pattern.obj -MD -MP -MF $(DEPDIR)/libpattern4_a-pattern.Tpo -c -o ./libpattern4_a-pattern.obj `if test -f './pattern.c'; then $(CYGPATH_W) './pattern.c'; else $(CYGPATH_W) '$(srcdir)/./pattern.c'; fi` | ||
2115 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpattern4_a-pattern.Tpo $(DEPDIR)/libpattern4_a-pattern.Po | ||
2116 | # $(AM_V_CC)source='./pattern.c' object='./libpattern4_a-pattern.obj' libtool=no \ | ||
2117 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2118 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpattern4_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpattern4_a-pattern.obj `if test -f './pattern.c'; then $(CYGPATH_W) './pattern.c'; else $(CYGPATH_W) '$(srcdir)/./pattern.c'; fi` | ||
2119 | |||
2120 | ./libpearl2_a-pearl.o: ./pearl.c | ||
2121 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpearl2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpearl2_a-pearl.o -MD -MP -MF $(DEPDIR)/libpearl2_a-pearl.Tpo -c -o ./libpearl2_a-pearl.o `test -f './pearl.c' || echo '$(srcdir)/'`./pearl.c | ||
2122 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpearl2_a-pearl.Tpo $(DEPDIR)/libpearl2_a-pearl.Po | ||
2123 | # $(AM_V_CC)source='./pearl.c' object='./libpearl2_a-pearl.o' libtool=no \ | ||
2124 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2125 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpearl2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpearl2_a-pearl.o `test -f './pearl.c' || echo '$(srcdir)/'`./pearl.c | ||
2126 | |||
2127 | ./libpearl2_a-pearl.obj: ./pearl.c | ||
2128 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpearl2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libpearl2_a-pearl.obj -MD -MP -MF $(DEPDIR)/libpearl2_a-pearl.Tpo -c -o ./libpearl2_a-pearl.obj `if test -f './pearl.c'; then $(CYGPATH_W) './pearl.c'; else $(CYGPATH_W) '$(srcdir)/./pearl.c'; fi` | ||
2129 | $(AM_V_at)$(am__mv) $(DEPDIR)/libpearl2_a-pearl.Tpo $(DEPDIR)/libpearl2_a-pearl.Po | ||
2130 | # $(AM_V_CC)source='./pearl.c' object='./libpearl2_a-pearl.obj' libtool=no \ | ||
2131 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2132 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpearl2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libpearl2_a-pearl.obj `if test -f './pearl.c'; then $(CYGPATH_W) './pearl.c'; else $(CYGPATH_W) '$(srcdir)/./pearl.c'; fi` | ||
2133 | |||
2134 | ./libsignpos2_a-signpost.o: ./signpost.c | ||
2135 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsignpos2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsignpos2_a-signpost.o -MD -MP -MF $(DEPDIR)/libsignpos2_a-signpost.Tpo -c -o ./libsignpos2_a-signpost.o `test -f './signpost.c' || echo '$(srcdir)/'`./signpost.c | ||
2136 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsignpos2_a-signpost.Tpo $(DEPDIR)/libsignpos2_a-signpost.Po | ||
2137 | # $(AM_V_CC)source='./signpost.c' object='./libsignpos2_a-signpost.o' libtool=no \ | ||
2138 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2139 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsignpos2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsignpos2_a-signpost.o `test -f './signpost.c' || echo '$(srcdir)/'`./signpost.c | ||
2140 | |||
2141 | ./libsignpos2_a-signpost.obj: ./signpost.c | ||
2142 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsignpos2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsignpos2_a-signpost.obj -MD -MP -MF $(DEPDIR)/libsignpos2_a-signpost.Tpo -c -o ./libsignpos2_a-signpost.obj `if test -f './signpost.c'; then $(CYGPATH_W) './signpost.c'; else $(CYGPATH_W) '$(srcdir)/./signpost.c'; fi` | ||
2143 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsignpos2_a-signpost.Tpo $(DEPDIR)/libsignpos2_a-signpost.Po | ||
2144 | # $(AM_V_CC)source='./signpost.c' object='./libsignpos2_a-signpost.obj' libtool=no \ | ||
2145 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2146 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsignpos2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsignpos2_a-signpost.obj `if test -f './signpost.c'; then $(CYGPATH_W) './signpost.c'; else $(CYGPATH_W) '$(srcdir)/./signpost.c'; fi` | ||
2147 | |||
2148 | ./libsingles3_a-singles.o: ./singles.c | ||
2149 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsingles3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsingles3_a-singles.o -MD -MP -MF $(DEPDIR)/libsingles3_a-singles.Tpo -c -o ./libsingles3_a-singles.o `test -f './singles.c' || echo '$(srcdir)/'`./singles.c | ||
2150 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsingles3_a-singles.Tpo $(DEPDIR)/libsingles3_a-singles.Po | ||
2151 | # $(AM_V_CC)source='./singles.c' object='./libsingles3_a-singles.o' libtool=no \ | ||
2152 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2153 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsingles3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsingles3_a-singles.o `test -f './singles.c' || echo '$(srcdir)/'`./singles.c | ||
2154 | |||
2155 | ./libsingles3_a-singles.obj: ./singles.c | ||
2156 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsingles3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsingles3_a-singles.obj -MD -MP -MF $(DEPDIR)/libsingles3_a-singles.Tpo -c -o ./libsingles3_a-singles.obj `if test -f './singles.c'; then $(CYGPATH_W) './singles.c'; else $(CYGPATH_W) '$(srcdir)/./singles.c'; fi` | ||
2157 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsingles3_a-singles.Tpo $(DEPDIR)/libsingles3_a-singles.Po | ||
2158 | # $(AM_V_CC)source='./singles.c' object='./libsingles3_a-singles.obj' libtool=no \ | ||
2159 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2160 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsingles3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsingles3_a-singles.obj `if test -f './singles.c'; then $(CYGPATH_W) './singles.c'; else $(CYGPATH_W) '$(srcdir)/./singles.c'; fi` | ||
2161 | |||
2162 | ./libslant2_a-slant.o: ./slant.c | ||
2163 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libslant2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libslant2_a-slant.o -MD -MP -MF $(DEPDIR)/libslant2_a-slant.Tpo -c -o ./libslant2_a-slant.o `test -f './slant.c' || echo '$(srcdir)/'`./slant.c | ||
2164 | $(AM_V_at)$(am__mv) $(DEPDIR)/libslant2_a-slant.Tpo $(DEPDIR)/libslant2_a-slant.Po | ||
2165 | # $(AM_V_CC)source='./slant.c' object='./libslant2_a-slant.o' libtool=no \ | ||
2166 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2167 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libslant2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libslant2_a-slant.o `test -f './slant.c' || echo '$(srcdir)/'`./slant.c | ||
2168 | |||
2169 | ./libslant2_a-slant.obj: ./slant.c | ||
2170 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libslant2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libslant2_a-slant.obj -MD -MP -MF $(DEPDIR)/libslant2_a-slant.Tpo -c -o ./libslant2_a-slant.obj `if test -f './slant.c'; then $(CYGPATH_W) './slant.c'; else $(CYGPATH_W) '$(srcdir)/./slant.c'; fi` | ||
2171 | $(AM_V_at)$(am__mv) $(DEPDIR)/libslant2_a-slant.Tpo $(DEPDIR)/libslant2_a-slant.Po | ||
2172 | # $(AM_V_CC)source='./slant.c' object='./libslant2_a-slant.obj' libtool=no \ | ||
2173 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2174 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libslant2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libslant2_a-slant.obj `if test -f './slant.c'; then $(CYGPATH_W) './slant.c'; else $(CYGPATH_W) '$(srcdir)/./slant.c'; fi` | ||
2175 | |||
2176 | ./libsolo2_a-solo.o: ./solo.c | ||
2177 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsolo2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsolo2_a-solo.o -MD -MP -MF $(DEPDIR)/libsolo2_a-solo.Tpo -c -o ./libsolo2_a-solo.o `test -f './solo.c' || echo '$(srcdir)/'`./solo.c | ||
2178 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsolo2_a-solo.Tpo $(DEPDIR)/libsolo2_a-solo.Po | ||
2179 | # $(AM_V_CC)source='./solo.c' object='./libsolo2_a-solo.o' libtool=no \ | ||
2180 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2181 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsolo2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsolo2_a-solo.o `test -f './solo.c' || echo '$(srcdir)/'`./solo.c | ||
2182 | |||
2183 | ./libsolo2_a-solo.obj: ./solo.c | ||
2184 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsolo2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libsolo2_a-solo.obj -MD -MP -MF $(DEPDIR)/libsolo2_a-solo.Tpo -c -o ./libsolo2_a-solo.obj `if test -f './solo.c'; then $(CYGPATH_W) './solo.c'; else $(CYGPATH_W) '$(srcdir)/./solo.c'; fi` | ||
2185 | $(AM_V_at)$(am__mv) $(DEPDIR)/libsolo2_a-solo.Tpo $(DEPDIR)/libsolo2_a-solo.Po | ||
2186 | # $(AM_V_CC)source='./solo.c' object='./libsolo2_a-solo.obj' libtool=no \ | ||
2187 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2188 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsolo2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libsolo2_a-solo.obj `if test -f './solo.c'; then $(CYGPATH_W) './solo.c'; else $(CYGPATH_W) '$(srcdir)/./solo.c'; fi` | ||
2189 | |||
2190 | ./libtents3_a-tents.o: ./tents.c | ||
2191 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtents3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libtents3_a-tents.o -MD -MP -MF $(DEPDIR)/libtents3_a-tents.Tpo -c -o ./libtents3_a-tents.o `test -f './tents.c' || echo '$(srcdir)/'`./tents.c | ||
2192 | $(AM_V_at)$(am__mv) $(DEPDIR)/libtents3_a-tents.Tpo $(DEPDIR)/libtents3_a-tents.Po | ||
2193 | # $(AM_V_CC)source='./tents.c' object='./libtents3_a-tents.o' libtool=no \ | ||
2194 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2195 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtents3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libtents3_a-tents.o `test -f './tents.c' || echo '$(srcdir)/'`./tents.c | ||
2196 | |||
2197 | ./libtents3_a-tents.obj: ./tents.c | ||
2198 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtents3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libtents3_a-tents.obj -MD -MP -MF $(DEPDIR)/libtents3_a-tents.Tpo -c -o ./libtents3_a-tents.obj `if test -f './tents.c'; then $(CYGPATH_W) './tents.c'; else $(CYGPATH_W) '$(srcdir)/./tents.c'; fi` | ||
2199 | $(AM_V_at)$(am__mv) $(DEPDIR)/libtents3_a-tents.Tpo $(DEPDIR)/libtents3_a-tents.Po | ||
2200 | # $(AM_V_CC)source='./tents.c' object='./libtents3_a-tents.obj' libtool=no \ | ||
2201 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2202 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtents3_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libtents3_a-tents.obj `if test -f './tents.c'; then $(CYGPATH_W) './tents.c'; else $(CYGPATH_W) '$(srcdir)/./tents.c'; fi` | ||
2203 | |||
2204 | ./libtowers2_a-towers.o: ./towers.c | ||
2205 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtowers2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libtowers2_a-towers.o -MD -MP -MF $(DEPDIR)/libtowers2_a-towers.Tpo -c -o ./libtowers2_a-towers.o `test -f './towers.c' || echo '$(srcdir)/'`./towers.c | ||
2206 | $(AM_V_at)$(am__mv) $(DEPDIR)/libtowers2_a-towers.Tpo $(DEPDIR)/libtowers2_a-towers.Po | ||
2207 | # $(AM_V_CC)source='./towers.c' object='./libtowers2_a-towers.o' libtool=no \ | ||
2208 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2209 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtowers2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libtowers2_a-towers.o `test -f './towers.c' || echo '$(srcdir)/'`./towers.c | ||
2210 | |||
2211 | ./libtowers2_a-towers.obj: ./towers.c | ||
2212 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtowers2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libtowers2_a-towers.obj -MD -MP -MF $(DEPDIR)/libtowers2_a-towers.Tpo -c -o ./libtowers2_a-towers.obj `if test -f './towers.c'; then $(CYGPATH_W) './towers.c'; else $(CYGPATH_W) '$(srcdir)/./towers.c'; fi` | ||
2213 | $(AM_V_at)$(am__mv) $(DEPDIR)/libtowers2_a-towers.Tpo $(DEPDIR)/libtowers2_a-towers.Po | ||
2214 | # $(AM_V_CC)source='./towers.c' object='./libtowers2_a-towers.obj' libtool=no \ | ||
2215 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2216 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtowers2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libtowers2_a-towers.obj `if test -f './towers.c'; then $(CYGPATH_W) './towers.c'; else $(CYGPATH_W) '$(srcdir)/./towers.c'; fi` | ||
2217 | |||
2218 | ./libunequal2_a-unequal.o: ./unequal.c | ||
2219 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunequal2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libunequal2_a-unequal.o -MD -MP -MF $(DEPDIR)/libunequal2_a-unequal.Tpo -c -o ./libunequal2_a-unequal.o `test -f './unequal.c' || echo '$(srcdir)/'`./unequal.c | ||
2220 | $(AM_V_at)$(am__mv) $(DEPDIR)/libunequal2_a-unequal.Tpo $(DEPDIR)/libunequal2_a-unequal.Po | ||
2221 | # $(AM_V_CC)source='./unequal.c' object='./libunequal2_a-unequal.o' libtool=no \ | ||
2222 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2223 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunequal2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libunequal2_a-unequal.o `test -f './unequal.c' || echo '$(srcdir)/'`./unequal.c | ||
2224 | |||
2225 | ./libunequal2_a-unequal.obj: ./unequal.c | ||
2226 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunequal2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libunequal2_a-unequal.obj -MD -MP -MF $(DEPDIR)/libunequal2_a-unequal.Tpo -c -o ./libunequal2_a-unequal.obj `if test -f './unequal.c'; then $(CYGPATH_W) './unequal.c'; else $(CYGPATH_W) '$(srcdir)/./unequal.c'; fi` | ||
2227 | $(AM_V_at)$(am__mv) $(DEPDIR)/libunequal2_a-unequal.Tpo $(DEPDIR)/libunequal2_a-unequal.Po | ||
2228 | # $(AM_V_CC)source='./unequal.c' object='./libunequal2_a-unequal.obj' libtool=no \ | ||
2229 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2230 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunequal2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libunequal2_a-unequal.obj `if test -f './unequal.c'; then $(CYGPATH_W) './unequal.c'; else $(CYGPATH_W) '$(srcdir)/./unequal.c'; fi` | ||
2231 | |||
2232 | ./libunruly2_a-unruly.o: ./unruly.c | ||
2233 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunruly2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libunruly2_a-unruly.o -MD -MP -MF $(DEPDIR)/libunruly2_a-unruly.Tpo -c -o ./libunruly2_a-unruly.o `test -f './unruly.c' || echo '$(srcdir)/'`./unruly.c | ||
2234 | $(AM_V_at)$(am__mv) $(DEPDIR)/libunruly2_a-unruly.Tpo $(DEPDIR)/libunruly2_a-unruly.Po | ||
2235 | # $(AM_V_CC)source='./unruly.c' object='./libunruly2_a-unruly.o' libtool=no \ | ||
2236 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2237 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunruly2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libunruly2_a-unruly.o `test -f './unruly.c' || echo '$(srcdir)/'`./unruly.c | ||
2238 | |||
2239 | ./libunruly2_a-unruly.obj: ./unruly.c | ||
2240 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunruly2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ./libunruly2_a-unruly.obj -MD -MP -MF $(DEPDIR)/libunruly2_a-unruly.Tpo -c -o ./libunruly2_a-unruly.obj `if test -f './unruly.c'; then $(CYGPATH_W) './unruly.c'; else $(CYGPATH_W) '$(srcdir)/./unruly.c'; fi` | ||
2241 | $(AM_V_at)$(am__mv) $(DEPDIR)/libunruly2_a-unruly.Tpo $(DEPDIR)/libunruly2_a-unruly.Po | ||
2242 | # $(AM_V_CC)source='./unruly.c' object='./libunruly2_a-unruly.obj' libtool=no \ | ||
2243 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
2244 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libunruly2_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ./libunruly2_a-unruly.obj `if test -f './unruly.c'; then $(CYGPATH_W) './unruly.c'; else $(CYGPATH_W) '$(srcdir)/./unruly.c'; fi` | ||
2245 | |||
2246 | ID: $(am__tagged_files) | ||
2247 | $(am__define_uniq_tagged_files); mkid -fID $$unique | ||
2248 | tags: tags-am | ||
2249 | TAGS: tags | ||
2250 | |||
2251 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | ||
2252 | set x; \ | ||
2253 | here=`pwd`; \ | ||
2254 | $(am__define_uniq_tagged_files); \ | ||
2255 | shift; \ | ||
2256 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
2257 | test -n "$$unique" || unique=$$empty_fix; \ | ||
2258 | if test $$# -gt 0; then \ | ||
2259 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
2260 | "$$@" $$unique; \ | ||
2261 | else \ | ||
2262 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
2263 | $$unique; \ | ||
2264 | fi; \ | ||
2265 | fi | ||
2266 | ctags: ctags-am | ||
2267 | |||
2268 | CTAGS: ctags | ||
2269 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) | ||
2270 | $(am__define_uniq_tagged_files); \ | ||
2271 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
2272 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
2273 | $$unique | ||
2274 | |||
2275 | GTAGS: | ||
2276 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
2277 | && $(am__cd) $(top_srcdir) \ | ||
2278 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
2279 | cscope: cscope.files | ||
2280 | test ! -s cscope.files \ | ||
2281 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) | ||
2282 | clean-cscope: | ||
2283 | -rm -f cscope.files | ||
2284 | cscope.files: clean-cscope cscopelist | ||
2285 | cscopelist: cscopelist-am | ||
2286 | |||
2287 | cscopelist-am: $(am__tagged_files) | ||
2288 | list='$(am__tagged_files)'; \ | ||
2289 | case "$(srcdir)" in \ | ||
2290 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ | ||
2291 | *) sdir=$(subdir)/$(srcdir) ;; \ | ||
2292 | esac; \ | ||
2293 | for i in $$list; do \ | ||
2294 | if test -f "$$i"; then \ | ||
2295 | echo "$(subdir)/$$i"; \ | ||
2296 | else \ | ||
2297 | echo "$$sdir/$$i"; \ | ||
2298 | fi; \ | ||
2299 | done >> $(top_builddir)/cscope.files | ||
2300 | |||
2301 | distclean-tags: | ||
2302 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
2303 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files | ||
2304 | |||
2305 | distdir: $(DISTFILES) | ||
2306 | $(am__remove_distdir) | ||
2307 | test -d "$(distdir)" || mkdir "$(distdir)" | ||
2308 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
2309 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
2310 | list='$(DISTFILES)'; \ | ||
2311 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
2312 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
2313 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
2314 | case $$dist_files in \ | ||
2315 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
2316 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
2317 | sort -u` ;; \ | ||
2318 | esac; \ | ||
2319 | for file in $$dist_files; do \ | ||
2320 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
2321 | if test -d $$d/$$file; then \ | ||
2322 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
2323 | if test -d "$(distdir)/$$file"; then \ | ||
2324 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
2325 | fi; \ | ||
2326 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
2327 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
2328 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
2329 | fi; \ | ||
2330 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
2331 | else \ | ||
2332 | test -f "$(distdir)/$$file" \ | ||
2333 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
2334 | || exit 1; \ | ||
2335 | fi; \ | ||
2336 | done | ||
2337 | -test -n "$(am__skip_mode_fix)" \ | ||
2338 | || find "$(distdir)" -type d ! -perm -755 \ | ||
2339 | -exec chmod u+rwx,go+rx {} \; -o \ | ||
2340 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | ||
2341 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | ||
2342 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ | ||
2343 | || chmod -R a+r "$(distdir)" | ||
2344 | dist-gzip: distdir | ||
2345 | tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz | ||
2346 | $(am__post_remove_distdir) | ||
2347 | |||
2348 | dist-bzip2: distdir | ||
2349 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 | ||
2350 | $(am__post_remove_distdir) | ||
2351 | |||
2352 | dist-lzip: distdir | ||
2353 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz | ||
2354 | $(am__post_remove_distdir) | ||
2355 | |||
2356 | dist-xz: distdir | ||
2357 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz | ||
2358 | $(am__post_remove_distdir) | ||
2359 | |||
2360 | dist-tarZ: distdir | ||
2361 | @echo WARNING: "Support for distribution archives compressed with" \ | ||
2362 | "legacy program 'compress' is deprecated." >&2 | ||
2363 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
2364 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z | ||
2365 | $(am__post_remove_distdir) | ||
2366 | |||
2367 | dist-shar: distdir | ||
2368 | @echo WARNING: "Support for shar distribution archives is" \ | ||
2369 | "deprecated." >&2 | ||
2370 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 | ||
2371 | shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz | ||
2372 | $(am__post_remove_distdir) | ||
2373 | |||
2374 | dist-zip: distdir | ||
2375 | -rm -f $(distdir).zip | ||
2376 | zip -rq $(distdir).zip $(distdir) | ||
2377 | $(am__post_remove_distdir) | ||
2378 | |||
2379 | dist dist-all: | ||
2380 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' | ||
2381 | $(am__post_remove_distdir) | ||
2382 | |||
2383 | # This target untars the dist file and tries a VPATH configuration. Then | ||
2384 | # it guarantees that the distribution is self-contained by making another | ||
2385 | # tarfile. | ||
2386 | distcheck: dist | ||
2387 | case '$(DIST_ARCHIVES)' in \ | ||
2388 | *.tar.gz*) \ | ||
2389 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ | ||
2390 | *.tar.bz2*) \ | ||
2391 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ | ||
2392 | *.tar.lz*) \ | ||
2393 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ | ||
2394 | *.tar.xz*) \ | ||
2395 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ | ||
2396 | *.tar.Z*) \ | ||
2397 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ | ||
2398 | *.shar.gz*) \ | ||
2399 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ | ||
2400 | *.zip*) \ | ||
2401 | unzip $(distdir).zip ;;\ | ||
2402 | esac | ||
2403 | chmod -R a-w $(distdir) | ||
2404 | chmod u+w $(distdir) | ||
2405 | mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst | ||
2406 | chmod a-w $(distdir) | ||
2407 | test -d $(distdir)/_build || exit 0; \ | ||
2408 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | ||
2409 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | ||
2410 | && am__cwd=`pwd` \ | ||
2411 | && $(am__cd) $(distdir)/_build/sub \ | ||
2412 | && ../../configure \ | ||
2413 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ | ||
2414 | $(DISTCHECK_CONFIGURE_FLAGS) \ | ||
2415 | --srcdir=../.. --prefix="$$dc_install_base" \ | ||
2416 | && $(MAKE) $(AM_MAKEFLAGS) \ | ||
2417 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | ||
2418 | && $(MAKE) $(AM_MAKEFLAGS) check \ | ||
2419 | && $(MAKE) $(AM_MAKEFLAGS) install \ | ||
2420 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | ||
2421 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | ||
2422 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | ||
2423 | distuninstallcheck \ | ||
2424 | && chmod -R a-w "$$dc_install_base" \ | ||
2425 | && ({ \ | ||
2426 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | ||
2427 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | ||
2428 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | ||
2429 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | ||
2430 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | ||
2431 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ | ||
2432 | && rm -rf "$$dc_destdir" \ | ||
2433 | && $(MAKE) $(AM_MAKEFLAGS) dist \ | ||
2434 | && rm -rf $(DIST_ARCHIVES) \ | ||
2435 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ | ||
2436 | && cd "$$am__cwd" \ | ||
2437 | || exit 1 | ||
2438 | $(am__post_remove_distdir) | ||
2439 | @(echo "$(distdir) archives ready for distribution: "; \ | ||
2440 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | ||
2441 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' | ||
2442 | distuninstallcheck: | ||
2443 | @test -n '$(distuninstallcheck_dir)' || { \ | ||
2444 | echo 'ERROR: trying to run $@ with an empty' \ | ||
2445 | '$$(distuninstallcheck_dir)' >&2; \ | ||
2446 | exit 1; \ | ||
2447 | }; \ | ||
2448 | $(am__cd) '$(distuninstallcheck_dir)' || { \ | ||
2449 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ | ||
2450 | exit 1; \ | ||
2451 | }; \ | ||
2452 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ | ||
2453 | || { echo "ERROR: files left after uninstall:" ; \ | ||
2454 | if test -n "$(DESTDIR)"; then \ | ||
2455 | echo " (check DESTDIR support)"; \ | ||
2456 | fi ; \ | ||
2457 | $(distuninstallcheck_listfiles) ; \ | ||
2458 | exit 1; } >&2 | ||
2459 | distcleancheck: distclean | ||
2460 | @if test '$(srcdir)' = . ; then \ | ||
2461 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | ||
2462 | exit 1 ; \ | ||
2463 | fi | ||
2464 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | ||
2465 | || { echo "ERROR: files left in build directory after distclean:" ; \ | ||
2466 | $(distcleancheck_listfiles) ; \ | ||
2467 | exit 1; } >&2 | ||
2468 | check-am: all-am | ||
2469 | check: check-am | ||
2470 | all-am: Makefile $(LIBRARIES) $(PROGRAMS) | ||
2471 | installdirs: | ||
2472 | for dir in "$(DESTDIR)$(bindir)"; do \ | ||
2473 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
716 | done | 2474 | done |
2475 | install: install-am | ||
2476 | install-exec: install-exec-am | ||
2477 | install-data: install-data-am | ||
2478 | uninstall: uninstall-am | ||
2479 | |||
2480 | install-am: all-am | ||
2481 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
2482 | |||
2483 | installcheck: installcheck-am | ||
2484 | install-strip: | ||
2485 | if test -z '$(STRIP)'; then \ | ||
2486 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
2487 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
2488 | install; \ | ||
2489 | else \ | ||
2490 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
2491 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
2492 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | ||
2493 | fi | ||
2494 | mostlyclean-generic: | ||
2495 | |||
2496 | clean-generic: | ||
2497 | |||
2498 | distclean-generic: | ||
2499 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
2500 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
2501 | -rm -f ./$(am__dirstamp) | ||
2502 | -test -z "$(DEPDIR)/$(am__dirstamp)" || rm -f $(DEPDIR)/$(am__dirstamp) | ||
2503 | |||
2504 | maintainer-clean-generic: | ||
2505 | @echo "This command is intended for maintainers to use" | ||
2506 | @echo "it deletes files that may require special tools to rebuild." | ||
2507 | clean: clean-am | ||
2508 | |||
2509 | clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ | ||
2510 | clean-noinstPROGRAMS mostlyclean-am | ||
2511 | |||
2512 | distclean: distclean-am | ||
2513 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
2514 | -rm -rf ./$(DEPDIR) | ||
2515 | -rm -f Makefile | ||
2516 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
2517 | distclean-tags | ||
2518 | |||
2519 | dvi: dvi-am | ||
2520 | |||
2521 | dvi-am: | ||
2522 | |||
2523 | html: html-am | ||
2524 | |||
2525 | html-am: | ||
2526 | |||
2527 | info: info-am | ||
2528 | |||
2529 | info-am: | ||
2530 | |||
2531 | install-data-am: | ||
2532 | |||
2533 | install-dvi: install-dvi-am | ||
2534 | |||
2535 | install-dvi-am: | ||
2536 | |||
2537 | install-exec-am: install-binPROGRAMS | ||
2538 | |||
2539 | install-html: install-html-am | ||
2540 | |||
2541 | install-html-am: | ||
2542 | |||
2543 | install-info: install-info-am | ||
2544 | |||
2545 | install-info-am: | ||
2546 | |||
2547 | install-man: | ||
2548 | |||
2549 | install-pdf: install-pdf-am | ||
2550 | |||
2551 | install-pdf-am: | ||
2552 | |||
2553 | install-ps: install-ps-am | ||
2554 | |||
2555 | install-ps-am: | ||
2556 | |||
2557 | installcheck-am: | ||
2558 | |||
2559 | maintainer-clean: maintainer-clean-am | ||
2560 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
2561 | -rm -rf $(top_srcdir)/autom4te.cache | ||
2562 | -rm -rf ./$(DEPDIR) | ||
2563 | -rm -f Makefile | ||
2564 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
2565 | |||
2566 | mostlyclean: mostlyclean-am | ||
2567 | |||
2568 | mostlyclean-am: mostlyclean-compile mostlyclean-generic | ||
2569 | |||
2570 | pdf: pdf-am | ||
2571 | |||
2572 | pdf-am: | ||
2573 | |||
2574 | ps: ps-am | ||
2575 | |||
2576 | ps-am: | ||
2577 | |||
2578 | uninstall-am: uninstall-binPROGRAMS | ||
2579 | |||
2580 | .MAKE: install-am install-strip | ||
2581 | |||
2582 | .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ | ||
2583 | clean-binPROGRAMS clean-cscope clean-generic \ | ||
2584 | clean-noinstLIBRARIES clean-noinstPROGRAMS cscope \ | ||
2585 | cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ | ||
2586 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ | ||
2587 | distcheck distclean distclean-compile distclean-generic \ | ||
2588 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ | ||
2589 | dvi-am html html-am info info-am install install-am \ | ||
2590 | install-binPROGRAMS install-data install-data-am install-dvi \ | ||
2591 | install-dvi-am install-exec install-exec-am install-html \ | ||
2592 | install-html-am install-info install-info-am install-man \ | ||
2593 | install-pdf install-pdf-am install-ps install-ps-am \ | ||
2594 | install-strip installcheck installcheck-am installdirs \ | ||
2595 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
2596 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ | ||
2597 | tags tags-am uninstall uninstall-am uninstall-binPROGRAMS | ||
2598 | |||
2599 | .PRECIOUS: Makefile | ||
2600 | |||
717 | test: benchmark.html benchmark.txt | 2601 | test: benchmark.html benchmark.txt |
718 | 2602 | ||
719 | benchmark.html: benchmark.txt benchmark.pl | 2603 | benchmark.html: benchmark.txt benchmark.pl |
@@ -722,6 +2606,6 @@ benchmark.html: benchmark.txt benchmark.pl | |||
722 | benchmark.txt: benchmark.sh $(GAMES) | 2606 | benchmark.txt: benchmark.sh $(GAMES) |
723 | ./benchmark.sh > $@ | 2607 | ./benchmark.sh > $@ |
724 | 2608 | ||
725 | 2609 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | |
726 | clean: | 2610 | # Otherwise a system limit (for SysV at least) may be exceeded. |
727 | rm -f *.o $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube $(BINPREFIX)dominosa $(BINPREFIX)fifteen $(BINPREFIX)fifteensolver $(BINPREFIX)filling $(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood $(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture $(BINPREFIX)galaxiessolver $(BINPREFIX)guess $(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver $(BINPREFIX)latincheck $(BINPREFIX)lightup $(BINPREFIX)lightupsolver $(BINPREFIX)loopy $(BINPREFIX)loopysolver $(BINPREFIX)magnets $(BINPREFIX)magnetssolver $(BINPREFIX)map $(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc $(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide $(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade $(BINPREFIX)pattern $(BINPREFIX)patternpicture $(BINPREFIX)patternsolver $(BINPREFIX)pearl $(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range $(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost $(BINPREFIX)signpostsolver $(BINPREFIX)singles $(BINPREFIX)singlessolver $(BINPREFIX)sixteen $(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo $(BINPREFIX)solosolver $(BINPREFIX)tents $(BINPREFIX)tentssolver $(BINPREFIX)towers $(BINPREFIX)towerssolver $(BINPREFIX)tracks $(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal $(BINPREFIX)unequalsolver $(BINPREFIX)unruly $(BINPREFIX)unrulysolver $(BINPREFIX)untangle | 2611 | .NOEXPORT: |
diff --git a/apps/plugins/puzzles/src/Makefile.in b/apps/plugins/puzzles/src/Makefile.in index b86194f893..58154a8d74 100644 --- a/apps/plugins/puzzles/src/Makefile.in +++ b/apps/plugins/puzzles/src/Makefile.in | |||
@@ -1,7 +1,7 @@ | |||
1 | # Makefile.in generated by automake 1.15 from Makefile.am. | 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. |
2 | # @configure_input@ | 2 | # @configure_input@ |
3 | 3 | ||
4 | # Copyright (C) 1994-2014 Free Software Foundation, Inc. | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. |
5 | 5 | ||
6 | # This Makefile.in is free software; the Free Software Foundation | 6 | # This Makefile.in is free software; the Free Software Foundation |
7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
diff --git a/apps/plugins/puzzles/src/aclocal.m4 b/apps/plugins/puzzles/src/aclocal.m4 index 6e4efedfb6..04369a2130 100644 --- a/apps/plugins/puzzles/src/aclocal.m4 +++ b/apps/plugins/puzzles/src/aclocal.m4 | |||
@@ -1,6 +1,6 @@ | |||
1 | # generated automatically by aclocal 1.15 -*- Autoconf -*- | 1 | # generated automatically by aclocal 1.15.1 -*- Autoconf -*- |
2 | 2 | ||
3 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 3 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. |
4 | 4 | ||
5 | # This file is free software; the Free Software Foundation | 5 | # This file is free software; the Free Software Foundation |
6 | # gives unlimited permission to copy and/or distribute it, | 6 | # gives unlimited permission to copy and/or distribute it, |
@@ -424,9 +424,9 @@ AC_DEFUN([GTK_CHECK_BACKEND], | |||
424 | fi | 424 | fi |
425 | ]) | 425 | ]) |
426 | 426 | ||
427 | dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 427 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
428 | dnl serial 11 (pkg-config-0.29.1) | 428 | # serial 12 (pkg-config-0.29.2) |
429 | dnl | 429 | |
430 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 430 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
431 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> | 431 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
432 | dnl | 432 | dnl |
@@ -467,7 +467,7 @@ dnl | |||
467 | dnl See the "Since" comment for each macro you use to see what version | 467 | dnl See the "Since" comment for each macro you use to see what version |
468 | dnl of the macros you require. | 468 | dnl of the macros you require. |
469 | m4_defun([PKG_PREREQ], | 469 | m4_defun([PKG_PREREQ], |
470 | [m4_define([PKG_MACROS_VERSION], [0.29.1]) | 470 | [m4_define([PKG_MACROS_VERSION], [0.29.2]) |
471 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | 471 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, |
472 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | 472 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) |
473 | ])dnl PKG_PREREQ | 473 | ])dnl PKG_PREREQ |
@@ -568,7 +568,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | |||
568 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | 568 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
569 | 569 | ||
570 | pkg_failed=no | 570 | pkg_failed=no |
571 | AC_MSG_CHECKING([for $1]) | 571 | AC_MSG_CHECKING([for $2]) |
572 | 572 | ||
573 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | 573 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
574 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | 574 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
@@ -578,11 +578,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. | |||
578 | See the pkg-config man page for more details.]) | 578 | See the pkg-config man page for more details.]) |
579 | 579 | ||
580 | if test $pkg_failed = yes; then | 580 | if test $pkg_failed = yes; then |
581 | AC_MSG_RESULT([no]) | 581 | AC_MSG_RESULT([no]) |
582 | _PKG_SHORT_ERRORS_SUPPORTED | 582 | _PKG_SHORT_ERRORS_SUPPORTED |
583 | if test $_pkg_short_errors_supported = yes; then | 583 | if test $_pkg_short_errors_supported = yes; then |
584 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | 584 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
585 | else | 585 | else |
586 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | 586 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
587 | fi | 587 | fi |
588 | # Put the nasty error message in config.log where it belongs | 588 | # Put the nasty error message in config.log where it belongs |
@@ -599,7 +599,7 @@ installed software in a non-standard prefix. | |||
599 | _PKG_TEXT])[]dnl | 599 | _PKG_TEXT])[]dnl |
600 | ]) | 600 | ]) |
601 | elif test $pkg_failed = untried; then | 601 | elif test $pkg_failed = untried; then |
602 | AC_MSG_RESULT([no]) | 602 | AC_MSG_RESULT([no]) |
603 | m4_default([$4], [AC_MSG_FAILURE( | 603 | m4_default([$4], [AC_MSG_FAILURE( |
604 | [The pkg-config script could not be found or is too old. Make sure it | 604 | [The pkg-config script could not be found or is too old. Make sure it |
605 | is in your PATH or set the PKG_CONFIG environment variable to the full | 605 | is in your PATH or set the PKG_CONFIG environment variable to the full |
@@ -700,7 +700,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) | |||
700 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | 700 | AS_VAR_IF([$1], [""], [$5], [$4])dnl |
701 | ])dnl PKG_CHECK_VAR | 701 | ])dnl PKG_CHECK_VAR |
702 | 702 | ||
703 | # Copyright (C) 2002-2014 Free Software Foundation, Inc. | 703 | # Copyright (C) 2002-2017 Free Software Foundation, Inc. |
704 | # | 704 | # |
705 | # This file is free software; the Free Software Foundation | 705 | # This file is free software; the Free Software Foundation |
706 | # gives unlimited permission to copy and/or distribute it, | 706 | # gives unlimited permission to copy and/or distribute it, |
@@ -715,7 +715,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], | |||
715 | [am__api_version='1.15' | 715 | [am__api_version='1.15' |
716 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | 716 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
717 | dnl require some minimum version. Point them to the right macro. | 717 | dnl require some minimum version. Point them to the right macro. |
718 | m4_if([$1], [1.15], [], | 718 | m4_if([$1], [1.15.1], [], |
719 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | 719 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
720 | ]) | 720 | ]) |
721 | 721 | ||
@@ -731,14 +731,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) | |||
731 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | 731 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
732 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | 732 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
733 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | 733 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
734 | [AM_AUTOMAKE_VERSION([1.15])dnl | 734 | [AM_AUTOMAKE_VERSION([1.15.1])dnl |
735 | m4_ifndef([AC_AUTOCONF_VERSION], | 735 | m4_ifndef([AC_AUTOCONF_VERSION], |
736 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | 736 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
737 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | 737 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
738 | 738 | ||
739 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | 739 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
740 | 740 | ||
741 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 741 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
742 | # | 742 | # |
743 | # This file is free software; the Free Software Foundation | 743 | # This file is free software; the Free Software Foundation |
744 | # gives unlimited permission to copy and/or distribute it, | 744 | # gives unlimited permission to copy and/or distribute it, |
@@ -790,7 +790,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` | |||
790 | 790 | ||
791 | # AM_CONDITIONAL -*- Autoconf -*- | 791 | # AM_CONDITIONAL -*- Autoconf -*- |
792 | 792 | ||
793 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | 793 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. |
794 | # | 794 | # |
795 | # This file is free software; the Free Software Foundation | 795 | # This file is free software; the Free Software Foundation |
796 | # gives unlimited permission to copy and/or distribute it, | 796 | # gives unlimited permission to copy and/or distribute it, |
@@ -821,7 +821,7 @@ AC_CONFIG_COMMANDS_PRE( | |||
821 | Usually this means the macro was only invoked conditionally.]]) | 821 | Usually this means the macro was only invoked conditionally.]]) |
822 | fi])]) | 822 | fi])]) |
823 | 823 | ||
824 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 824 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. |
825 | # | 825 | # |
826 | # This file is free software; the Free Software Foundation | 826 | # This file is free software; the Free Software Foundation |
827 | # gives unlimited permission to copy and/or distribute it, | 827 | # gives unlimited permission to copy and/or distribute it, |
@@ -1012,7 +1012,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl | |||
1012 | 1012 | ||
1013 | # Generate code to set up dependency tracking. -*- Autoconf -*- | 1013 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
1014 | 1014 | ||
1015 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 1015 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. |
1016 | # | 1016 | # |
1017 | # This file is free software; the Free Software Foundation | 1017 | # This file is free software; the Free Software Foundation |
1018 | # gives unlimited permission to copy and/or distribute it, | 1018 | # gives unlimited permission to copy and/or distribute it, |
@@ -1088,7 +1088,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |||
1088 | 1088 | ||
1089 | # Do all the work for Automake. -*- Autoconf -*- | 1089 | # Do all the work for Automake. -*- Autoconf -*- |
1090 | 1090 | ||
1091 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 1091 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. |
1092 | # | 1092 | # |
1093 | # This file is free software; the Free Software Foundation | 1093 | # This file is free software; the Free Software Foundation |
1094 | # gives unlimited permission to copy and/or distribute it, | 1094 | # gives unlimited permission to copy and/or distribute it, |
@@ -1285,7 +1285,7 @@ for _am_header in $config_headers :; do | |||
1285 | done | 1285 | done |
1286 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | 1286 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
1287 | 1287 | ||
1288 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 1288 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
1289 | # | 1289 | # |
1290 | # This file is free software; the Free Software Foundation | 1290 | # This file is free software; the Free Software Foundation |
1291 | # gives unlimited permission to copy and/or distribute it, | 1291 | # gives unlimited permission to copy and/or distribute it, |
@@ -1306,7 +1306,7 @@ if test x"${install_sh+set}" != xset; then | |||
1306 | fi | 1306 | fi |
1307 | AC_SUBST([install_sh])]) | 1307 | AC_SUBST([install_sh])]) |
1308 | 1308 | ||
1309 | # Copyright (C) 2003-2014 Free Software Foundation, Inc. | 1309 | # Copyright (C) 2003-2017 Free Software Foundation, Inc. |
1310 | # | 1310 | # |
1311 | # This file is free software; the Free Software Foundation | 1311 | # This file is free software; the Free Software Foundation |
1312 | # gives unlimited permission to copy and/or distribute it, | 1312 | # gives unlimited permission to copy and/or distribute it, |
@@ -1327,7 +1327,7 @@ AC_SUBST([am__leading_dot])]) | |||
1327 | 1327 | ||
1328 | # Check to see how 'make' treats includes. -*- Autoconf -*- | 1328 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
1329 | 1329 | ||
1330 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 1330 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
1331 | # | 1331 | # |
1332 | # This file is free software; the Free Software Foundation | 1332 | # This file is free software; the Free Software Foundation |
1333 | # gives unlimited permission to copy and/or distribute it, | 1333 | # gives unlimited permission to copy and/or distribute it, |
@@ -1377,7 +1377,7 @@ rm -f confinc confmf | |||
1377 | 1377 | ||
1378 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | 1378 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
1379 | 1379 | ||
1380 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. | 1380 | # Copyright (C) 1997-2017 Free Software Foundation, Inc. |
1381 | # | 1381 | # |
1382 | # This file is free software; the Free Software Foundation | 1382 | # This file is free software; the Free Software Foundation |
1383 | # gives unlimited permission to copy and/or distribute it, | 1383 | # gives unlimited permission to copy and/or distribute it, |
@@ -1416,7 +1416,7 @@ fi | |||
1416 | 1416 | ||
1417 | # Helper functions for option handling. -*- Autoconf -*- | 1417 | # Helper functions for option handling. -*- Autoconf -*- |
1418 | 1418 | ||
1419 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 1419 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
1420 | # | 1420 | # |
1421 | # This file is free software; the Free Software Foundation | 1421 | # This file is free software; the Free Software Foundation |
1422 | # gives unlimited permission to copy and/or distribute it, | 1422 | # gives unlimited permission to copy and/or distribute it, |
@@ -1445,7 +1445,7 @@ AC_DEFUN([_AM_SET_OPTIONS], | |||
1445 | AC_DEFUN([_AM_IF_OPTION], | 1445 | AC_DEFUN([_AM_IF_OPTION], |
1446 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | 1446 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
1447 | 1447 | ||
1448 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. | 1448 | # Copyright (C) 1999-2017 Free Software Foundation, Inc. |
1449 | # | 1449 | # |
1450 | # This file is free software; the Free Software Foundation | 1450 | # This file is free software; the Free Software Foundation |
1451 | # gives unlimited permission to copy and/or distribute it, | 1451 | # gives unlimited permission to copy and/or distribute it, |
@@ -1492,7 +1492,7 @@ AC_LANG_POP([C])]) | |||
1492 | # For backward compatibility. | 1492 | # For backward compatibility. |
1493 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | 1493 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
1494 | 1494 | ||
1495 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 1495 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
1496 | # | 1496 | # |
1497 | # This file is free software; the Free Software Foundation | 1497 | # This file is free software; the Free Software Foundation |
1498 | # gives unlimited permission to copy and/or distribute it, | 1498 | # gives unlimited permission to copy and/or distribute it, |
@@ -1511,7 +1511,7 @@ AC_DEFUN([AM_RUN_LOG], | |||
1511 | 1511 | ||
1512 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | 1512 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
1513 | 1513 | ||
1514 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. | 1514 | # Copyright (C) 1996-2017 Free Software Foundation, Inc. |
1515 | # | 1515 | # |
1516 | # This file is free software; the Free Software Foundation | 1516 | # This file is free software; the Free Software Foundation |
1517 | # gives unlimited permission to copy and/or distribute it, | 1517 | # gives unlimited permission to copy and/or distribute it, |
@@ -1592,7 +1592,7 @@ AC_CONFIG_COMMANDS_PRE( | |||
1592 | rm -f conftest.file | 1592 | rm -f conftest.file |
1593 | ]) | 1593 | ]) |
1594 | 1594 | ||
1595 | # Copyright (C) 2009-2014 Free Software Foundation, Inc. | 1595 | # Copyright (C) 2009-2017 Free Software Foundation, Inc. |
1596 | # | 1596 | # |
1597 | # This file is free software; the Free Software Foundation | 1597 | # This file is free software; the Free Software Foundation |
1598 | # gives unlimited permission to copy and/or distribute it, | 1598 | # gives unlimited permission to copy and/or distribute it, |
@@ -1652,7 +1652,7 @@ AC_SUBST([AM_BACKSLASH])dnl | |||
1652 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | 1652 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
1653 | ]) | 1653 | ]) |
1654 | 1654 | ||
1655 | # Copyright (C) 2001-2014 Free Software Foundation, Inc. | 1655 | # Copyright (C) 2001-2017 Free Software Foundation, Inc. |
1656 | # | 1656 | # |
1657 | # This file is free software; the Free Software Foundation | 1657 | # This file is free software; the Free Software Foundation |
1658 | # gives unlimited permission to copy and/or distribute it, | 1658 | # gives unlimited permission to copy and/or distribute it, |
@@ -1680,7 +1680,7 @@ fi | |||
1680 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | 1680 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1681 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | 1681 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1682 | 1682 | ||
1683 | # Copyright (C) 2006-2014 Free Software Foundation, Inc. | 1683 | # Copyright (C) 2006-2017 Free Software Foundation, Inc. |
1684 | # | 1684 | # |
1685 | # This file is free software; the Free Software Foundation | 1685 | # This file is free software; the Free Software Foundation |
1686 | # gives unlimited permission to copy and/or distribute it, | 1686 | # gives unlimited permission to copy and/or distribute it, |
@@ -1699,7 +1699,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |||
1699 | 1699 | ||
1700 | # Check how to create a tarball. -*- Autoconf -*- | 1700 | # Check how to create a tarball. -*- Autoconf -*- |
1701 | 1701 | ||
1702 | # Copyright (C) 2004-2014 Free Software Foundation, Inc. | 1702 | # Copyright (C) 2004-2017 Free Software Foundation, Inc. |
1703 | # | 1703 | # |
1704 | # This file is free software; the Free Software Foundation | 1704 | # This file is free software; the Free Software Foundation |
1705 | # gives unlimited permission to copy and/or distribute it, | 1705 | # gives unlimited permission to copy and/or distribute it, |
diff --git a/apps/plugins/puzzles/src/blackbox.c b/apps/plugins/puzzles/src/blackbox.c index 192b7f11b6..ffc7f7c587 100644 --- a/apps/plugins/puzzles/src/blackbox.c +++ b/apps/plugins/puzzles/src/blackbox.c | |||
@@ -148,14 +148,12 @@ static config_item *game_configure(const game_params *params) | |||
148 | ret[0].name = "Width"; | 148 | ret[0].name = "Width"; |
149 | ret[0].type = C_STRING; | 149 | ret[0].type = C_STRING; |
150 | sprintf(buf, "%d", params->w); | 150 | sprintf(buf, "%d", params->w); |
151 | ret[0].sval = dupstr(buf); | 151 | ret[0].u.string.sval = dupstr(buf); |
152 | ret[0].ival = 0; | ||
153 | 152 | ||
154 | ret[1].name = "Height"; | 153 | ret[1].name = "Height"; |
155 | ret[1].type = C_STRING; | 154 | ret[1].type = C_STRING; |
156 | sprintf(buf, "%d", params->h); | 155 | sprintf(buf, "%d", params->h); |
157 | ret[1].sval = dupstr(buf); | 156 | ret[1].u.string.sval = dupstr(buf); |
158 | ret[1].ival = 0; | ||
159 | 157 | ||
160 | ret[2].name = "No. of balls"; | 158 | ret[2].name = "No. of balls"; |
161 | ret[2].type = C_STRING; | 159 | ret[2].type = C_STRING; |
@@ -163,13 +161,10 @@ static config_item *game_configure(const game_params *params) | |||
163 | sprintf(buf, "%d", params->minballs); | 161 | sprintf(buf, "%d", params->minballs); |
164 | else | 162 | else |
165 | sprintf(buf, "%d-%d", params->minballs, params->maxballs); | 163 | sprintf(buf, "%d-%d", params->minballs, params->maxballs); |
166 | ret[2].sval = dupstr(buf); | 164 | ret[2].u.string.sval = dupstr(buf); |
167 | ret[2].ival = 0; | ||
168 | 165 | ||
169 | ret[3].name = NULL; | 166 | ret[3].name = NULL; |
170 | ret[3].type = C_END; | 167 | ret[3].type = C_END; |
171 | ret[3].sval = NULL; | ||
172 | ret[3].ival = 0; | ||
173 | 168 | ||
174 | return ret; | 169 | return ret; |
175 | } | 170 | } |
@@ -178,17 +173,18 @@ static game_params *custom_params(const config_item *cfg) | |||
178 | { | 173 | { |
179 | game_params *ret = snew(game_params); | 174 | game_params *ret = snew(game_params); |
180 | 175 | ||
181 | ret->w = atoi(cfg[0].sval); | 176 | ret->w = atoi(cfg[0].u.string.sval); |
182 | ret->h = atoi(cfg[1].sval); | 177 | ret->h = atoi(cfg[1].u.string.sval); |
183 | 178 | ||
184 | /* Allow 'a-b' for a range, otherwise assume a single number. */ | 179 | /* Allow 'a-b' for a range, otherwise assume a single number. */ |
185 | if (sscanf(cfg[2].sval, "%d-%d", &ret->minballs, &ret->maxballs) < 2) | 180 | if (sscanf(cfg[2].u.string.sval, "%d-%d", |
186 | ret->minballs = ret->maxballs = atoi(cfg[2].sval); | 181 | &ret->minballs, &ret->maxballs) < 2) |
182 | ret->minballs = ret->maxballs = atoi(cfg[2].u.string.sval); | ||
187 | 183 | ||
188 | return ret; | 184 | return ret; |
189 | } | 185 | } |
190 | 186 | ||
191 | static char *validate_params(const game_params *params, int full) | 187 | static const char *validate_params(const game_params *params, int full) |
192 | { | 188 | { |
193 | if (params->w < 2 || params->h < 2) | 189 | if (params->w < 2 || params->h < 2) |
194 | return "Width and height must both be at least two"; | 190 | return "Width and height must both be at least two"; |
@@ -253,11 +249,11 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
253 | return ret; | 249 | return ret; |
254 | } | 250 | } |
255 | 251 | ||
256 | static char *validate_desc(const game_params *params, const char *desc) | 252 | static const char *validate_desc(const game_params *params, const char *desc) |
257 | { | 253 | { |
258 | int nballs, dlen = strlen(desc), i; | 254 | int nballs, dlen = strlen(desc), i; |
259 | unsigned char *bmp; | 255 | unsigned char *bmp; |
260 | char *ret; | 256 | const char *ret; |
261 | 257 | ||
262 | /* the bitmap is 2+(nballs*2) long; the hex version is double that. */ | 258 | /* the bitmap is 2+(nballs*2) long; the hex version is double that. */ |
263 | nballs = ((dlen/2)-2)/2; | 259 | nballs = ((dlen/2)-2)/2; |
@@ -464,7 +460,7 @@ static void free_game(game_state *state) | |||
464 | } | 460 | } |
465 | 461 | ||
466 | static char *solve_game(const game_state *state, const game_state *currstate, | 462 | static char *solve_game(const game_state *state, const game_state *currstate, |
467 | const char *aux, char **error) | 463 | const char *aux, const char **error) |
468 | { | 464 | { |
469 | return dupstr("S"); | 465 | return dupstr("S"); |
470 | } | 466 | } |
@@ -904,7 +900,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
904 | ui->cur_x = cx; | 900 | ui->cur_x = cx; |
905 | ui->cur_y = cy; | 901 | ui->cur_y = cy; |
906 | ui->cur_visible = 1; | 902 | ui->cur_visible = 1; |
907 | return ""; | 903 | return UI_UPDATE; |
908 | } | 904 | } |
909 | 905 | ||
910 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { | 906 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { |
@@ -914,7 +910,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
914 | wouldflash = 1; | 910 | wouldflash = 1; |
915 | } else if (button == LEFT_RELEASE) { | 911 | } else if (button == LEFT_RELEASE) { |
916 | ui->flash_laser = 0; | 912 | ui->flash_laser = 0; |
917 | return ""; | 913 | return UI_UPDATE; |
918 | } else if (IS_CURSOR_SELECT(button)) { | 914 | } else if (IS_CURSOR_SELECT(button)) { |
919 | if (ui->cur_visible) { | 915 | if (ui->cur_visible) { |
920 | gx = ui->cur_x; | 916 | gx = ui->cur_x; |
@@ -923,7 +919,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
923 | wouldflash = 2; | 919 | wouldflash = 2; |
924 | } else { | 920 | } else { |
925 | ui->cur_visible = 1; | 921 | ui->cur_visible = 1; |
926 | return ""; | 922 | return UI_UPDATE; |
927 | } | 923 | } |
928 | /* Fix up 'button' for the below logic. */ | 924 | /* Fix up 'button' for the below logic. */ |
929 | if (button == CURSOR_SELECT2) button = RIGHT_BUTTON; | 925 | if (button == CURSOR_SELECT2) button = RIGHT_BUTTON; |
@@ -972,9 +968,9 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
972 | return nullret; | 968 | return nullret; |
973 | ui->flash_laserno = rangeno; | 969 | ui->flash_laserno = rangeno; |
974 | ui->flash_laser = wouldflash; | 970 | ui->flash_laser = wouldflash; |
975 | nullret = ""; | 971 | nullret = UI_UPDATE; |
976 | if (state->exits[rangeno] != LASER_EMPTY) | 972 | if (state->exits[rangeno] != LASER_EMPTY) |
977 | return ""; | 973 | return UI_UPDATE; |
978 | sprintf(buf, "F%d", rangeno); | 974 | sprintf(buf, "F%d", rangeno); |
979 | break; | 975 | break; |
980 | 976 | ||
diff --git a/apps/plugins/puzzles/src/bridges.c b/apps/plugins/puzzles/src/bridges.c index 6975208fd6..0a326f2a42 100644 --- a/apps/plugins/puzzles/src/bridges.c +++ b/apps/plugins/puzzles/src/bridges.c | |||
@@ -742,44 +742,40 @@ static config_item *game_configure(const game_params *params) | |||
742 | ret[0].name = "Width"; | 742 | ret[0].name = "Width"; |
743 | ret[0].type = C_STRING; | 743 | ret[0].type = C_STRING; |
744 | sprintf(buf, "%d", params->w); | 744 | sprintf(buf, "%d", params->w); |
745 | ret[0].sval = dupstr(buf); | 745 | ret[0].u.string.sval = dupstr(buf); |
746 | ret[0].ival = 0; | ||
747 | 746 | ||
748 | ret[1].name = "Height"; | 747 | ret[1].name = "Height"; |
749 | ret[1].type = C_STRING; | 748 | ret[1].type = C_STRING; |
750 | sprintf(buf, "%d", params->h); | 749 | sprintf(buf, "%d", params->h); |
751 | ret[1].sval = dupstr(buf); | 750 | ret[1].u.string.sval = dupstr(buf); |
752 | ret[1].ival = 0; | ||
753 | 751 | ||
754 | ret[2].name = "Difficulty"; | 752 | ret[2].name = "Difficulty"; |
755 | ret[2].type = C_CHOICES; | 753 | ret[2].type = C_CHOICES; |
756 | ret[2].sval = ":Easy:Medium:Hard"; | 754 | ret[2].u.choices.choicenames = ":Easy:Medium:Hard"; |
757 | ret[2].ival = params->difficulty; | 755 | ret[2].u.choices.selected = params->difficulty; |
758 | 756 | ||
759 | ret[3].name = "Allow loops"; | 757 | ret[3].name = "Allow loops"; |
760 | ret[3].type = C_BOOLEAN; | 758 | ret[3].type = C_BOOLEAN; |
761 | ret[3].sval = NULL; | 759 | ret[3].u.boolean.bval = params->allowloops; |
762 | ret[3].ival = params->allowloops; | ||
763 | 760 | ||
764 | ret[4].name = "Max. bridges per direction"; | 761 | ret[4].name = "Max. bridges per direction"; |
765 | ret[4].type = C_CHOICES; | 762 | ret[4].type = C_CHOICES; |
766 | ret[4].sval = ":1:2:3:4"; /* keep up-to-date with MAX_BRIDGES */ | 763 | ret[4].u.choices.choicenames = ":1:2:3:4"; /* keep up-to-date with |
767 | ret[4].ival = params->maxb - 1; | 764 | * MAX_BRIDGES */ |
765 | ret[4].u.choices.selected = params->maxb - 1; | ||
768 | 766 | ||
769 | ret[5].name = "%age of island squares"; | 767 | ret[5].name = "%age of island squares"; |
770 | ret[5].type = C_CHOICES; | 768 | ret[5].type = C_CHOICES; |
771 | ret[5].sval = ":5%:10%:15%:20%:25%:30%"; | 769 | ret[5].u.choices.choicenames = ":5%:10%:15%:20%:25%:30%"; |
772 | ret[5].ival = (params->islands / 5)-1; | 770 | ret[5].u.choices.selected = (params->islands / 5)-1; |
773 | 771 | ||
774 | ret[6].name = "Expansion factor (%age)"; | 772 | ret[6].name = "Expansion factor (%age)"; |
775 | ret[6].type = C_CHOICES; | 773 | ret[6].type = C_CHOICES; |
776 | ret[6].sval = ":0%:10%:20%:30%:40%:50%:60%:70%:80%:90%:100%"; | 774 | ret[6].u.choices.choicenames = ":0%:10%:20%:30%:40%:50%:60%:70%:80%:90%:100%"; |
777 | ret[6].ival = params->expansion / 10; | 775 | ret[6].u.choices.selected = params->expansion / 10; |
778 | 776 | ||
779 | ret[7].name = NULL; | 777 | ret[7].name = NULL; |
780 | ret[7].type = C_END; | 778 | ret[7].type = C_END; |
781 | ret[7].sval = NULL; | ||
782 | ret[7].ival = 0; | ||
783 | 779 | ||
784 | return ret; | 780 | return ret; |
785 | } | 781 | } |
@@ -788,18 +784,18 @@ static game_params *custom_params(const config_item *cfg) | |||
788 | { | 784 | { |
789 | game_params *ret = snew(game_params); | 785 | game_params *ret = snew(game_params); |
790 | 786 | ||
791 | ret->w = atoi(cfg[0].sval); | 787 | ret->w = atoi(cfg[0].u.string.sval); |
792 | ret->h = atoi(cfg[1].sval); | 788 | ret->h = atoi(cfg[1].u.string.sval); |
793 | ret->difficulty = cfg[2].ival; | 789 | ret->difficulty = cfg[2].u.choices.selected; |
794 | ret->allowloops = cfg[3].ival; | 790 | ret->allowloops = cfg[3].u.boolean.bval; |
795 | ret->maxb = cfg[4].ival + 1; | 791 | ret->maxb = cfg[4].u.choices.selected + 1; |
796 | ret->islands = (cfg[5].ival + 1) * 5; | 792 | ret->islands = (cfg[5].u.choices.selected + 1) * 5; |
797 | ret->expansion = cfg[6].ival * 10; | 793 | ret->expansion = cfg[6].u.choices.selected * 10; |
798 | 794 | ||
799 | return ret; | 795 | return ret; |
800 | } | 796 | } |
801 | 797 | ||
802 | static char *validate_params(const game_params *params, int full) | 798 | static const char *validate_params(const game_params *params, int full) |
803 | { | 799 | { |
804 | if (params->w < 3 || params->h < 3) | 800 | if (params->w < 3 || params->h < 3) |
805 | return "Width and height must be at least 3"; | 801 | return "Width and height must be at least 3"; |
@@ -1993,7 +1989,7 @@ generated: | |||
1993 | return ret; | 1989 | return ret; |
1994 | } | 1990 | } |
1995 | 1991 | ||
1996 | static char *validate_desc(const game_params *params, const char *desc) | 1992 | static const char *validate_desc(const game_params *params, const char *desc) |
1997 | { | 1993 | { |
1998 | int i, wh = params->w * params->h; | 1994 | int i, wh = params->w * params->h; |
1999 | 1995 | ||
@@ -2094,7 +2090,7 @@ static char *ui_cancel_drag(game_ui *ui) | |||
2094 | ui->dragx_src = ui->dragy_src = -1; | 2090 | ui->dragx_src = ui->dragy_src = -1; |
2095 | ui->dragx_dst = ui->dragy_dst = -1; | 2091 | ui->dragx_dst = ui->dragy_dst = -1; |
2096 | ui->dragging = 0; | 2092 | ui->dragging = 0; |
2097 | return ""; | 2093 | return UI_UPDATE; |
2098 | } | 2094 | } |
2099 | 2095 | ||
2100 | static game_ui *new_ui(const game_state *state) | 2096 | static game_ui *new_ui(const game_state *state) |
@@ -2282,7 +2278,7 @@ static char *update_drag_dst(const game_state *state, game_ui *ui, | |||
2282 | /*debug(("update_drag src (%d,%d) d(%d,%d) dst (%d,%d)\n", | 2278 | /*debug(("update_drag src (%d,%d) d(%d,%d) dst (%d,%d)\n", |
2283 | ui->dragx_src, ui->dragy_src, dx, dy, | 2279 | ui->dragx_src, ui->dragy_src, dx, dy, |
2284 | ui->dragx_dst, ui->dragy_dst));*/ | 2280 | ui->dragx_dst, ui->dragy_dst));*/ |
2285 | return ""; | 2281 | return UI_UPDATE; |
2286 | } | 2282 | } |
2287 | 2283 | ||
2288 | static char *finish_drag(const game_state *state, game_ui *ui) | 2284 | static char *finish_drag(const game_state *state, game_ui *ui) |
@@ -2325,7 +2321,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2325 | if (ggrid & G_ISLAND) { | 2321 | if (ggrid & G_ISLAND) { |
2326 | ui->dragx_src = gx; | 2322 | ui->dragx_src = gx; |
2327 | ui->dragy_src = gy; | 2323 | ui->dragy_src = gy; |
2328 | return ""; | 2324 | return UI_UPDATE; |
2329 | } else | 2325 | } else |
2330 | return ui_cancel_drag(ui); | 2326 | return ui_cancel_drag(ui); |
2331 | } else if (button == LEFT_DRAG || button == RIGHT_DRAG) { | 2327 | } else if (button == LEFT_DRAG || button == RIGHT_DRAG) { |
@@ -2339,7 +2335,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2339 | /* cancel a drag when we go back to the starting point */ | 2335 | /* cancel a drag when we go back to the starting point */ |
2340 | ui->dragx_dst = -1; | 2336 | ui->dragx_dst = -1; |
2341 | ui->dragy_dst = -1; | 2337 | ui->dragy_dst = -1; |
2342 | return ""; | 2338 | return UI_UPDATE; |
2343 | } | 2339 | } |
2344 | } else if (button == LEFT_RELEASE || button == RIGHT_RELEASE) { | 2340 | } else if (button == LEFT_RELEASE || button == RIGHT_RELEASE) { |
2345 | if (ui->dragging) { | 2341 | if (ui->dragging) { |
@@ -2424,19 +2420,19 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2424 | 2420 | ||
2425 | if (!dingrid) break; | 2421 | if (!dingrid) break; |
2426 | } | 2422 | } |
2427 | if (!oingrid) return ""; | 2423 | if (!oingrid) return UI_UPDATE; |
2428 | } | 2424 | } |
2429 | /* not reached */ | 2425 | /* not reached */ |
2430 | 2426 | ||
2431 | found: | 2427 | found: |
2432 | ui->cur_x = nx; | 2428 | ui->cur_x = nx; |
2433 | ui->cur_y = ny; | 2429 | ui->cur_y = ny; |
2434 | return ""; | 2430 | return UI_UPDATE; |
2435 | } | 2431 | } |
2436 | } else if (IS_CURSOR_SELECT(button)) { | 2432 | } else if (IS_CURSOR_SELECT(button)) { |
2437 | if (!ui->cur_visible) { | 2433 | if (!ui->cur_visible) { |
2438 | ui->cur_visible = 1; | 2434 | ui->cur_visible = 1; |
2439 | return ""; | 2435 | return UI_UPDATE; |
2440 | } | 2436 | } |
2441 | if (ui->dragging || button == CURSOR_SELECT2) { | 2437 | if (ui->dragging || button == CURSOR_SELECT2) { |
2442 | ui_cancel_drag(ui); | 2438 | ui_cancel_drag(ui); |
@@ -2444,7 +2440,7 @@ found: | |||
2444 | sprintf(buf, "M%d,%d", ui->cur_x, ui->cur_y); | 2440 | sprintf(buf, "M%d,%d", ui->cur_x, ui->cur_y); |
2445 | return dupstr(buf); | 2441 | return dupstr(buf); |
2446 | } else | 2442 | } else |
2447 | return ""; | 2443 | return UI_UPDATE; |
2448 | } else { | 2444 | } else { |
2449 | grid_type v = GRID(state, ui->cur_x, ui->cur_y); | 2445 | grid_type v = GRID(state, ui->cur_x, ui->cur_y); |
2450 | if (v & G_ISLAND) { | 2446 | if (v & G_ISLAND) { |
@@ -2453,7 +2449,7 @@ found: | |||
2453 | ui->dragy_src = ui->cur_y; | 2449 | ui->dragy_src = ui->cur_y; |
2454 | ui->dragx_dst = ui->dragy_dst = -1; | 2450 | ui->dragx_dst = ui->dragy_dst = -1; |
2455 | ui->drag_is_noline = (button == CURSOR_SELECT2) ? 1 : 0; | 2451 | ui->drag_is_noline = (button == CURSOR_SELECT2) ? 1 : 0; |
2456 | return ""; | 2452 | return UI_UPDATE; |
2457 | } | 2453 | } |
2458 | } | 2454 | } |
2459 | } else if ((button >= '0' && button <= '9') || | 2455 | } else if ((button >= '0' && button <= '9') || |
@@ -2471,7 +2467,7 @@ found: | |||
2471 | 2467 | ||
2472 | if (!ui->cur_visible) { | 2468 | if (!ui->cur_visible) { |
2473 | ui->cur_visible = 1; | 2469 | ui->cur_visible = 1; |
2474 | return ""; | 2470 | return UI_UPDATE; |
2475 | } | 2471 | } |
2476 | 2472 | ||
2477 | for (i = 0; i < state->n_islands; ++i) { | 2473 | for (i = 0; i < state->n_islands; ++i) { |
@@ -2498,12 +2494,12 @@ found: | |||
2498 | if (best_x != -1 && best_y != -1) { | 2494 | if (best_x != -1 && best_y != -1) { |
2499 | ui->cur_x = best_x; | 2495 | ui->cur_x = best_x; |
2500 | ui->cur_y = best_y; | 2496 | ui->cur_y = best_y; |
2501 | return ""; | 2497 | return UI_UPDATE; |
2502 | } else | 2498 | } else |
2503 | return NULL; | 2499 | return NULL; |
2504 | } else if (button == 'g' || button == 'G') { | 2500 | } else if (button == 'g' || button == 'G') { |
2505 | ui->show_hints = 1 - ui->show_hints; | 2501 | ui->show_hints = 1 - ui->show_hints; |
2506 | return ""; | 2502 | return UI_UPDATE; |
2507 | } | 2503 | } |
2508 | 2504 | ||
2509 | return NULL; | 2505 | return NULL; |
@@ -2577,7 +2573,7 @@ badmove: | |||
2577 | } | 2573 | } |
2578 | 2574 | ||
2579 | static char *solve_game(const game_state *state, const game_state *currstate, | 2575 | static char *solve_game(const game_state *state, const game_state *currstate, |
2580 | const char *aux, char **error) | 2576 | const char *aux, const char **error) |
2581 | { | 2577 | { |
2582 | char *ret; | 2578 | char *ret; |
2583 | game_state *solved; | 2579 | game_state *solved; |
diff --git a/apps/plugins/puzzles/src/combi.c b/apps/plugins/puzzles/src/combi.c index 4c5d1077aa..3460183c9c 100644 --- a/apps/plugins/puzzles/src/combi.c +++ b/apps/plugins/puzzles/src/combi.c | |||
@@ -79,7 +79,7 @@ void free_combi(combi_ctx *combi) | |||
79 | 79 | ||
80 | #include <stdio.h> | 80 | #include <stdio.h> |
81 | 81 | ||
82 | void fatal(char *fmt, ...) | 82 | void fatal(const char *fmt, ...) |
83 | { | 83 | { |
84 | abort(); | 84 | abort(); |
85 | } | 85 | } |
diff --git a/apps/plugins/puzzles/src/config.log b/apps/plugins/puzzles/src/config.log index 8bf125c515..b44728f053 100644 --- a/apps/plugins/puzzles/src/config.log +++ b/apps/plugins/puzzles/src/config.log | |||
@@ -4,7 +4,7 @@ running configure, to aid debugging if configure makes a mistake. | |||
4 | It was created by puzzles configure 6.66, which was | 4 | It was created by puzzles configure 6.66, which was |
5 | generated by GNU Autoconf 2.69. Invocation command line was | 5 | generated by GNU Autoconf 2.69. Invocation command line was |
6 | 6 | ||
7 | $ ./configure | 7 | $ ./configure --no-create --no-recursion |
8 | 8 | ||
9 | ## --------- ## | 9 | ## --------- ## |
10 | ## Platform. ## | 10 | ## Platform. ## |
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.69. Invocation command line was | |||
12 | 12 | ||
13 | hostname = alpha | 13 | hostname = alpha |
14 | uname -m = x86_64 | 14 | uname -m = x86_64 |
15 | uname -r = 4.8.4-1-ARCH | 15 | uname -r = 4.11.9-1-ARCH |
16 | uname -s = Linux | 16 | uname -s = Linux |
17 | uname -v = #1 SMP PREEMPT Sat Oct 22 18:26:57 CEST 2016 | 17 | uname -v = #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 |
18 | 18 | ||
19 | /usr/bin/uname -p = unknown | 19 | /usr/bin/uname -p = unknown |
20 | /bin/uname -X = unknown | 20 | /bin/uname -X = unknown |
@@ -42,11 +42,241 @@ PATH: /usr/bin/core_perl | |||
42 | ## Core tests. ## | 42 | ## Core tests. ## |
43 | ## ----------- ## | 43 | ## ----------- ## |
44 | 44 | ||
45 | configure:1943: checking for a BSD-compatible install | ||
46 | configure:2011: result: /usr/bin/install -c | ||
47 | configure:2022: checking whether build environment is sane | ||
48 | configure:2077: result: yes | ||
49 | configure:2228: checking for a thread-safe mkdir -p | ||
50 | configure:2267: result: /usr/bin/mkdir -p | ||
51 | configure:2274: checking for gawk | ||
52 | configure:2290: found /usr/bin/gawk | ||
53 | configure:2301: result: gawk | ||
54 | configure:2312: checking whether make sets $(MAKE) | ||
55 | configure:2334: result: yes | ||
56 | configure:2363: checking whether make supports nested variables | ||
57 | configure:2380: result: yes | ||
58 | configure:2554: checking for gcc | ||
59 | configure:2570: found /usr/bin/gcc | ||
60 | configure:2581: result: gcc | ||
61 | configure:2810: checking for C compiler version | ||
62 | configure:2819: gcc --version >&5 | ||
63 | gcc (GCC) 7.2.0 | ||
64 | Copyright (C) 2017 Free Software Foundation, Inc. | ||
65 | This is free software; see the source for copying conditions. There is NO | ||
66 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
67 | |||
68 | configure:2830: $? = 0 | ||
69 | configure:2819: gcc -v >&5 | ||
70 | Using built-in specs. | ||
71 | COLLECT_GCC=gcc | ||
72 | COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper | ||
73 | Target: x86_64-pc-linux-gnu | ||
74 | Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp | ||
75 | Thread model: posix | ||
76 | gcc version 7.2.0 (GCC) | ||
77 | configure:2830: $? = 0 | ||
78 | configure:2819: gcc -V >&5 | ||
79 | gcc: error: unrecognized command line option '-V' | ||
80 | gcc: fatal error: no input files | ||
81 | compilation terminated. | ||
82 | configure:2830: $? = 1 | ||
83 | configure:2819: gcc -qversion >&5 | ||
84 | gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? | ||
85 | gcc: fatal error: no input files | ||
86 | compilation terminated. | ||
87 | configure:2830: $? = 1 | ||
88 | configure:2850: checking whether the C compiler works | ||
89 | configure:2872: gcc conftest.c >&5 | ||
90 | configure:2876: $? = 0 | ||
91 | configure:2924: result: yes | ||
92 | configure:2927: checking for C compiler default output file name | ||
93 | configure:2929: result: a.out | ||
94 | configure:2935: checking for suffix of executables | ||
95 | configure:2942: gcc -o conftest conftest.c >&5 | ||
96 | configure:2946: $? = 0 | ||
97 | configure:2968: result: | ||
98 | configure:2990: checking whether we are cross compiling | ||
99 | configure:2998: gcc -o conftest conftest.c >&5 | ||
100 | configure:3002: $? = 0 | ||
101 | configure:3009: ./conftest | ||
102 | configure:3013: $? = 0 | ||
103 | configure:3028: result: no | ||
104 | configure:3033: checking for suffix of object files | ||
105 | configure:3055: gcc -c conftest.c >&5 | ||
106 | configure:3059: $? = 0 | ||
107 | configure:3080: result: o | ||
108 | configure:3084: checking whether we are using the GNU C compiler | ||
109 | configure:3103: gcc -c conftest.c >&5 | ||
110 | configure:3103: $? = 0 | ||
111 | configure:3112: result: yes | ||
112 | configure:3121: checking whether gcc accepts -g | ||
113 | configure:3141: gcc -c -g conftest.c >&5 | ||
114 | configure:3141: $? = 0 | ||
115 | configure:3182: result: yes | ||
116 | configure:3199: checking for gcc option to accept ISO C89 | ||
117 | configure:3262: gcc -c -g -O2 conftest.c >&5 | ||
118 | configure:3262: $? = 0 | ||
119 | configure:3275: result: none needed | ||
120 | configure:3300: checking whether gcc understands -c and -o together | ||
121 | configure:3322: gcc -c conftest.c -o conftest2.o | ||
122 | configure:3325: $? = 0 | ||
123 | configure:3322: gcc -c conftest.c -o conftest2.o | ||
124 | configure:3325: $? = 0 | ||
125 | configure:3337: result: yes | ||
126 | configure:3365: checking for style of include used by make | ||
127 | configure:3393: result: GNU | ||
128 | configure:3419: checking dependency style of gcc | ||
129 | configure:3530: result: gcc3 | ||
130 | configure:3591: checking for pkg-config | ||
131 | configure:3609: found /usr/bin/pkg-config | ||
132 | configure:3622: result: /usr/bin/pkg-config | ||
133 | configure:3643: checking for GTK+ - version >= 3.0.0 | ||
134 | configure:3750: gcc -o conftest -g -O2 -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 >&5 | ||
135 | configure:3750: $? = 0 | ||
136 | configure:3750: ./conftest | ||
137 | configure:3750: $? = 0 | ||
138 | configure:3764: result: yes (version 3.22.16) | ||
139 | configure:4287: checking for usable gcc warning flags | ||
140 | configure:4330: gcc -c -g -O2 -Wall -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c >&5 | ||
141 | configure:4330: $? = 0 | ||
142 | configure:4330: gcc -c -g -O2 -Wall -Werror -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c >&5 | ||
143 | configure:4330: $? = 0 | ||
144 | configure:4330: gcc -c -g -O2 -Wall -Werror -std=c89 -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c >&5 | ||
145 | configure:4330: $? = 0 | ||
146 | configure:4330: gcc -c -g -O2 -Wall -Werror -std=c89 -pedantic -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c >&5 | ||
147 | In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0, | ||
148 | from /usr/include/glib-2.0/glib/gtypes.h:32, | ||
149 | from /usr/include/glib-2.0/glib/galloca.h:32, | ||
150 | from /usr/include/glib-2.0/glib.h:30, | ||
151 | from /usr/include/gtk-3.0/gdk/gdkconfig.h:13, | ||
152 | from /usr/include/gtk-3.0/gdk/gdk.h:30, | ||
153 | from /usr/include/gtk-3.0/gtk/gtk.h:30, | ||
154 | from conftest.c:24: | ||
155 | /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64': | ||
156 | /usr/include/glib-2.0/glib/gtypes.h:423:41: error: ISO C90 does not support 'long long' [-Werror=long-long] | ||
157 | G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); | ||
158 | ^ | ||
159 | /usr/include/glib-2.0/glib/gmacros.h:232:104: note: in definition of macro 'G_STATIC_ASSERT' | ||
160 | #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED | ||
161 | ^~~~ | ||
162 | In file included from /usr/include/glib-2.0/glib/galloca.h:32:0, | ||
163 | from /usr/include/glib-2.0/glib.h:30, | ||
164 | from /usr/include/gtk-3.0/gdk/gdkconfig.h:13, | ||
165 | from /usr/include/gtk-3.0/gdk/gdk.h:30, | ||
166 | from /usr/include/gtk-3.0/gtk/gtk.h:30, | ||
167 | from conftest.c:24: | ||
168 | /usr/include/glib-2.0/glib/gtypes.h:424:58: error: ISO C90 does not support 'long long' [-Werror=long-long] | ||
169 | return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); } | ||
170 | ^~~~ | ||
171 | /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_MUL_U64': | ||
172 | /usr/include/glib-2.0/glib/gtypes.h:426:58: error: ISO C90 does not support 'long long' [-Werror=long-long] | ||
173 | return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); } | ||
174 | ^~~~ | ||
175 | In file included from /usr/include/glib-2.0/glib.h:62:0, | ||
176 | from /usr/include/gtk-3.0/gdk/gdkconfig.h:13, | ||
177 | from /usr/include/gtk-3.0/gdk/gdk.h:30, | ||
178 | from /usr/include/gtk-3.0/gtk/gtk.h:30, | ||
179 | from conftest.c:24: | ||
180 | /usr/include/glib-2.0/glib/gmessages.h: At top level: | ||
181 | /usr/include/glib-2.0/glib/gmessages.h:136:29: error: comma at end of enumerator list [-Werror=pedantic] | ||
182 | G_LOG_WRITER_UNHANDLED = 0, | ||
183 | ^ | ||
184 | /usr/include/glib-2.0/glib/gmessages.h:322:17: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
185 | #define g_error(...) G_STMT_START { \ | ||
186 | ^~~ | ||
187 | /usr/include/glib-2.0/glib/gmessages.h:328:19: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
188 | #define g_message(...) g_log (G_LOG_DOMAIN, \ | ||
189 | ^~~ | ||
190 | /usr/include/glib-2.0/glib/gmessages.h:331:20: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
191 | #define g_critical(...) g_log (G_LOG_DOMAIN, \ | ||
192 | ^~~ | ||
193 | /usr/include/glib-2.0/glib/gmessages.h:334:19: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
194 | #define g_warning(...) g_log (G_LOG_DOMAIN, \ | ||
195 | ^~~ | ||
196 | /usr/include/glib-2.0/glib/gmessages.h:337:16: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
197 | #define g_info(...) g_log (G_LOG_DOMAIN, \ | ||
198 | ^~~ | ||
199 | /usr/include/glib-2.0/glib/gmessages.h:340:17: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] | ||
200 | #define g_debug(...) g_log (G_LOG_DOMAIN, \ | ||
201 | ^~~ | ||
202 | In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:0, | ||
203 | from /usr/include/gtk-3.0/gdk/gdk.h:32, | ||
204 | from /usr/include/gtk-3.0/gtk/gtk.h:30, | ||
205 | from conftest.c:24: | ||
206 | /usr/include/gtk-3.0/gdk/gdktypes.h:319:39: error: comma at end of enumerator list [-Werror=pedantic] | ||
207 | GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK, | ||
208 | ^ | ||
209 | /usr/include/gtk-3.0/gdk/gdktypes.h:597:48: error: comma at end of enumerator list [-Werror=pedantic] | ||
210 | GDK_AXIS_FLAG_SLIDER = 1 << GDK_AXIS_SLIDER, | ||
211 | ^ | ||
212 | In file included from /usr/include/gtk-3.0/gdk/gdkevents.h:36:0, | ||
213 | from /usr/include/gtk-3.0/gdk/gdkdisplay.h:31, | ||
214 | from /usr/include/gtk-3.0/gdk/gdkscreen.h:32, | ||
215 | from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31, | ||
216 | from /usr/include/gtk-3.0/gdk/gdk.h:32, | ||
217 | from /usr/include/gtk-3.0/gtk/gtk.h:30, | ||
218 | from conftest.c:24: | ||
219 | /usr/include/gtk-3.0/gdk/gdkdevicetool.h:61:28: error: comma at end of enumerator list [-Werror=pedantic] | ||
220 | GDK_DEVICE_TOOL_TYPE_LENS, | ||
221 | ^ | ||
222 | cc1: all warnings being treated as errors | ||
223 | configure:4330: $? = 1 | ||
224 | configure: failed program was: | ||
225 | | /* confdefs.h */ | ||
226 | | #define PACKAGE_NAME "puzzles" | ||
227 | | #define PACKAGE_TARNAME "puzzles" | ||
228 | | #define PACKAGE_VERSION "6.66" | ||
229 | | #define PACKAGE_STRING "puzzles 6.66" | ||
230 | | #define PACKAGE_BUGREPORT "anakin@pobox.com" | ||
231 | | #define PACKAGE_URL "" | ||
232 | | #define PACKAGE "puzzles" | ||
233 | | #define VERSION "6.66" | ||
234 | | /* end confdefs.h. */ | ||
235 | | | ||
236 | | #include <stdio.h> | ||
237 | | #include <assert.h> | ||
238 | | #include <stdlib.h> | ||
239 | | #include <time.h> | ||
240 | | #include <stdarg.h> | ||
241 | | #include <string.h> | ||
242 | | #include <errno.h> | ||
243 | | #include <math.h> | ||
244 | | | ||
245 | | #include <sys/time.h> | ||
246 | | #include <sys/resource.h> | ||
247 | | | ||
248 | | #include <gtk/gtk.h> | ||
249 | | #include <gdk/gdkkeysyms.h> | ||
250 | | | ||
251 | | #include <gdk-pixbuf/gdk-pixbuf.h> | ||
252 | | | ||
253 | | #include <gdk/gdkx.h> | ||
254 | | #include <X11/Xlib.h> | ||
255 | | #include <X11/Xutil.h> | ||
256 | | #include <X11/Xatom.h> | ||
257 | | | ||
258 | | int | ||
259 | | main () | ||
260 | | { | ||
261 | | | ||
262 | | return 0; | ||
263 | | | ||
264 | | ; | ||
265 | | return 0; | ||
266 | | } | ||
267 | configure:4337: result: -Wall -Werror -std=c89 | ||
268 | configure:4385: checking for ranlib | ||
269 | configure:4401: found /usr/bin/ranlib | ||
270 | configure:4412: result: ranlib | ||
271 | configure:4582: checking that generated files are newer than configure | ||
272 | configure:4588: result: done | ||
273 | configure:4611: creating ./config.status | ||
45 | 274 | ||
46 | ## ---------------- ## | 275 | ## ---------------- ## |
47 | ## Cache variables. ## | 276 | ## Cache variables. ## |
48 | ## ---------------- ## | 277 | ## ---------------- ## |
49 | 278 | ||
279 | ac_cv_c_compiler_gnu=yes | ||
50 | ac_cv_env_CC_set= | 280 | ac_cv_env_CC_set= |
51 | ac_cv_env_CC_value= | 281 | ac_cv_env_CC_value= |
52 | ac_cv_env_CFLAGS_set= | 282 | ac_cv_env_CFLAGS_set= |
@@ -57,33 +287,74 @@ ac_cv_env_LDFLAGS_set= | |||
57 | ac_cv_env_LDFLAGS_value= | 287 | ac_cv_env_LDFLAGS_value= |
58 | ac_cv_env_LIBS_set= | 288 | ac_cv_env_LIBS_set= |
59 | ac_cv_env_LIBS_value= | 289 | ac_cv_env_LIBS_value= |
290 | ac_cv_env_PKG_CONFIG_LIBDIR_set= | ||
291 | ac_cv_env_PKG_CONFIG_LIBDIR_value= | ||
292 | ac_cv_env_PKG_CONFIG_PATH_set= | ||
293 | ac_cv_env_PKG_CONFIG_PATH_value= | ||
294 | ac_cv_env_PKG_CONFIG_set= | ||
295 | ac_cv_env_PKG_CONFIG_value= | ||
60 | ac_cv_env_build_alias_set= | 296 | ac_cv_env_build_alias_set= |
61 | ac_cv_env_build_alias_value= | 297 | ac_cv_env_build_alias_value= |
62 | ac_cv_env_host_alias_set= | 298 | ac_cv_env_host_alias_set= |
63 | ac_cv_env_host_alias_value= | 299 | ac_cv_env_host_alias_value= |
64 | ac_cv_env_target_alias_set= | 300 | ac_cv_env_target_alias_set= |
65 | ac_cv_env_target_alias_value= | 301 | ac_cv_env_target_alias_value= |
302 | ac_cv_objext=o | ||
303 | ac_cv_path_PKG_CONFIG=/usr/bin/pkg-config | ||
304 | ac_cv_path_install='/usr/bin/install -c' | ||
305 | ac_cv_path_mkdir=/usr/bin/mkdir | ||
306 | ac_cv_prog_AWK=gawk | ||
307 | ac_cv_prog_ac_ct_CC=gcc | ||
308 | ac_cv_prog_ac_ct_RANLIB=ranlib | ||
309 | ac_cv_prog_cc_c89= | ||
310 | ac_cv_prog_cc_g=yes | ||
311 | ac_cv_prog_make_make_set=yes | ||
312 | am_cv_CC_dependencies_compiler_type=gcc3 | ||
313 | am_cv_make_support_nested_variables=yes | ||
314 | am_cv_prog_cc_c_o=yes | ||
66 | 315 | ||
67 | ## ----------------- ## | 316 | ## ----------------- ## |
68 | ## Output variables. ## | 317 | ## Output variables. ## |
69 | ## ----------------- ## | 318 | ## ----------------- ## |
70 | 319 | ||
71 | CC='' | 320 | ACLOCAL='${SHELL} /home/franklin/puzzles/missing aclocal-1.15' |
72 | CFLAGS='' | 321 | AMDEPBACKSLASH='\' |
322 | AMDEP_FALSE='#' | ||
323 | AMDEP_TRUE='' | ||
324 | AMTAR='$${TAR-tar}' | ||
325 | AM_BACKSLASH='\' | ||
326 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | ||
327 | AM_DEFAULT_VERBOSITY='1' | ||
328 | AM_V='$(V)' | ||
329 | AUTOCONF='${SHELL} /home/franklin/puzzles/missing autoconf' | ||
330 | AUTOHEADER='${SHELL} /home/franklin/puzzles/missing autoheader' | ||
331 | AUTOMAKE='${SHELL} /home/franklin/puzzles/missing automake-1.15' | ||
332 | AWK='gawk' | ||
333 | CC='gcc' | ||
334 | CCDEPMODE='depmode=gcc3' | ||
335 | CFLAGS='-g -O2 -Wall -Werror -std=c89' | ||
73 | CPPFLAGS='' | 336 | CPPFLAGS='' |
74 | DEFS='' | 337 | CYGPATH_W='echo' |
338 | DEFS='-DPACKAGE_NAME=\"puzzles\" -DPACKAGE_TARNAME=\"puzzles\" -DPACKAGE_VERSION=\"6.66\" -DPACKAGE_STRING=\"puzzles\ 6.66\" -DPACKAGE_BUGREPORT=\"anakin@pobox.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"puzzles\" -DVERSION=\"6.66\"' | ||
339 | DEPDIR='.deps' | ||
75 | ECHO_C='' | 340 | ECHO_C='' |
76 | ECHO_N='-n' | 341 | ECHO_N='-n' |
77 | ECHO_T='' | 342 | ECHO_T='' |
78 | EXEEXT='' | 343 | EXEEXT='' |
79 | INSTALL_DATA='' | 344 | GTK_CFLAGS='-pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include' |
80 | INSTALL_PROGRAM='' | 345 | GTK_LIBS='-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0' |
81 | INSTALL_SCRIPT='' | 346 | INSTALL_DATA='${INSTALL} -m 644' |
347 | INSTALL_PROGRAM='${INSTALL}' | ||
348 | INSTALL_SCRIPT='${INSTALL}' | ||
349 | INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' | ||
82 | LDFLAGS='' | 350 | LDFLAGS='' |
83 | LIBOBJS='' | 351 | LIBOBJS='' |
84 | LIBS='' | 352 | LIBS='' |
85 | LTLIBOBJS='' | 353 | LTLIBOBJS='' |
86 | OBJEXT='' | 354 | MAKEINFO='${SHELL} /home/franklin/puzzles/missing makeinfo' |
355 | MKDIR_P='/usr/bin/mkdir -p' | ||
356 | OBJEXT='o' | ||
357 | PACKAGE='puzzles' | ||
87 | PACKAGE_BUGREPORT='anakin@pobox.com' | 358 | PACKAGE_BUGREPORT='anakin@pobox.com' |
88 | PACKAGE_NAME='puzzles' | 359 | PACKAGE_NAME='puzzles' |
89 | PACKAGE_STRING='puzzles 6.66' | 360 | PACKAGE_STRING='puzzles 6.66' |
@@ -91,28 +362,47 @@ PACKAGE_TARNAME='puzzles' | |||
91 | PACKAGE_URL='' | 362 | PACKAGE_URL='' |
92 | PACKAGE_VERSION='6.66' | 363 | PACKAGE_VERSION='6.66' |
93 | PATH_SEPARATOR=':' | 364 | PATH_SEPARATOR=':' |
94 | RANLIB='' | 365 | PKG_CONFIG='/usr/bin/pkg-config' |
366 | PKG_CONFIG_LIBDIR='' | ||
367 | PKG_CONFIG_PATH='' | ||
368 | RANLIB='ranlib' | ||
369 | SET_MAKE='' | ||
95 | SHELL='/bin/sh' | 370 | SHELL='/bin/sh' |
96 | ac_ct_CC='' | 371 | STRIP='' |
372 | VERSION='6.66' | ||
373 | ac_ct_CC='gcc' | ||
374 | am__EXEEXT_FALSE='' | ||
375 | am__EXEEXT_TRUE='#' | ||
376 | am__fastdepCC_FALSE='#' | ||
377 | am__fastdepCC_TRUE='' | ||
378 | am__include='include' | ||
379 | am__isrc='' | ||
380 | am__leading_dot='.' | ||
381 | am__nodep='_no' | ||
382 | am__quote='' | ||
383 | am__tar='$${TAR-tar} chof - "$$tardir"' | ||
384 | am__untar='$${TAR-tar} xf -' | ||
97 | bindir='${exec_prefix}/bin' | 385 | bindir='${exec_prefix}/bin' |
98 | build_alias='' | 386 | build_alias='' |
99 | datadir='${datarootdir}' | 387 | datadir='${datarootdir}' |
100 | datarootdir='${prefix}/share' | 388 | datarootdir='${prefix}/share' |
101 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | 389 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
102 | dvidir='${docdir}' | 390 | dvidir='${docdir}' |
103 | exec_prefix='NONE' | 391 | exec_prefix='${prefix}' |
104 | host_alias='' | 392 | host_alias='' |
105 | htmldir='${docdir}' | 393 | htmldir='${docdir}' |
106 | includedir='${prefix}/include' | 394 | includedir='${prefix}/include' |
107 | infodir='${datarootdir}/info' | 395 | infodir='${datarootdir}/info' |
396 | install_sh='${SHELL} /home/franklin/puzzles/install-sh' | ||
108 | libdir='${exec_prefix}/lib' | 397 | libdir='${exec_prefix}/lib' |
109 | libexecdir='${exec_prefix}/libexec' | 398 | libexecdir='${exec_prefix}/libexec' |
110 | localedir='${datarootdir}/locale' | 399 | localedir='${datarootdir}/locale' |
111 | localstatedir='${prefix}/var' | 400 | localstatedir='${prefix}/var' |
112 | mandir='${datarootdir}/man' | 401 | mandir='${datarootdir}/man' |
402 | mkdir_p='$(MKDIR_P)' | ||
113 | oldincludedir='/usr/include' | 403 | oldincludedir='/usr/include' |
114 | pdfdir='${docdir}' | 404 | pdfdir='${docdir}' |
115 | prefix='NONE' | 405 | prefix='/usr/local' |
116 | program_transform_name='s,x,x,' | 406 | program_transform_name='s,x,x,' |
117 | psdir='${docdir}' | 407 | psdir='${docdir}' |
118 | sbindir='${exec_prefix}/sbin' | 408 | sbindir='${exec_prefix}/sbin' |
@@ -131,5 +421,25 @@ target_alias='' | |||
131 | #define PACKAGE_STRING "puzzles 6.66" | 421 | #define PACKAGE_STRING "puzzles 6.66" |
132 | #define PACKAGE_BUGREPORT "anakin@pobox.com" | 422 | #define PACKAGE_BUGREPORT "anakin@pobox.com" |
133 | #define PACKAGE_URL "" | 423 | #define PACKAGE_URL "" |
424 | #define PACKAGE "puzzles" | ||
425 | #define VERSION "6.66" | ||
426 | |||
427 | configure: exit 0 | ||
428 | |||
429 | ## ---------------------- ## | ||
430 | ## Running config.status. ## | ||
431 | ## ---------------------- ## | ||
432 | |||
433 | This file was extended by puzzles config.status 6.66, which was | ||
434 | generated by GNU Autoconf 2.69. Invocation command line was | ||
435 | |||
436 | CONFIG_FILES = | ||
437 | CONFIG_HEADERS = | ||
438 | CONFIG_LINKS = | ||
439 | CONFIG_COMMANDS = | ||
440 | $ ./config.status | ||
441 | |||
442 | on alpha | ||
134 | 443 | ||
135 | configure: exit 2 | 444 | config.status:782: creating Makefile |
445 | config.status:954: executing depfiles commands | ||
diff --git a/apps/plugins/puzzles/src/cube.c b/apps/plugins/puzzles/src/cube.c index a30dc10b3f..2a79a81eef 100644 --- a/apps/plugins/puzzles/src/cube.c +++ b/apps/plugins/puzzles/src/cube.c | |||
@@ -238,7 +238,7 @@ static game_params *default_params(void) | |||
238 | static int game_fetch_preset(int i, char **name, game_params **params) | 238 | static int game_fetch_preset(int i, char **name, game_params **params) |
239 | { | 239 | { |
240 | game_params *ret = snew(game_params); | 240 | game_params *ret = snew(game_params); |
241 | char *str; | 241 | const char *str; |
242 | 242 | ||
243 | switch (i) { | 243 | switch (i) { |
244 | case 0: | 244 | case 0: |
@@ -489,25 +489,21 @@ static config_item *game_configure(const game_params *params) | |||
489 | 489 | ||
490 | ret[0].name = "Type of solid"; | 490 | ret[0].name = "Type of solid"; |
491 | ret[0].type = C_CHOICES; | 491 | ret[0].type = C_CHOICES; |
492 | ret[0].sval = ":Tetrahedron:Cube:Octahedron:Icosahedron"; | 492 | ret[0].u.choices.choicenames = ":Tetrahedron:Cube:Octahedron:Icosahedron"; |
493 | ret[0].ival = params->solid; | 493 | ret[0].u.choices.selected = params->solid; |
494 | 494 | ||
495 | ret[1].name = "Width / top"; | 495 | ret[1].name = "Width / top"; |
496 | ret[1].type = C_STRING; | 496 | ret[1].type = C_STRING; |
497 | sprintf(buf, "%d", params->d1); | 497 | sprintf(buf, "%d", params->d1); |
498 | ret[1].sval = dupstr(buf); | 498 | ret[1].u.string.sval = dupstr(buf); |
499 | ret[1].ival = 0; | ||
500 | 499 | ||
501 | ret[2].name = "Height / bottom"; | 500 | ret[2].name = "Height / bottom"; |
502 | ret[2].type = C_STRING; | 501 | ret[2].type = C_STRING; |
503 | sprintf(buf, "%d", params->d2); | 502 | sprintf(buf, "%d", params->d2); |
504 | ret[2].sval = dupstr(buf); | 503 | ret[2].u.string.sval = dupstr(buf); |
505 | ret[2].ival = 0; | ||
506 | 504 | ||
507 | ret[3].name = NULL; | 505 | ret[3].name = NULL; |
508 | ret[3].type = C_END; | 506 | ret[3].type = C_END; |
509 | ret[3].sval = NULL; | ||
510 | ret[3].ival = 0; | ||
511 | 507 | ||
512 | return ret; | 508 | return ret; |
513 | } | 509 | } |
@@ -516,9 +512,9 @@ static game_params *custom_params(const config_item *cfg) | |||
516 | { | 512 | { |
517 | game_params *ret = snew(game_params); | 513 | game_params *ret = snew(game_params); |
518 | 514 | ||
519 | ret->solid = cfg[0].ival; | 515 | ret->solid = cfg[0].u.choices.selected; |
520 | ret->d1 = atoi(cfg[1].sval); | 516 | ret->d1 = atoi(cfg[1].u.string.sval); |
521 | ret->d2 = atoi(cfg[2].sval); | 517 | ret->d2 = atoi(cfg[2].u.string.sval); |
522 | 518 | ||
523 | return ret; | 519 | return ret; |
524 | } | 520 | } |
@@ -538,7 +534,7 @@ static void count_grid_square_callback(void *ctx, struct grid_square *sq) | |||
538 | classes[thisclass]++; | 534 | classes[thisclass]++; |
539 | } | 535 | } |
540 | 536 | ||
541 | static char *validate_params(const game_params *params, int full) | 537 | static const char *validate_params(const game_params *params, int full) |
542 | { | 538 | { |
543 | int classes[5]; | 539 | int classes[5]; |
544 | int i; | 540 | int i; |
@@ -846,7 +842,7 @@ static struct solid *transform_poly(const struct solid *solid, int flip, | |||
846 | return ret; | 842 | return ret; |
847 | } | 843 | } |
848 | 844 | ||
849 | static char *validate_desc(const game_params *params, const char *desc) | 845 | static const char *validate_desc(const game_params *params, const char *desc) |
850 | { | 846 | { |
851 | int area = grid_area(params->d1, params->d2, solids[params->solid]->order); | 847 | int area = grid_area(params->d1, params->d2, solids[params->solid]->order); |
852 | int i, j; | 848 | int i, j; |
@@ -1004,7 +1000,7 @@ static void free_game(game_state *state) | |||
1004 | } | 1000 | } |
1005 | 1001 | ||
1006 | static char *solve_game(const game_state *state, const game_state *currstate, | 1002 | static char *solve_game(const game_state *state, const game_state *currstate, |
1007 | const char *aux, char **error) | 1003 | const char *aux, const char **error) |
1008 | { | 1004 | { |
1009 | return NULL; | 1005 | return NULL; |
1010 | } | 1006 | } |
diff --git a/apps/plugins/puzzles/src/devel.but b/apps/plugins/puzzles/src/devel.but index 25a6c62dfa..131678c17b 100644 --- a/apps/plugins/puzzles/src/devel.but +++ b/apps/plugins/puzzles/src/devel.but | |||
@@ -555,16 +555,15 @@ The \cw{config_item} structure contains the following elements: | |||
555 | 555 | ||
556 | \c char *name; | 556 | \c char *name; |
557 | \c int type; | 557 | \c int type; |
558 | \c char *sval; | 558 | \c union { /* type-specific fields */ } u; |
559 | \c int ival; | 559 | \e iiiiiiiiiiiiiiiiiiiiiiiiii |
560 | 560 | ||
561 | \c{name} is an ASCII string giving the textual label for a GUI | 561 | \c{name} is an ASCII string giving the textual label for a GUI |
562 | control. It is \e{not} expected to be dynamically allocated. | 562 | control. It is \e{not} expected to be dynamically allocated. |
563 | 563 | ||
564 | \c{type} contains one of a small number of \c{enum} values defining | 564 | \c{type} contains one of a small number of \c{enum} values defining |
565 | what type of control is being described. The meaning of the \c{sval} | 565 | what type of control is being described. The usable member of the |
566 | and \c{ival} fields depends on the value in \c{type}. The valid | 566 | union field \c{u} depends on \c{type}. The valid type values are: |
567 | values are: | ||
568 | 567 | ||
569 | \dt \c{C_STRING} | 568 | \dt \c{C_STRING} |
570 | 569 | ||
@@ -572,38 +571,64 @@ values are: | |||
572 | input. The back end does not bother informing the front end that the | 571 | input. The back end does not bother informing the front end that the |
573 | box is numeric rather than textual; some front ends do have the | 572 | box is numeric rather than textual; some front ends do have the |
574 | capacity to take this into account, but I decided it wasn't worth | 573 | capacity to take this into account, but I decided it wasn't worth |
575 | the extra complexity in the interface.) For this type, \c{ival} is | 574 | the extra complexity in the interface.) |
576 | unused, and \c{sval} contains a dynamically allocated string | 575 | |
577 | representing the contents of the input box. | 576 | \lcont{ |
577 | |||
578 | For controls of this type, \c{u.string} contains a single field | ||
579 | |||
580 | \c char *sval; | ||
581 | |||
582 | which stores a dynamically allocated string representing the contents | ||
583 | of the input box. | ||
584 | |||
585 | } | ||
578 | 586 | ||
579 | \dt \c{C_BOOLEAN} | 587 | \dt \c{C_BOOLEAN} |
580 | 588 | ||
581 | \dd Describes a simple checkbox. For this type, \c{sval} is unused, | 589 | \dd Describes a simple checkbox. |
582 | and \c{ival} is \cw{TRUE} or \cw{FALSE}. | 590 | |
591 | \lcont{ | ||
592 | |||
593 | For controls of this type, \c{u.boolean} contains a single field | ||
594 | |||
595 | \c int bval; | ||
596 | |||
597 | which is either \cw{TRUE} or \cw{FALSE}. | ||
598 | |||
599 | } | ||
583 | 600 | ||
584 | \dt \c{C_CHOICES} | 601 | \dt \c{C_CHOICES} |
585 | 602 | ||
586 | \dd Describes a drop-down list presenting one of a small number of | 603 | \dd Describes a drop-down list presenting one of a small number of |
587 | fixed choices. For this type, \c{sval} contains a list of strings | 604 | fixed choices. |
588 | describing the choices; the very first character of \c{sval} is used | ||
589 | as a delimiter when processing the rest (so that the strings | ||
590 | \cq{:zero:one:two}, \cq{!zero!one!two} and \cq{xzeroxonextwo} all | ||
591 | define a three-element list containing \cq{zero}, \cq{one} and | ||
592 | \cq{two}). \c{ival} contains the index of the currently selected | ||
593 | element, numbering from zero (so that in the above example, 0 would | ||
594 | mean \cq{zero} and 2 would mean \cq{two}). | ||
595 | 605 | ||
596 | \lcont{ | 606 | \lcont{ |
597 | 607 | ||
598 | Note that for this control type, \c{sval} is \e{not} dynamically | 608 | For controls of this type, \c{u.choices} contains two fields: |
599 | allocated, whereas it was for \c{C_STRING}. | 609 | |
610 | \c const char *choicenames; | ||
611 | \c int selected; | ||
612 | |||
613 | \c{choicenames} contains a list of strings describing the choices. The | ||
614 | very first character of \c{sval} is used as a delimiter when | ||
615 | processing the rest (so that the strings \cq{:zero:one:two}, | ||
616 | \cq{!zero!one!two} and \cq{xzeroxonextwo} all define a three-element | ||
617 | list containing \cq{zero}, \cq{one} and \cq{two}). | ||
618 | |||
619 | \c{selected} contains the index of the currently selected element, | ||
620 | numbering from zero (so that in the above example, 0 would mean | ||
621 | \cq{zero} and 2 would mean \cq{two}). | ||
622 | |||
623 | Note that \c{u.choices.choicenames} is \e{not} dynamically allocated, | ||
624 | unlike \c{u.string.sval}. | ||
600 | 625 | ||
601 | } | 626 | } |
602 | 627 | ||
603 | \dt \c{C_END} | 628 | \dt \c{C_END} |
604 | 629 | ||
605 | \dd Marks the end of the array of \c{config_item}s. All other fields | 630 | \dd Marks the end of the array of \c{config_item}s. There is no |
606 | are unused. | 631 | associated member of the union field \c{u} for this type. |
607 | 632 | ||
608 | The array returned from this function is expected to have filled in | 633 | The array returned from this function is expected to have filled in |
609 | the initial values of all the controls according to the input | 634 | the initial values of all the controls according to the input |
@@ -639,7 +664,8 @@ function is never called and need not do anything at all. | |||
639 | 664 | ||
640 | \S{backend-validate-params} \cw{validate_params()} | 665 | \S{backend-validate-params} \cw{validate_params()} |
641 | 666 | ||
642 | \c char *(*validate_params)(const game_params *params, int full); | 667 | \c const char *(*validate_params)(const game_params *params, |
668 | \c int full); | ||
643 | 669 | ||
644 | This function takes a \c{game_params} structure as input, and checks | 670 | This function takes a \c{game_params} structure as input, and checks |
645 | that the parameters described in it fall within sensible limits. (At | 671 | that the parameters described in it fall within sensible limits. (At |
@@ -724,7 +750,8 @@ again in the game description. | |||
724 | 750 | ||
725 | \S{backend-validate-desc} \cw{validate_desc()} | 751 | \S{backend-validate-desc} \cw{validate_desc()} |
726 | 752 | ||
727 | \c char *(*validate_desc)(const game_params *params, const char *desc); | 753 | \c const char *(*validate_desc)(const game_params *params, |
754 | \c const char *desc); | ||
728 | 755 | ||
729 | This function is given a game description, and its job is to | 756 | This function is given a game description, and its job is to |
730 | validate that it describes a puzzle which makes sense. | 757 | validate that it describes a puzzle which makes sense. |
@@ -907,10 +934,10 @@ divide mouse coordinates by it.) | |||
907 | in response to the input event; the puzzle was not interested in it | 934 | in response to the input event; the puzzle was not interested in it |
908 | at all. | 935 | at all. |
909 | 936 | ||
910 | \b Returning the empty string (\cw{""}) indicates that the input | 937 | \b Returning the special value \cw{UI_UPDATE} indicates that the input |
911 | event has resulted in a change being made to the \c{game_ui} which | 938 | event has resulted in a change being made to the \c{game_ui} which |
912 | will require a redraw of the game window, but that no actual | 939 | will require a redraw of the game window, but that no actual \e{move} |
913 | \e{move} was made (i.e. no new \c{game_state} needs to be created). | 940 | was made (i.e. no new \c{game_state} needs to be created). |
914 | 941 | ||
915 | \b Returning anything else indicates that a move was made and that a | 942 | \b Returning anything else indicates that a move was made and that a |
916 | new \c{game_state} must be created. However, instead of actually | 943 | new \c{game_state} must be created. However, instead of actually |
@@ -925,7 +952,7 @@ strings can be written to disk when saving the game and fed to | |||
925 | 952 | ||
926 | The return value from \cw{interpret_move()} is expected to be | 953 | The return value from \cw{interpret_move()} is expected to be |
927 | dynamically allocated if and only if it is not either \cw{NULL} | 954 | dynamically allocated if and only if it is not either \cw{NULL} |
928 | \e{or} the empty string. | 955 | \e{or} the special string constant \c{UI_UPDATE}. |
929 | 956 | ||
930 | After this function is called, the back end is permitted to rely on | 957 | After this function is called, the back end is permitted to rely on |
931 | some subsequent operations happening in sequence: | 958 | some subsequent operations happening in sequence: |
@@ -1028,7 +1055,7 @@ not even offer the \q{Solve} menu option. | |||
1028 | \S{backend-solve} \cw{solve()} | 1055 | \S{backend-solve} \cw{solve()} |
1029 | 1056 | ||
1030 | \c char *(*solve)(const game_state *orig, const game_state *curr, | 1057 | \c char *(*solve)(const game_state *orig, const game_state *curr, |
1031 | \c const char *aux, char **error); | 1058 | \c const char *aux, const char **error); |
1032 | 1059 | ||
1033 | This function is called when the user selects the \q{Solve} option | 1060 | This function is called when the user selects the \q{Solve} option |
1034 | from the menu. | 1061 | from the menu. |
@@ -1934,7 +1961,8 @@ This ensures that thin lines are visible even at small scales. | |||
1934 | \S{drawing-draw-text} \cw{draw_text()} | 1961 | \S{drawing-draw-text} \cw{draw_text()} |
1935 | 1962 | ||
1936 | \c void draw_text(drawing *dr, int x, int y, int fonttype, | 1963 | \c void draw_text(drawing *dr, int x, int y, int fonttype, |
1937 | \c int fontsize, int align, int colour, char *text); | 1964 | \c int fontsize, int align, int colour, |
1965 | \c const char *text); | ||
1938 | 1966 | ||
1939 | Draws text in the puzzle window. | 1967 | Draws text in the puzzle window. |
1940 | 1968 | ||
@@ -2095,7 +2123,7 @@ printing routines, that code may safely call \cw{draw_update()}.) | |||
2095 | 2123 | ||
2096 | \S{drawing-status-bar} \cw{status_bar()} | 2124 | \S{drawing-status-bar} \cw{status_bar()} |
2097 | 2125 | ||
2098 | \c void status_bar(drawing *dr, char *text); | 2126 | \c void status_bar(drawing *dr, const char *text); |
2099 | 2127 | ||
2100 | Sets the text in the game's status bar to \c{text}. The text is copied | 2128 | Sets the text in the game's status bar to \c{text}. The text is copied |
2101 | from the supplied buffer, so the caller is free to deallocate or | 2129 | from the supplied buffer, so the caller is free to deallocate or |
@@ -2366,7 +2394,8 @@ function \cw{drawing_new()} (see \k{drawing-new}). | |||
2366 | \S{drawingapi-draw-text} \cw{draw_text()} | 2394 | \S{drawingapi-draw-text} \cw{draw_text()} |
2367 | 2395 | ||
2368 | \c void (*draw_text)(void *handle, int x, int y, int fonttype, | 2396 | \c void (*draw_text)(void *handle, int x, int y, int fonttype, |
2369 | \c int fontsize, int align, int colour, char *text); | 2397 | \c int fontsize, int align, int colour, |
2398 | \c const char *text); | ||
2370 | 2399 | ||
2371 | This function behaves exactly like the back end \cw{draw_text()} | 2400 | This function behaves exactly like the back end \cw{draw_text()} |
2372 | function; see \k{drawing-draw-text}. | 2401 | function; see \k{drawing-draw-text}. |
@@ -2469,7 +2498,7 @@ called unless drawing is attempted. | |||
2469 | 2498 | ||
2470 | \S{drawingapi-status-bar} \cw{status_bar()} | 2499 | \S{drawingapi-status-bar} \cw{status_bar()} |
2471 | 2500 | ||
2472 | \c void (*status_bar)(void *handle, char *text); | 2501 | \c void (*status_bar)(void *handle, const char *text); |
2473 | 2502 | ||
2474 | This function behaves exactly like the back end \cw{status_bar()} | 2503 | This function behaves exactly like the back end \cw{status_bar()} |
2475 | function; see \k{drawing-status-bar}. | 2504 | function; see \k{drawing-status-bar}. |
@@ -3129,8 +3158,8 @@ will probably need to pass it to \cw{midend_set_config}.) | |||
3129 | 3158 | ||
3130 | \H{midend-set-config} \cw{midend_set_config()} | 3159 | \H{midend-set-config} \cw{midend_set_config()} |
3131 | 3160 | ||
3132 | \c char *midend_set_config(midend *me, int which, | 3161 | \c const char *midend_set_config(midend *me, int which, |
3133 | \c config_item *cfg); | 3162 | \c config_item *cfg); |
3134 | 3163 | ||
3135 | Passes the mid-end the results of a configuration dialog box. | 3164 | Passes the mid-end the results of a configuration dialog box. |
3136 | \c{which} should have the same value which it had when | 3165 | \c{which} should have the same value which it had when |
@@ -3151,7 +3180,7 @@ using \cw{midend_size()} and eventually perform a refresh using | |||
3151 | 3180 | ||
3152 | \H{midend-game-id} \cw{midend_game_id()} | 3181 | \H{midend-game-id} \cw{midend_game_id()} |
3153 | 3182 | ||
3154 | \c char *midend_game_id(midend *me, char *id); | 3183 | \c const char *midend_game_id(midend *me, const char *id); |
3155 | 3184 | ||
3156 | Passes the mid-end a string game ID (of any of the valid forms | 3185 | Passes the mid-end a string game ID (of any of the valid forms |
3157 | \cq{params}, \cq{params:description} or \cq{params#seed}) which the | 3186 | \cq{params}, \cq{params:description} or \cq{params#seed}) which the |
@@ -3219,7 +3248,7 @@ conversion. | |||
3219 | 3248 | ||
3220 | \H{midend-solve} \cw{midend_solve()} | 3249 | \H{midend-solve} \cw{midend_solve()} |
3221 | 3250 | ||
3222 | \c char *midend_solve(midend *me); | 3251 | \c const char *midend_solve(midend *me); |
3223 | 3252 | ||
3224 | Requests the mid-end to perform a Solve operation. | 3253 | Requests the mid-end to perform a Solve operation. |
3225 | 3254 | ||
@@ -3267,8 +3296,7 @@ visually activate and deactivate a redo button. | |||
3267 | \H{midend-serialise} \cw{midend_serialise()} | 3296 | \H{midend-serialise} \cw{midend_serialise()} |
3268 | 3297 | ||
3269 | \c void midend_serialise(midend *me, | 3298 | \c void midend_serialise(midend *me, |
3270 | \c void (*write)(void *ctx, void *buf, int len), | 3299 | \c void (*write)(void *ctx, const void *buf, int len), void *wctx); |
3271 | \c void *wctx); | ||
3272 | 3300 | ||
3273 | Calling this function causes the mid-end to convert its entire | 3301 | Calling this function causes the mid-end to convert its entire |
3274 | internal state into a long ASCII text string, and to pass that | 3302 | internal state into a long ASCII text string, and to pass that |
@@ -3291,9 +3319,8 @@ output string. | |||
3291 | 3319 | ||
3292 | \H{midend-deserialise} \cw{midend_deserialise()} | 3320 | \H{midend-deserialise} \cw{midend_deserialise()} |
3293 | 3321 | ||
3294 | \c char *midend_deserialise(midend *me, | 3322 | \c const char *midend_deserialise(midend *me, |
3295 | \c int (*read)(void *ctx, void *buf, int len), | 3323 | \c int (*read)(void *ctx, void *buf, int len), void *rctx); |
3296 | \c void *rctx); | ||
3297 | 3324 | ||
3298 | This function is the counterpart to \cw{midend_serialise()}. It | 3325 | This function is the counterpart to \cw{midend_serialise()}. It |
3299 | calls the supplied \cw{read} function repeatedly to read a quantity | 3326 | calls the supplied \cw{read} function repeatedly to read a quantity |
@@ -3330,9 +3357,8 @@ place. | |||
3330 | 3357 | ||
3331 | \H{identify-game} \cw{identify_game()} | 3358 | \H{identify-game} \cw{identify_game()} |
3332 | 3359 | ||
3333 | \c char *identify_game(char **name, | 3360 | \c const char *identify_game(char **name, |
3334 | \c int (*read)(void *ctx, void *buf, int len), | 3361 | \c int (*read)(void *ctx, void *buf, int len), void *rctx); |
3335 | \c void *rctx); | ||
3336 | 3362 | ||
3337 | This function examines a serialised midend stream, of the same kind | 3363 | This function examines a serialised midend stream, of the same kind |
3338 | used by \cw{midend_serialise()} and \cw{midend_deserialise()}, and | 3364 | used by \cw{midend_serialise()} and \cw{midend_deserialise()}, and |
@@ -3482,7 +3508,7 @@ calling \cw{midend_timer()}. | |||
3482 | 3508 | ||
3483 | \H{frontend-fatal} \cw{fatal()} | 3509 | \H{frontend-fatal} \cw{fatal()} |
3484 | 3510 | ||
3485 | \c void fatal(char *fmt, ...); | 3511 | \c void fatal(const char *fmt, ...); |
3486 | 3512 | ||
3487 | This is called by some utility functions if they encounter a | 3513 | This is called by some utility functions if they encounter a |
3488 | genuinely fatal error such as running out of memory. It is a | 3514 | genuinely fatal error such as running out of memory. It is a |
@@ -3737,10 +3763,10 @@ quite everywhere.) | |||
3737 | 3763 | ||
3738 | \c void free_cfg(config_item *cfg); | 3764 | \c void free_cfg(config_item *cfg); |
3739 | 3765 | ||
3740 | This function correctly frees an array of \c{config_item}s, | 3766 | This function correctly frees an array of \c{config_item}s, including |
3741 | including walking the array until it gets to the end and freeing | 3767 | walking the array until it gets to the end and freeing any subsidiary |
3742 | precisely those \c{sval} fields which are expected to be dynamically | 3768 | data items in each \c{u} sub-union which are expected to be |
3743 | allocated. | 3769 | dynamically allocated. |
3744 | 3770 | ||
3745 | (See \k{backend-configure} for details of the \c{config_item} | 3771 | (See \k{backend-configure} for details of the \c{config_item} |
3746 | structure.) | 3772 | structure.) |
diff --git a/apps/plugins/puzzles/src/dominosa.c b/apps/plugins/puzzles/src/dominosa.c index c86ba19dfa..a072ac6168 100644 --- a/apps/plugins/puzzles/src/dominosa.c +++ b/apps/plugins/puzzles/src/dominosa.c | |||
@@ -169,18 +169,14 @@ static config_item *game_configure(const game_params *params) | |||
169 | ret[0].name = "Maximum number on dominoes"; | 169 | ret[0].name = "Maximum number on dominoes"; |
170 | ret[0].type = C_STRING; | 170 | ret[0].type = C_STRING; |
171 | sprintf(buf, "%d", params->n); | 171 | sprintf(buf, "%d", params->n); |
172 | ret[0].sval = dupstr(buf); | 172 | ret[0].u.string.sval = dupstr(buf); |
173 | ret[0].ival = 0; | ||
174 | 173 | ||
175 | ret[1].name = "Ensure unique solution"; | 174 | ret[1].name = "Ensure unique solution"; |
176 | ret[1].type = C_BOOLEAN; | 175 | ret[1].type = C_BOOLEAN; |
177 | ret[1].sval = NULL; | 176 | ret[1].u.boolean.bval = params->unique; |
178 | ret[1].ival = params->unique; | ||
179 | 177 | ||
180 | ret[2].name = NULL; | 178 | ret[2].name = NULL; |
181 | ret[2].type = C_END; | 179 | ret[2].type = C_END; |
182 | ret[2].sval = NULL; | ||
183 | ret[2].ival = 0; | ||
184 | 180 | ||
185 | return ret; | 181 | return ret; |
186 | } | 182 | } |
@@ -189,13 +185,13 @@ static game_params *custom_params(const config_item *cfg) | |||
189 | { | 185 | { |
190 | game_params *ret = snew(game_params); | 186 | game_params *ret = snew(game_params); |
191 | 187 | ||
192 | ret->n = atoi(cfg[0].sval); | 188 | ret->n = atoi(cfg[0].u.string.sval); |
193 | ret->unique = cfg[1].ival; | 189 | ret->unique = cfg[1].u.boolean.bval; |
194 | 190 | ||
195 | return ret; | 191 | return ret; |
196 | } | 192 | } |
197 | 193 | ||
198 | static char *validate_params(const game_params *params, int full) | 194 | static const char *validate_params(const game_params *params, int full) |
199 | { | 195 | { |
200 | if (params->n < 1) | 196 | if (params->n < 1) |
201 | return "Maximum face number must be at least one"; | 197 | return "Maximum face number must be at least one"; |
@@ -748,12 +744,12 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
748 | return ret; | 744 | return ret; |
749 | } | 745 | } |
750 | 746 | ||
751 | static char *validate_desc(const game_params *params, const char *desc) | 747 | static const char *validate_desc(const game_params *params, const char *desc) |
752 | { | 748 | { |
753 | int n = params->n, w = n+2, h = n+1, wh = w*h; | 749 | int n = params->n, w = n+2, h = n+1, wh = w*h; |
754 | int *occurrences; | 750 | int *occurrences; |
755 | int i, j; | 751 | int i, j; |
756 | char *ret; | 752 | const char *ret; |
757 | 753 | ||
758 | ret = NULL; | 754 | ret = NULL; |
759 | occurrences = snewn(n+1, int); | 755 | occurrences = snewn(n+1, int); |
@@ -875,7 +871,7 @@ static void free_game(game_state *state) | |||
875 | } | 871 | } |
876 | 872 | ||
877 | static char *solve_game(const game_state *state, const game_state *currstate, | 873 | static char *solve_game(const game_state *state, const game_state *currstate, |
878 | const char *aux, char **error) | 874 | const char *aux, const char **error) |
879 | { | 875 | { |
880 | int n = state->params.n, w = n+2, h = n+1, wh = w*h; | 876 | int n = state->params.n, w = n+2, h = n+1, wh = w*h; |
881 | int *placements; | 877 | int *placements; |
@@ -1119,7 +1115,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1119 | 1115 | ||
1120 | move_cursor(button, &ui->cur_x, &ui->cur_y, 2*w-1, 2*h-1, 0); | 1116 | move_cursor(button, &ui->cur_x, &ui->cur_y, 2*w-1, 2*h-1, 0); |
1121 | 1117 | ||
1122 | return ""; | 1118 | return UI_UPDATE; |
1123 | } else if (IS_CURSOR_SELECT(button)) { | 1119 | } else if (IS_CURSOR_SELECT(button)) { |
1124 | int d1, d2; | 1120 | int d1, d2; |
1125 | 1121 | ||
@@ -1152,7 +1148,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1152 | } else { | 1148 | } else { |
1153 | return NULL; | 1149 | return NULL; |
1154 | } | 1150 | } |
1155 | return ""; | 1151 | return UI_UPDATE; |
1156 | } | 1152 | } |
1157 | 1153 | ||
1158 | return NULL; | 1154 | return NULL; |
diff --git a/apps/plugins/puzzles/src/drawing.c b/apps/plugins/puzzles/src/drawing.c index a10a7f06d6..caf0b4b43a 100644 --- a/apps/plugins/puzzles/src/drawing.c +++ b/apps/plugins/puzzles/src/drawing.c | |||
@@ -71,7 +71,7 @@ void drawing_free(drawing *dr) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, | 73 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, |
74 | int align, int colour, char *text) | 74 | int align, int colour, const char *text) |
75 | { | 75 | { |
76 | dr->api->draw_text(dr->handle, x, y, fonttype, fontsize, align, | 76 | dr->api->draw_text(dr->handle, x, y, fonttype, fontsize, align, |
77 | colour, text); | 77 | colour, text); |
@@ -190,7 +190,7 @@ char *text_fallback(drawing *dr, const char *const *strings, int nstrings) | |||
190 | return NULL; /* placate optimiser */ | 190 | return NULL; /* placate optimiser */ |
191 | } | 191 | } |
192 | 192 | ||
193 | void status_bar(drawing *dr, char *text) | 193 | void status_bar(drawing *dr, const char *text) |
194 | { | 194 | { |
195 | char *rewritten; | 195 | char *rewritten; |
196 | 196 | ||
diff --git a/apps/plugins/puzzles/src/emcc.c b/apps/plugins/puzzles/src/emcc.c index 23ab333f5d..563fbe2799 100644 --- a/apps/plugins/puzzles/src/emcc.c +++ b/apps/plugins/puzzles/src/emcc.c | |||
@@ -122,7 +122,7 @@ void get_random_seed(void **randseed, int *randseedsize) | |||
122 | * Fatal error, called in cases of complete despair such as when | 122 | * Fatal error, called in cases of complete despair such as when |
123 | * malloc() has returned NULL. | 123 | * malloc() has returned NULL. |
124 | */ | 124 | */ |
125 | void fatal(char *fmt, ...) | 125 | void fatal(const char *fmt, ...) |
126 | { | 126 | { |
127 | char buf[512]; | 127 | char buf[512]; |
128 | va_list ap; | 128 | va_list ap; |
@@ -136,7 +136,7 @@ void fatal(char *fmt, ...) | |||
136 | js_error_box(buf); | 136 | js_error_box(buf); |
137 | } | 137 | } |
138 | 138 | ||
139 | void debug_printf(char *fmt, ...) | 139 | void debug_printf(const char *fmt, ...) |
140 | { | 140 | { |
141 | char buf[512]; | 141 | char buf[512]; |
142 | va_list ap; | 142 | va_list ap; |
@@ -384,7 +384,8 @@ static void js_unclip(void *handle) | |||
384 | } | 384 | } |
385 | 385 | ||
386 | static void js_draw_text(void *handle, int x, int y, int fonttype, | 386 | static void js_draw_text(void *handle, int x, int y, int fonttype, |
387 | int fontsize, int align, int colour, char *text) | 387 | int fontsize, int align, int colour, |
388 | const char *text) | ||
388 | { | 389 | { |
389 | char fontstyle[80]; | 390 | char fontstyle[80]; |
390 | int halign; | 391 | int halign; |
@@ -515,7 +516,7 @@ static void js_end_draw(void *handle) | |||
515 | js_canvas_end_draw(); | 516 | js_canvas_end_draw(); |
516 | } | 517 | } |
517 | 518 | ||
518 | static void js_status_bar(void *handle, char *text) | 519 | static void js_status_bar(void *handle, const char *text) |
519 | { | 520 | { |
520 | js_canvas_set_statusbar(text); | 521 | js_canvas_set_statusbar(text); |
521 | } | 522 | } |
@@ -599,13 +600,14 @@ static void cfg_start(int which) | |||
599 | for (i = 0; cfg[i].type != C_END; i++) { | 600 | for (i = 0; cfg[i].type != C_END; i++) { |
600 | switch (cfg[i].type) { | 601 | switch (cfg[i].type) { |
601 | case C_STRING: | 602 | case C_STRING: |
602 | js_dialog_string(i, cfg[i].name, cfg[i].sval); | 603 | js_dialog_string(i, cfg[i].name, cfg[i].u.string.sval); |
603 | break; | 604 | break; |
604 | case C_BOOLEAN: | 605 | case C_BOOLEAN: |
605 | js_dialog_boolean(i, cfg[i].name, cfg[i].ival); | 606 | js_dialog_boolean(i, cfg[i].name, cfg[i].u.boolean.bval); |
606 | break; | 607 | break; |
607 | case C_CHOICES: | 608 | case C_CHOICES: |
608 | js_dialog_choices(i, cfg[i].name, cfg[i].sval, cfg[i].ival); | 609 | js_dialog_choices(i, cfg[i].name, cfg[i].u.choices.choicenames, |
610 | cfg[i].u.choices.selected); | ||
609 | break; | 611 | break; |
610 | } | 612 | } |
611 | } | 613 | } |
@@ -619,12 +621,29 @@ static void cfg_start(int which) | |||
619 | */ | 621 | */ |
620 | void dlg_return_sval(int index, const char *val) | 622 | void dlg_return_sval(int index, const char *val) |
621 | { | 623 | { |
622 | sfree(cfg[index].sval); | 624 | config_item *i = cfg + index; |
623 | cfg[index].sval = dupstr(val); | 625 | switch (i->type) { |
626 | case C_STRING: | ||
627 | sfree(i->u.string.sval); | ||
628 | i->u.string.sval = dupstr(val); | ||
629 | break; | ||
630 | default: | ||
631 | assert(0 && "Bad type for return_sval"); | ||
632 | } | ||
624 | } | 633 | } |
625 | void dlg_return_ival(int index, int val) | 634 | void dlg_return_ival(int index, int val) |
626 | { | 635 | { |
627 | cfg[index].ival = val; | 636 | config_item *i = cfg + index; |
637 | switch (i->type) { | ||
638 | case C_BOOLEAN: | ||
639 | i->u.boolean.bval = val; | ||
640 | break; | ||
641 | case C_CHOICES: | ||
642 | i->u.choices.selected = val; | ||
643 | break; | ||
644 | default: | ||
645 | assert(0 && "Bad type for return_ival"); | ||
646 | } | ||
628 | } | 647 | } |
629 | 648 | ||
630 | /* | 649 | /* |
@@ -638,7 +657,7 @@ static void cfg_end(int use_results) | |||
638 | /* | 657 | /* |
639 | * User hit OK. | 658 | * User hit OK. |
640 | */ | 659 | */ |
641 | char *err = midend_set_config(me, cfg_which, cfg); | 660 | const char *err = midend_set_config(me, cfg_which, cfg); |
642 | 661 | ||
643 | if (err) { | 662 | if (err) { |
644 | /* | 663 | /* |
@@ -748,7 +767,7 @@ void command(int n) | |||
748 | break; | 767 | break; |
749 | case 9: /* Solve */ | 768 | case 9: /* Solve */ |
750 | if (thegame.can_solve) { | 769 | if (thegame.can_solve) { |
751 | char *msg = midend_solve(me); | 770 | const char *msg = midend_solve(me); |
752 | if (msg) | 771 | if (msg) |
753 | js_error_box(msg); | 772 | js_error_box(msg); |
754 | } | 773 | } |
@@ -768,7 +787,7 @@ struct savefile_write_ctx { | |||
768 | size_t pos; | 787 | size_t pos; |
769 | }; | 788 | }; |
770 | 789 | ||
771 | static void savefile_write(void *vctx, void *buf, int len) | 790 | static void savefile_write(void *vctx, const void *buf, int len) |
772 | { | 791 | { |
773 | struct savefile_write_ctx *ctx = (struct savefile_write_ctx *)vctx; | 792 | struct savefile_write_ctx *ctx = (struct savefile_write_ctx *)vctx; |
774 | if (ctx->buffer) | 793 | if (ctx->buffer) |
@@ -845,7 +864,7 @@ void load_game(const char *buffer, int len) | |||
845 | */ | 864 | */ |
846 | int main(int argc, char **argv) | 865 | int main(int argc, char **argv) |
847 | { | 866 | { |
848 | char *param_err; | 867 | const char *param_err; |
849 | float *colours; | 868 | float *colours; |
850 | int i; | 869 | int i; |
851 | 870 | ||
diff --git a/apps/plugins/puzzles/src/fifteen.c b/apps/plugins/puzzles/src/fifteen.c index aee89071ca..f749e96b24 100644 --- a/apps/plugins/puzzles/src/fifteen.c +++ b/apps/plugins/puzzles/src/fifteen.c | |||
@@ -111,19 +111,15 @@ static config_item *game_configure(const game_params *params) | |||
111 | ret[0].name = "Width"; | 111 | ret[0].name = "Width"; |
112 | ret[0].type = C_STRING; | 112 | ret[0].type = C_STRING; |
113 | sprintf(buf, "%d", params->w); | 113 | sprintf(buf, "%d", params->w); |
114 | ret[0].sval = dupstr(buf); | 114 | ret[0].u.string.sval = dupstr(buf); |
115 | ret[0].ival = 0; | ||
116 | 115 | ||
117 | ret[1].name = "Height"; | 116 | ret[1].name = "Height"; |
118 | ret[1].type = C_STRING; | 117 | ret[1].type = C_STRING; |
119 | sprintf(buf, "%d", params->h); | 118 | sprintf(buf, "%d", params->h); |
120 | ret[1].sval = dupstr(buf); | 119 | ret[1].u.string.sval = dupstr(buf); |
121 | ret[1].ival = 0; | ||
122 | 120 | ||
123 | ret[2].name = NULL; | 121 | ret[2].name = NULL; |
124 | ret[2].type = C_END; | 122 | ret[2].type = C_END; |
125 | ret[2].sval = NULL; | ||
126 | ret[2].ival = 0; | ||
127 | 123 | ||
128 | return ret; | 124 | return ret; |
129 | } | 125 | } |
@@ -132,13 +128,13 @@ static game_params *custom_params(const config_item *cfg) | |||
132 | { | 128 | { |
133 | game_params *ret = snew(game_params); | 129 | game_params *ret = snew(game_params); |
134 | 130 | ||
135 | ret->w = atoi(cfg[0].sval); | 131 | ret->w = atoi(cfg[0].u.string.sval); |
136 | ret->h = atoi(cfg[1].sval); | 132 | ret->h = atoi(cfg[1].u.string.sval); |
137 | 133 | ||
138 | return ret; | 134 | return ret; |
139 | } | 135 | } |
140 | 136 | ||
141 | static char *validate_params(const game_params *params, int full) | 137 | static const char *validate_params(const game_params *params, int full) |
142 | { | 138 | { |
143 | if (params->w < 2 || params->h < 2) | 139 | if (params->w < 2 || params->h < 2) |
144 | return "Width and height must both be at least two"; | 140 | return "Width and height must both be at least two"; |
@@ -274,10 +270,10 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
274 | return ret; | 270 | return ret; |
275 | } | 271 | } |
276 | 272 | ||
277 | static char *validate_desc(const game_params *params, const char *desc) | 273 | static const char *validate_desc(const game_params *params, const char *desc) |
278 | { | 274 | { |
279 | const char *p; | 275 | const char *p; |
280 | char *err; | 276 | const char *err; |
281 | int i, area; | 277 | int i, area; |
282 | int *used; | 278 | int *used; |
283 | 279 | ||
@@ -383,7 +379,7 @@ static void free_game(game_state *state) | |||
383 | } | 379 | } |
384 | 380 | ||
385 | static char *solve_game(const game_state *state, const game_state *currstate, | 381 | static char *solve_game(const game_state *state, const game_state *currstate, |
386 | const char *aux, char **error) | 382 | const char *aux, const char **error) |
387 | { | 383 | { |
388 | return dupstr("S"); | 384 | return dupstr("S"); |
389 | } | 385 | } |
@@ -1130,7 +1126,8 @@ int main(int argc, char **argv) | |||
1130 | { | 1126 | { |
1131 | game_params *params; | 1127 | game_params *params; |
1132 | game_state *state; | 1128 | game_state *state; |
1133 | char *id = NULL, *desc, *err; | 1129 | char *id = NULL, *desc; |
1130 | const char *err; | ||
1134 | int grade = FALSE; | 1131 | int grade = FALSE; |
1135 | char *progname = argv[0]; | 1132 | char *progname = argv[0]; |
1136 | 1133 | ||
diff --git a/apps/plugins/puzzles/src/filling.c b/apps/plugins/puzzles/src/filling.c index d8d0c8cbb0..7e71eb25b4 100644 --- a/apps/plugins/puzzles/src/filling.c +++ b/apps/plugins/puzzles/src/filling.c | |||
@@ -68,7 +68,7 @@ | |||
68 | 68 | ||
69 | static unsigned char verbose; | 69 | static unsigned char verbose; |
70 | 70 | ||
71 | static void printv(char *fmt, ...) { | 71 | static void printv(const char *fmt, ...) { |
72 | #ifndef PALM | 72 | #ifndef PALM |
73 | if (verbose) { | 73 | if (verbose) { |
74 | va_list va; | 74 | va_list va; |
@@ -161,19 +161,15 @@ static config_item *game_configure(const game_params *params) | |||
161 | ret[0].name = "Width"; | 161 | ret[0].name = "Width"; |
162 | ret[0].type = C_STRING; | 162 | ret[0].type = C_STRING; |
163 | sprintf(buf, "%d", params->w); | 163 | sprintf(buf, "%d", params->w); |
164 | ret[0].sval = dupstr(buf); | 164 | ret[0].u.string.sval = dupstr(buf); |
165 | ret[0].ival = 0; | ||
166 | 165 | ||
167 | ret[1].name = "Height"; | 166 | ret[1].name = "Height"; |
168 | ret[1].type = C_STRING; | 167 | ret[1].type = C_STRING; |
169 | sprintf(buf, "%d", params->h); | 168 | sprintf(buf, "%d", params->h); |
170 | ret[1].sval = dupstr(buf); | 169 | ret[1].u.string.sval = dupstr(buf); |
171 | ret[1].ival = 0; | ||
172 | 170 | ||
173 | ret[2].name = NULL; | 171 | ret[2].name = NULL; |
174 | ret[2].type = C_END; | 172 | ret[2].type = C_END; |
175 | ret[2].sval = NULL; | ||
176 | ret[2].ival = 0; | ||
177 | 173 | ||
178 | return ret; | 174 | return ret; |
179 | } | 175 | } |
@@ -182,13 +178,13 @@ static game_params *custom_params(const config_item *cfg) | |||
182 | { | 178 | { |
183 | game_params *ret = snew(game_params); | 179 | game_params *ret = snew(game_params); |
184 | 180 | ||
185 | ret->w = atoi(cfg[0].sval); | 181 | ret->w = atoi(cfg[0].u.string.sval); |
186 | ret->h = atoi(cfg[1].sval); | 182 | ret->h = atoi(cfg[1].u.string.sval); |
187 | 183 | ||
188 | return ret; | 184 | return ret; |
189 | } | 185 | } |
190 | 186 | ||
191 | static char *validate_params(const game_params *params, int full) | 187 | static const char *validate_params(const game_params *params, int full) |
192 | { | 188 | { |
193 | if (params->w < 1) return "Width must be at least one"; | 189 | if (params->w < 1) return "Width must be at least one"; |
194 | if (params->h < 1) return "Height must be at least one"; | 190 | if (params->h < 1) return "Height must be at least one"; |
@@ -1270,7 +1266,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1270 | return sresize(description, j, char); | 1266 | return sresize(description, j, char); |
1271 | } | 1267 | } |
1272 | 1268 | ||
1273 | static char *validate_desc(const game_params *params, const char *desc) | 1269 | static const char *validate_desc(const game_params *params, const char *desc) |
1274 | { | 1270 | { |
1275 | const int sz = params->w * params->h; | 1271 | const int sz = params->w * params->h; |
1276 | const char m = '0' + max(max(params->w, params->h), 3); | 1272 | const char m = '0' + max(max(params->w, params->h), 3); |
@@ -1342,7 +1338,7 @@ static void free_game(game_state *state) | |||
1342 | } | 1338 | } |
1343 | 1339 | ||
1344 | static char *solve_game(const game_state *state, const game_state *currstate, | 1340 | static char *solve_game(const game_state *state, const game_state *currstate, |
1345 | const char *aux, char **error) | 1341 | const char *aux, const char **error) |
1346 | { | 1342 | { |
1347 | if (aux == NULL) { | 1343 | if (aux == NULL) { |
1348 | const int w = state->shared->params.w; | 1344 | const int w = state->shared->params.w; |
@@ -1449,22 +1445,22 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1449 | ui->sel[w*ty+tx] = 1; | 1445 | ui->sel[w*ty+tx] = 1; |
1450 | } | 1446 | } |
1451 | ui->cur_visible = 0; | 1447 | ui->cur_visible = 0; |
1452 | return ""; /* redraw */ | 1448 | return UI_UPDATE; |
1453 | } | 1449 | } |
1454 | 1450 | ||
1455 | if (IS_CURSOR_MOVE(button)) { | 1451 | if (IS_CURSOR_MOVE(button)) { |
1456 | ui->cur_visible = 1; | 1452 | ui->cur_visible = 1; |
1457 | move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0); | 1453 | move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0); |
1458 | if (ui->keydragging) goto select_square; | 1454 | if (ui->keydragging) goto select_square; |
1459 | return ""; | 1455 | return UI_UPDATE; |
1460 | } | 1456 | } |
1461 | if (button == CURSOR_SELECT) { | 1457 | if (button == CURSOR_SELECT) { |
1462 | if (!ui->cur_visible) { | 1458 | if (!ui->cur_visible) { |
1463 | ui->cur_visible = 1; | 1459 | ui->cur_visible = 1; |
1464 | return ""; | 1460 | return UI_UPDATE; |
1465 | } | 1461 | } |
1466 | ui->keydragging = !ui->keydragging; | 1462 | ui->keydragging = !ui->keydragging; |
1467 | if (!ui->keydragging) return ""; | 1463 | if (!ui->keydragging) return UI_UPDATE; |
1468 | 1464 | ||
1469 | select_square: | 1465 | select_square: |
1470 | if (!ui->sel) { | 1466 | if (!ui->sel) { |
@@ -1473,12 +1469,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1473 | } | 1469 | } |
1474 | if (!state->shared->clues[w*ui->cur_y + ui->cur_x]) | 1470 | if (!state->shared->clues[w*ui->cur_y + ui->cur_x]) |
1475 | ui->sel[w*ui->cur_y + ui->cur_x] = 1; | 1471 | ui->sel[w*ui->cur_y + ui->cur_x] = 1; |
1476 | return ""; | 1472 | return UI_UPDATE; |
1477 | } | 1473 | } |
1478 | if (button == CURSOR_SELECT2) { | 1474 | if (button == CURSOR_SELECT2) { |
1479 | if (!ui->cur_visible) { | 1475 | if (!ui->cur_visible) { |
1480 | ui->cur_visible = 1; | 1476 | ui->cur_visible = 1; |
1481 | return ""; | 1477 | return UI_UPDATE; |
1482 | } | 1478 | } |
1483 | if (!ui->sel) { | 1479 | if (!ui->sel) { |
1484 | ui->sel = snewn(w*h, int); | 1480 | ui->sel = snewn(w*h, int); |
@@ -1492,14 +1488,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1492 | sfree(ui->sel); | 1488 | sfree(ui->sel); |
1493 | ui->sel = NULL; | 1489 | ui->sel = NULL; |
1494 | } | 1490 | } |
1495 | return ""; | 1491 | return UI_UPDATE; |
1496 | } | 1492 | } |
1497 | 1493 | ||
1498 | if (button == '\b' || button == 27) { | 1494 | if (button == '\b' || button == 27) { |
1499 | sfree(ui->sel); | 1495 | sfree(ui->sel); |
1500 | ui->sel = NULL; | 1496 | ui->sel = NULL; |
1501 | ui->keydragging = FALSE; | 1497 | ui->keydragging = FALSE; |
1502 | return ""; | 1498 | return UI_UPDATE; |
1503 | } | 1499 | } |
1504 | 1500 | ||
1505 | if (button < '0' || button > '9') return NULL; | 1501 | if (button < '0' || button > '9') return NULL; |
@@ -1534,7 +1530,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1534 | sfree(ui->sel); | 1530 | sfree(ui->sel); |
1535 | ui->sel = NULL; | 1531 | ui->sel = NULL; |
1536 | /* Need to update UI at least, as we cleared the selection */ | 1532 | /* Need to update UI at least, as we cleared the selection */ |
1537 | return move ? move : ""; | 1533 | return move ? move : UI_UPDATE; |
1538 | } | 1534 | } |
1539 | 1535 | ||
1540 | static game_state *execute_move(const game_state *state, const char *move) | 1536 | static game_state *execute_move(const game_state *state, const char *move) |
diff --git a/apps/plugins/puzzles/src/flip.c b/apps/plugins/puzzles/src/flip.c index c7126fb7d9..9e5716a118 100644 --- a/apps/plugins/puzzles/src/flip.c +++ b/apps/plugins/puzzles/src/flip.c | |||
@@ -149,24 +149,20 @@ static config_item *game_configure(const game_params *params) | |||
149 | ret[0].name = "Width"; | 149 | ret[0].name = "Width"; |
150 | ret[0].type = C_STRING; | 150 | ret[0].type = C_STRING; |
151 | sprintf(buf, "%d", params->w); | 151 | sprintf(buf, "%d", params->w); |
152 | ret[0].sval = dupstr(buf); | 152 | ret[0].u.string.sval = dupstr(buf); |
153 | ret[0].ival = 0; | ||
154 | 153 | ||
155 | ret[1].name = "Height"; | 154 | ret[1].name = "Height"; |
156 | ret[1].type = C_STRING; | 155 | ret[1].type = C_STRING; |
157 | sprintf(buf, "%d", params->h); | 156 | sprintf(buf, "%d", params->h); |
158 | ret[1].sval = dupstr(buf); | 157 | ret[1].u.string.sval = dupstr(buf); |
159 | ret[1].ival = 0; | ||
160 | 158 | ||
161 | ret[2].name = "Shape type"; | 159 | ret[2].name = "Shape type"; |
162 | ret[2].type = C_CHOICES; | 160 | ret[2].type = C_CHOICES; |
163 | ret[2].sval = ":Crosses:Random"; | 161 | ret[2].u.choices.choicenames = ":Crosses:Random"; |
164 | ret[2].ival = params->matrix_type; | 162 | ret[2].u.choices.selected = params->matrix_type; |
165 | 163 | ||
166 | ret[3].name = NULL; | 164 | ret[3].name = NULL; |
167 | ret[3].type = C_END; | 165 | ret[3].type = C_END; |
168 | ret[3].sval = NULL; | ||
169 | ret[3].ival = 0; | ||
170 | 166 | ||
171 | return ret; | 167 | return ret; |
172 | } | 168 | } |
@@ -175,14 +171,14 @@ static game_params *custom_params(const config_item *cfg) | |||
175 | { | 171 | { |
176 | game_params *ret = snew(game_params); | 172 | game_params *ret = snew(game_params); |
177 | 173 | ||
178 | ret->w = atoi(cfg[0].sval); | 174 | ret->w = atoi(cfg[0].u.string.sval); |
179 | ret->h = atoi(cfg[1].sval); | 175 | ret->h = atoi(cfg[1].u.string.sval); |
180 | ret->matrix_type = cfg[2].ival; | 176 | ret->matrix_type = cfg[2].u.choices.selected; |
181 | 177 | ||
182 | return ret; | 178 | return ret; |
183 | } | 179 | } |
184 | 180 | ||
185 | static char *validate_params(const game_params *params, int full) | 181 | static const char *validate_params(const game_params *params, int full) |
186 | { | 182 | { |
187 | if (params->w <= 0 || params->h <= 0) | 183 | if (params->w <= 0 || params->h <= 0) |
188 | return "Width and height must both be greater than zero"; | 184 | return "Width and height must both be greater than zero"; |
@@ -596,7 +592,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
596 | return ret; | 592 | return ret; |
597 | } | 593 | } |
598 | 594 | ||
599 | static char *validate_desc(const game_params *params, const char *desc) | 595 | static const char *validate_desc(const game_params *params, const char *desc) |
600 | { | 596 | { |
601 | int w = params->w, h = params->h, wh = w * h; | 597 | int w = params->w, h = params->h, wh = w * h; |
602 | int mlen = (wh*wh+3)/4, glen = (wh+3)/4; | 598 | int mlen = (wh*wh+3)/4, glen = (wh+3)/4; |
@@ -673,7 +669,7 @@ static void rowxor(unsigned char *row1, unsigned char *row2, int len) | |||
673 | } | 669 | } |
674 | 670 | ||
675 | static char *solve_game(const game_state *state, const game_state *currstate, | 671 | static char *solve_game(const game_state *state, const game_state *currstate, |
676 | const char *aux, char **error) | 672 | const char *aux, const char **error) |
677 | { | 673 | { |
678 | int w = state->w, h = state->h, wh = w * h; | 674 | int w = state->w, h = state->h, wh = w * h; |
679 | unsigned char *equations, *solution, *shortest; | 675 | unsigned char *equations, *solution, *shortest; |
@@ -951,7 +947,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
951 | tx = ui->cx; ty = ui->cy; | 947 | tx = ui->cx; ty = ui->cy; |
952 | ui->cdraw = 1; | 948 | ui->cdraw = 1; |
953 | } | 949 | } |
954 | nullret = ""; | 950 | nullret = UI_UPDATE; |
955 | 951 | ||
956 | if (tx >= 0 && tx < w && ty >= 0 && ty < h) { | 952 | if (tx >= 0 && tx < w && ty >= 0 && ty < h) { |
957 | /* | 953 | /* |
@@ -985,7 +981,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
985 | ui->cx = min(max(ui->cx, 0), state->w - 1); | 981 | ui->cx = min(max(ui->cx, 0), state->w - 1); |
986 | ui->cy = min(max(ui->cy, 0), state->h - 1); | 982 | ui->cy = min(max(ui->cy, 0), state->h - 1); |
987 | ui->cdraw = 1; | 983 | ui->cdraw = 1; |
988 | nullret = ""; | 984 | nullret = UI_UPDATE; |
989 | } | 985 | } |
990 | 986 | ||
991 | return nullret; | 987 | return nullret; |
diff --git a/apps/plugins/puzzles/src/flood.c b/apps/plugins/puzzles/src/flood.c index 59e160cfc3..854469a49a 100644 --- a/apps/plugins/puzzles/src/flood.c +++ b/apps/plugins/puzzles/src/flood.c | |||
@@ -170,31 +170,25 @@ static config_item *game_configure(const game_params *params) | |||
170 | ret[0].name = "Width"; | 170 | ret[0].name = "Width"; |
171 | ret[0].type = C_STRING; | 171 | ret[0].type = C_STRING; |
172 | sprintf(buf, "%d", params->w); | 172 | sprintf(buf, "%d", params->w); |
173 | ret[0].sval = dupstr(buf); | 173 | ret[0].u.string.sval = dupstr(buf); |
174 | ret[0].ival = 0; | ||
175 | 174 | ||
176 | ret[1].name = "Height"; | 175 | ret[1].name = "Height"; |
177 | ret[1].type = C_STRING; | 176 | ret[1].type = C_STRING; |
178 | sprintf(buf, "%d", params->h); | 177 | sprintf(buf, "%d", params->h); |
179 | ret[1].sval = dupstr(buf); | 178 | ret[1].u.string.sval = dupstr(buf); |
180 | ret[1].ival = 0; | ||
181 | 179 | ||
182 | ret[2].name = "Colours"; | 180 | ret[2].name = "Colours"; |
183 | ret[2].type = C_STRING; | 181 | ret[2].type = C_STRING; |
184 | sprintf(buf, "%d", params->colours); | 182 | sprintf(buf, "%d", params->colours); |
185 | ret[2].sval = dupstr(buf); | 183 | ret[2].u.string.sval = dupstr(buf); |
186 | ret[2].ival = 0; | ||
187 | 184 | ||
188 | ret[3].name = "Extra moves permitted"; | 185 | ret[3].name = "Extra moves permitted"; |
189 | ret[3].type = C_STRING; | 186 | ret[3].type = C_STRING; |
190 | sprintf(buf, "%d", params->leniency); | 187 | sprintf(buf, "%d", params->leniency); |
191 | ret[3].sval = dupstr(buf); | 188 | ret[3].u.string.sval = dupstr(buf); |
192 | ret[3].ival = 0; | ||
193 | 189 | ||
194 | ret[4].name = NULL; | 190 | ret[4].name = NULL; |
195 | ret[4].type = C_END; | 191 | ret[4].type = C_END; |
196 | ret[4].sval = NULL; | ||
197 | ret[4].ival = 0; | ||
198 | 192 | ||
199 | return ret; | 193 | return ret; |
200 | } | 194 | } |
@@ -203,15 +197,15 @@ static game_params *custom_params(const config_item *cfg) | |||
203 | { | 197 | { |
204 | game_params *ret = snew(game_params); | 198 | game_params *ret = snew(game_params); |
205 | 199 | ||
206 | ret->w = atoi(cfg[0].sval); | 200 | ret->w = atoi(cfg[0].u.string.sval); |
207 | ret->h = atoi(cfg[1].sval); | 201 | ret->h = atoi(cfg[1].u.string.sval); |
208 | ret->colours = atoi(cfg[2].sval); | 202 | ret->colours = atoi(cfg[2].u.string.sval); |
209 | ret->leniency = atoi(cfg[3].sval); | 203 | ret->leniency = atoi(cfg[3].u.string.sval); |
210 | 204 | ||
211 | return ret; | 205 | return ret; |
212 | } | 206 | } |
213 | 207 | ||
214 | static char *validate_params(const game_params *params, int full) | 208 | static const char *validate_params(const game_params *params, int full) |
215 | { | 209 | { |
216 | if (params->w * params->h < 2) | 210 | if (params->w * params->h < 2) |
217 | return "Grid must contain at least two squares"; | 211 | return "Grid must contain at least two squares"; |
@@ -597,7 +591,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
597 | return desc; | 591 | return desc; |
598 | } | 592 | } |
599 | 593 | ||
600 | static char *validate_desc(const game_params *params, const char *desc) | 594 | static const char *validate_desc(const game_params *params, const char *desc) |
601 | { | 595 | { |
602 | int w = params->w, h = params->h, wh = w*h; | 596 | int w = params->w, h = params->h, wh = w*h; |
603 | int i; | 597 | int i; |
@@ -691,7 +685,7 @@ static void free_game(game_state *state) | |||
691 | } | 685 | } |
692 | 686 | ||
693 | static char *solve_game(const game_state *state, const game_state *currstate, | 687 | static char *solve_game(const game_state *state, const game_state *currstate, |
694 | const char *aux, char **error) | 688 | const char *aux, const char **error) |
695 | { | 689 | { |
696 | int w = state->w, h = state->h, wh = w*h; | 690 | int w = state->w, h = state->h, wh = w*h; |
697 | char *moves, *ret, *p; | 691 | char *moves, *ret, *p; |
@@ -832,19 +826,19 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
832 | } else if (button == CURSOR_LEFT && ui->cx > 0) { | 826 | } else if (button == CURSOR_LEFT && ui->cx > 0) { |
833 | ui->cx--; | 827 | ui->cx--; |
834 | ui->cursor_visible = TRUE; | 828 | ui->cursor_visible = TRUE; |
835 | return ""; | 829 | return UI_UPDATE; |
836 | } else if (button == CURSOR_RIGHT && ui->cx+1 < w) { | 830 | } else if (button == CURSOR_RIGHT && ui->cx+1 < w) { |
837 | ui->cx++; | 831 | ui->cx++; |
838 | ui->cursor_visible = TRUE; | 832 | ui->cursor_visible = TRUE; |
839 | return ""; | 833 | return UI_UPDATE; |
840 | } else if (button == CURSOR_UP && ui->cy > 0) { | 834 | } else if (button == CURSOR_UP && ui->cy > 0) { |
841 | ui->cy--; | 835 | ui->cy--; |
842 | ui->cursor_visible = TRUE; | 836 | ui->cursor_visible = TRUE; |
843 | return ""; | 837 | return UI_UPDATE; |
844 | } else if (button == CURSOR_DOWN && ui->cy+1 < h) { | 838 | } else if (button == CURSOR_DOWN && ui->cy+1 < h) { |
845 | ui->cy++; | 839 | ui->cy++; |
846 | ui->cursor_visible = TRUE; | 840 | ui->cursor_visible = TRUE; |
847 | return ""; | 841 | return UI_UPDATE; |
848 | } else if (button == CURSOR_SELECT) { | 842 | } else if (button == CURSOR_SELECT) { |
849 | tx = ui->cx; | 843 | tx = ui->cx; |
850 | ty = ui->cy; | 844 | ty = ui->cy; |
diff --git a/apps/plugins/puzzles/src/galaxies.c b/apps/plugins/puzzles/src/galaxies.c index f4f75c629c..5d7dbdf933 100644 --- a/apps/plugins/puzzles/src/galaxies.c +++ b/apps/plugins/puzzles/src/galaxies.c | |||
@@ -248,24 +248,20 @@ static config_item *game_configure(const game_params *params) | |||
248 | ret[0].name = "Width"; | 248 | ret[0].name = "Width"; |
249 | ret[0].type = C_STRING; | 249 | ret[0].type = C_STRING; |
250 | sprintf(buf, "%d", params->w); | 250 | sprintf(buf, "%d", params->w); |
251 | ret[0].sval = dupstr(buf); | 251 | ret[0].u.string.sval = dupstr(buf); |
252 | ret[0].ival = 0; | ||
253 | 252 | ||
254 | ret[1].name = "Height"; | 253 | ret[1].name = "Height"; |
255 | ret[1].type = C_STRING; | 254 | ret[1].type = C_STRING; |
256 | sprintf(buf, "%d", params->h); | 255 | sprintf(buf, "%d", params->h); |
257 | ret[1].sval = dupstr(buf); | 256 | ret[1].u.string.sval = dupstr(buf); |
258 | ret[1].ival = 0; | ||
259 | 257 | ||
260 | ret[2].name = "Difficulty"; | 258 | ret[2].name = "Difficulty"; |
261 | ret[2].type = C_CHOICES; | 259 | ret[2].type = C_CHOICES; |
262 | ret[2].sval = DIFFCONFIG; | 260 | ret[2].u.choices.choicenames = DIFFCONFIG; |
263 | ret[2].ival = params->diff; | 261 | ret[2].u.choices.selected = params->diff; |
264 | 262 | ||
265 | ret[3].name = NULL; | 263 | ret[3].name = NULL; |
266 | ret[3].type = C_END; | 264 | ret[3].type = C_END; |
267 | ret[3].sval = NULL; | ||
268 | ret[3].ival = 0; | ||
269 | 265 | ||
270 | return ret; | 266 | return ret; |
271 | } | 267 | } |
@@ -274,14 +270,14 @@ static game_params *custom_params(const config_item *cfg) | |||
274 | { | 270 | { |
275 | game_params *ret = snew(game_params); | 271 | game_params *ret = snew(game_params); |
276 | 272 | ||
277 | ret->w = atoi(cfg[0].sval); | 273 | ret->w = atoi(cfg[0].u.string.sval); |
278 | ret->h = atoi(cfg[1].sval); | 274 | ret->h = atoi(cfg[1].u.string.sval); |
279 | ret->diff = cfg[2].ival; | 275 | ret->diff = cfg[2].u.choices.selected; |
280 | 276 | ||
281 | return ret; | 277 | return ret; |
282 | } | 278 | } |
283 | 279 | ||
284 | static char *validate_params(const game_params *params, int full) | 280 | static const char *validate_params(const game_params *params, int full) |
285 | { | 281 | { |
286 | if (params->w < 3 || params->h < 3) | 282 | if (params->w < 3 || params->h < 3) |
287 | return "Width and height must both be at least 3"; | 283 | return "Width and height must both be at least 3"; |
@@ -671,7 +667,8 @@ static char *diff_game(const game_state *src, const game_state *dest, | |||
671 | int issolve) | 667 | int issolve) |
672 | { | 668 | { |
673 | int movelen = 0, movesize = 256, x, y, len; | 669 | int movelen = 0, movesize = 256, x, y, len; |
674 | char *move = snewn(movesize, char), buf[80], *sep = ""; | 670 | char *move = snewn(movesize, char), buf[80]; |
671 | const char *sep = ""; | ||
675 | char achar = issolve ? 'a' : 'A'; | 672 | char achar = issolve ? 'a' : 'A'; |
676 | space *sps, *spd; | 673 | space *sps, *spd; |
677 | 674 | ||
@@ -1527,10 +1524,10 @@ static int dots_too_close(game_state *state) | |||
1527 | } | 1524 | } |
1528 | 1525 | ||
1529 | static game_state *load_game(const game_params *params, const char *desc, | 1526 | static game_state *load_game(const game_params *params, const char *desc, |
1530 | char **why_r) | 1527 | const char **why_r) |
1531 | { | 1528 | { |
1532 | game_state *state = blank_game(params->w, params->h); | 1529 | game_state *state = blank_game(params->w, params->h); |
1533 | char *why = NULL; | 1530 | const char *why = NULL; |
1534 | int i, x, y, n; | 1531 | int i, x, y, n; |
1535 | unsigned int df; | 1532 | unsigned int df; |
1536 | 1533 | ||
@@ -1574,9 +1571,9 @@ fail: | |||
1574 | return NULL; | 1571 | return NULL; |
1575 | } | 1572 | } |
1576 | 1573 | ||
1577 | static char *validate_desc(const game_params *params, const char *desc) | 1574 | static const char *validate_desc(const game_params *params, const char *desc) |
1578 | { | 1575 | { |
1579 | char *why = NULL; | 1576 | const char *why = NULL; |
1580 | game_state *dummy = load_game(params, desc, &why); | 1577 | game_state *dummy = load_game(params, desc, &why); |
1581 | if (dummy) { | 1578 | if (dummy) { |
1582 | free_game(dummy); | 1579 | free_game(dummy); |
@@ -2258,7 +2255,7 @@ got_result: | |||
2258 | 2255 | ||
2259 | #ifndef EDITOR | 2256 | #ifndef EDITOR |
2260 | static char *solve_game(const game_state *state, const game_state *currstate, | 2257 | static char *solve_game(const game_state *state, const game_state *currstate, |
2261 | const char *aux, char **error) | 2258 | const char *aux, const char **error) |
2262 | { | 2259 | { |
2263 | game_state *tosolve; | 2260 | game_state *tosolve; |
2264 | char *ret; | 2261 | char *ret; |
@@ -2553,13 +2550,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2553 | ui->dy = y; | 2550 | ui->dy = y; |
2554 | ui->dotx = dot->x; | 2551 | ui->dotx = dot->x; |
2555 | ui->doty = dot->y; | 2552 | ui->doty = dot->y; |
2556 | return ""; | 2553 | return UI_UPDATE; |
2557 | } | 2554 | } |
2558 | } else if (button == RIGHT_DRAG && ui->dragging) { | 2555 | } else if (button == RIGHT_DRAG && ui->dragging) { |
2559 | /* just move the drag coords. */ | 2556 | /* just move the drag coords. */ |
2560 | ui->dx = x; | 2557 | ui->dx = x; |
2561 | ui->dy = y; | 2558 | ui->dy = y; |
2562 | return ""; | 2559 | return UI_UPDATE; |
2563 | } else if (button == RIGHT_RELEASE && ui->dragging) { | 2560 | } else if (button == RIGHT_RELEASE && ui->dragging) { |
2564 | ui->dragging = FALSE; | 2561 | ui->dragging = FALSE; |
2565 | 2562 | ||
@@ -2574,7 +2571,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2574 | * is a null move; just update the ui and finish. | 2571 | * is a null move; just update the ui and finish. |
2575 | */ | 2572 | */ |
2576 | if (px == ui->srcx && py == ui->srcy) | 2573 | if (px == ui->srcx && py == ui->srcy) |
2577 | return ""; | 2574 | return UI_UPDATE; |
2578 | 2575 | ||
2579 | /* | 2576 | /* |
2580 | * Otherwise, we remove the arrow from its starting | 2577 | * Otherwise, we remove the arrow from its starting |
@@ -2601,7 +2598,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2601 | if (buf[0]) | 2598 | if (buf[0]) |
2602 | return dupstr(buf); | 2599 | return dupstr(buf); |
2603 | else | 2600 | else |
2604 | return ""; | 2601 | return UI_UPDATE; |
2605 | } else if (IS_CURSOR_MOVE(button)) { | 2602 | } else if (IS_CURSOR_MOVE(button)) { |
2606 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->sx-1, state->sy-1, 0); | 2603 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->sx-1, state->sy-1, 0); |
2607 | if (ui->cur_x < 1) ui->cur_x = 1; | 2604 | if (ui->cur_x < 1) ui->cur_x = 1; |
@@ -2611,11 +2608,11 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2611 | ui->dx = SCOORD(ui->cur_x); | 2608 | ui->dx = SCOORD(ui->cur_x); |
2612 | ui->dy = SCOORD(ui->cur_y); | 2609 | ui->dy = SCOORD(ui->cur_y); |
2613 | } | 2610 | } |
2614 | return ""; | 2611 | return UI_UPDATE; |
2615 | } else if (IS_CURSOR_SELECT(button)) { | 2612 | } else if (IS_CURSOR_SELECT(button)) { |
2616 | if (!ui->cur_visible) { | 2613 | if (!ui->cur_visible) { |
2617 | ui->cur_visible = 1; | 2614 | ui->cur_visible = 1; |
2618 | return ""; | 2615 | return UI_UPDATE; |
2619 | } | 2616 | } |
2620 | sp = &SPACE(state, ui->cur_x, ui->cur_y); | 2617 | sp = &SPACE(state, ui->cur_x, ui->cur_y); |
2621 | if (ui->dragging) { | 2618 | if (ui->dragging) { |
@@ -2637,7 +2634,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2637 | ui->dy = SCOORD(ui->cur_y); | 2634 | ui->dy = SCOORD(ui->cur_y); |
2638 | ui->dotx = ui->srcx = ui->cur_x; | 2635 | ui->dotx = ui->srcx = ui->cur_x; |
2639 | ui->doty = ui->srcy = ui->cur_y; | 2636 | ui->doty = ui->srcy = ui->cur_y; |
2640 | return ""; | 2637 | return UI_UPDATE; |
2641 | } else if (sp->flags & F_TILE_ASSOC) { | 2638 | } else if (sp->flags & F_TILE_ASSOC) { |
2642 | assert(sp->type == s_tile); | 2639 | assert(sp->type == s_tile); |
2643 | ui->dragging = TRUE; | 2640 | ui->dragging = TRUE; |
@@ -2647,7 +2644,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2647 | ui->doty = sp->doty; | 2644 | ui->doty = sp->doty; |
2648 | ui->srcx = ui->cur_x; | 2645 | ui->srcx = ui->cur_x; |
2649 | ui->srcy = ui->cur_y; | 2646 | ui->srcy = ui->cur_y; |
2650 | return ""; | 2647 | return UI_UPDATE; |
2651 | } else if (sp->type == s_edge) { | 2648 | } else if (sp->type == s_edge) { |
2652 | sprintf(buf, "E%d,%d", ui->cur_x, ui->cur_y); | 2649 | sprintf(buf, "E%d,%d", ui->cur_x, ui->cur_y); |
2653 | return dupstr(buf); | 2650 | return dupstr(buf); |
@@ -3775,7 +3772,8 @@ static void soak(game_params *p, random_state *rs) | |||
3775 | int main(int argc, char **argv) | 3772 | int main(int argc, char **argv) |
3776 | { | 3773 | { |
3777 | game_params *p; | 3774 | game_params *p; |
3778 | char *id = NULL, *desc, *err; | 3775 | char *id = NULL, *desc; |
3776 | const char *err; | ||
3779 | game_state *s; | 3777 | game_state *s; |
3780 | int diff, do_soak = 0, verbose = 0; | 3778 | int diff, do_soak = 0, verbose = 0; |
3781 | random_state *rs; | 3779 | random_state *rs; |
diff --git a/apps/plugins/puzzles/src/grid.c b/apps/plugins/puzzles/src/grid.c index 4929b5c7d3..52648e5a92 100644 --- a/apps/plugins/puzzles/src/grid.c +++ b/apps/plugins/puzzles/src/grid.c | |||
@@ -1529,8 +1529,8 @@ static void grid_size_triangular(int width, int height, | |||
1529 | *yextent = height * vec_y; | 1529 | *yextent = height * vec_y; |
1530 | } | 1530 | } |
1531 | 1531 | ||
1532 | static char *grid_validate_desc_triangular(grid_type type, int width, | 1532 | static const char *grid_validate_desc_triangular(grid_type type, int width, |
1533 | int height, const char *desc) | 1533 | int height, const char *desc) |
1534 | { | 1534 | { |
1535 | /* | 1535 | /* |
1536 | * Triangular grids: an absent description is valid (indicating | 1536 | * Triangular grids: an absent description is valid (indicating |
@@ -2855,8 +2855,9 @@ static char *grid_new_desc_penrose(grid_type type, int width, int height, random | |||
2855 | return dupstr(gd); | 2855 | return dupstr(gd); |
2856 | } | 2856 | } |
2857 | 2857 | ||
2858 | static char *grid_validate_desc_penrose(grid_type type, int width, int height, | 2858 | static const char *grid_validate_desc_penrose(grid_type type, |
2859 | const char *desc) | 2859 | int width, int height, |
2860 | const char *desc) | ||
2860 | { | 2861 | { |
2861 | int tilesize = PENROSE_TILESIZE, startsz, depth, xoff, yoff, aoff, inner_radius; | 2862 | int tilesize = PENROSE_TILESIZE, startsz, depth, xoff, yoff, aoff, inner_radius; |
2862 | double outer_radius; | 2863 | double outer_radius; |
@@ -3032,8 +3033,8 @@ char *grid_new_desc(grid_type type, int width, int height, random_state *rs) | |||
3032 | } | 3033 | } |
3033 | } | 3034 | } |
3034 | 3035 | ||
3035 | char *grid_validate_desc(grid_type type, int width, int height, | 3036 | const char *grid_validate_desc(grid_type type, int width, int height, |
3036 | const char *desc) | 3037 | const char *desc) |
3037 | { | 3038 | { |
3038 | if (type == GRID_PENROSE_P2 || type == GRID_PENROSE_P3) { | 3039 | if (type == GRID_PENROSE_P2 || type == GRID_PENROSE_P3) { |
3039 | return grid_validate_desc_penrose(type, width, height, desc); | 3040 | return grid_validate_desc_penrose(type, width, height, desc); |
@@ -3048,7 +3049,7 @@ char *grid_validate_desc(grid_type type, int width, int height, | |||
3048 | 3049 | ||
3049 | grid *grid_new(grid_type type, int width, int height, const char *desc) | 3050 | grid *grid_new(grid_type type, int width, int height, const char *desc) |
3050 | { | 3051 | { |
3051 | char *err = grid_validate_desc(type, width, height, desc); | 3052 | const char *err = grid_validate_desc(type, width, height, desc); |
3052 | if (err) assert(!"Invalid grid description."); | 3053 | if (err) assert(!"Invalid grid description."); |
3053 | 3054 | ||
3054 | return grid_news[type](width, height, desc); | 3055 | return grid_news[type](width, height, desc); |
diff --git a/apps/plugins/puzzles/src/grid.h b/apps/plugins/puzzles/src/grid.h index fb8ac48790..19079a44b8 100644 --- a/apps/plugins/puzzles/src/grid.h +++ b/apps/plugins/puzzles/src/grid.h | |||
@@ -116,8 +116,8 @@ typedef enum grid_type { GRIDGEN_LIST(ENUM) GRID_TYPE_MAX } grid_type; | |||
116 | /* Free directly after use if non-NULL. Will never contain an underscore | 116 | /* Free directly after use if non-NULL. Will never contain an underscore |
117 | * (so clients can safely use that as a separator). */ | 117 | * (so clients can safely use that as a separator). */ |
118 | char *grid_new_desc(grid_type type, int width, int height, random_state *rs); | 118 | char *grid_new_desc(grid_type type, int width, int height, random_state *rs); |
119 | char *grid_validate_desc(grid_type type, int width, int height, | 119 | const char *grid_validate_desc(grid_type type, int width, int height, |
120 | const char *desc); | 120 | const char *desc); |
121 | 121 | ||
122 | grid *grid_new(grid_type type, int width, int height, const char *desc); | 122 | grid *grid_new(grid_type type, int width, int height, const char *desc); |
123 | 123 | ||
diff --git a/apps/plugins/puzzles/src/gtk.c b/apps/plugins/puzzles/src/gtk.c index c212522957..37ba8078e2 100644 --- a/apps/plugins/puzzles/src/gtk.c +++ b/apps/plugins/puzzles/src/gtk.c | |||
@@ -71,7 +71,7 @@ | |||
71 | #ifdef DEBUGGING | 71 | #ifdef DEBUGGING |
72 | static FILE *debug_fp = NULL; | 72 | static FILE *debug_fp = NULL; |
73 | 73 | ||
74 | void dputs(char *buf) | 74 | void dputs(const char *buf) |
75 | { | 75 | { |
76 | if (!debug_fp) { | 76 | if (!debug_fp) { |
77 | debug_fp = fopen("debug.log", "w"); | 77 | debug_fp = fopen("debug.log", "w"); |
@@ -85,7 +85,7 @@ void dputs(char *buf) | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | void debug_printf(char *fmt, ...) | 88 | void debug_printf(const char *fmt, ...) |
89 | { | 89 | { |
90 | char buf[4096]; | 90 | char buf[4096]; |
91 | va_list ap; | 91 | va_list ap; |
@@ -101,7 +101,7 @@ void debug_printf(char *fmt, ...) | |||
101 | * Error reporting functions used elsewhere. | 101 | * Error reporting functions used elsewhere. |
102 | */ | 102 | */ |
103 | 103 | ||
104 | void fatal(char *fmt, ...) | 104 | void fatal(const char *fmt, ...) |
105 | { | 105 | { |
106 | va_list ap; | 106 | va_list ap; |
107 | 107 | ||
@@ -189,6 +189,38 @@ struct frontend { | |||
189 | int drawing_area_shrink_pending; | 189 | int drawing_area_shrink_pending; |
190 | int menubar_is_local; | 190 | int menubar_is_local; |
191 | #endif | 191 | #endif |
192 | #if GTK_CHECK_VERSION(3,0,0) | ||
193 | /* | ||
194 | * This is used to get round an annoying lack of GTK notification | ||
195 | * message. If we request a window resize with | ||
196 | * gtk_window_resize(), we normally get back a "configure" event | ||
197 | * on the window and on its drawing area, and we respond to the | ||
198 | * latter by doing an appropriate resize of the puzzle. If the | ||
199 | * window is maximised, so that gtk_window_resize() _doesn't_ | ||
200 | * change its size, then that configure event never shows up. But | ||
201 | * if we requested the resize in response to a change of puzzle | ||
202 | * parameters (say, the user selected a differently-sized preset | ||
203 | * from the menu), then we would still like to be _notified_ that | ||
204 | * the window size was staying the same, so that we can respond by | ||
205 | * choosing an appropriate tile size for the new puzzle preset in | ||
206 | * the existing window size. | ||
207 | * | ||
208 | * Fortunately, in GTK 3, we may not get a "configure" event on | ||
209 | * the drawing area in this situation, but we still get a | ||
210 | * "size_allocate" event on the whole window (which, in other | ||
211 | * situations when we _do_ get a "configure" on the area, turns up | ||
212 | * second). So we treat _that_ event as indicating that if the | ||
213 | * "configure" event hasn't already shown up then it's not going | ||
214 | * to arrive. | ||
215 | * | ||
216 | * This flag is where we bookkeep this system. On | ||
217 | * gtk_window_resize we set this flag to true; the area's | ||
218 | * configure handler sets it back to false; then if that doesn't | ||
219 | * happen, the window's size_allocate handler does a fallback | ||
220 | * puzzle resize when it sees this flag still set to true. | ||
221 | */ | ||
222 | int awaiting_resize_ack; | ||
223 | #endif | ||
192 | }; | 224 | }; |
193 | 225 | ||
194 | struct blitter { | 226 | struct blitter { |
@@ -232,7 +264,7 @@ void frontend_default_colour(frontend *fe, float *output) | |||
232 | #endif | 264 | #endif |
233 | } | 265 | } |
234 | 266 | ||
235 | void gtk_status_bar(void *handle, char *text) | 267 | void gtk_status_bar(void *handle, const char *text) |
236 | { | 268 | { |
237 | frontend *fe = (frontend *)handle; | 269 | frontend *fe = (frontend *)handle; |
238 | 270 | ||
@@ -968,7 +1000,7 @@ void gtk_unclip(void *handle) | |||
968 | } | 1000 | } |
969 | 1001 | ||
970 | void gtk_draw_text(void *handle, int x, int y, int fonttype, int fontsize, | 1002 | void gtk_draw_text(void *handle, int x, int y, int fonttype, int fontsize, |
971 | int align, int colour, char *text) | 1003 | int align, int colour, const char *text) |
972 | { | 1004 | { |
973 | frontend *fe = (frontend *)handle; | 1005 | frontend *fe = (frontend *)handle; |
974 | int i; | 1006 | int i; |
@@ -1338,15 +1370,10 @@ static gint map_window(GtkWidget *widget, GdkEvent *event, | |||
1338 | return TRUE; | 1370 | return TRUE; |
1339 | } | 1371 | } |
1340 | 1372 | ||
1341 | static gint configure_area(GtkWidget *widget, | 1373 | static void resize_puzzle_to_area(frontend *fe, int x, int y) |
1342 | GdkEventConfigure *event, gpointer data) | ||
1343 | { | 1374 | { |
1344 | frontend *fe = (frontend *)data; | ||
1345 | int x, y; | ||
1346 | int oldw = fe->w, oldpw = fe->pw, oldh = fe->h, oldph = fe->ph; | 1375 | int oldw = fe->w, oldpw = fe->pw, oldh = fe->h, oldph = fe->ph; |
1347 | 1376 | ||
1348 | x = event->width; | ||
1349 | y = event->height; | ||
1350 | fe->w = x; | 1377 | fe->w = x; |
1351 | fe->h = y; | 1378 | fe->h = y; |
1352 | midend_size(fe->me, &x, &y, TRUE); | 1379 | midend_size(fe->me, &x, &y, TRUE); |
@@ -1363,10 +1390,31 @@ static gint configure_area(GtkWidget *widget, | |||
1363 | } | 1390 | } |
1364 | 1391 | ||
1365 | midend_force_redraw(fe->me); | 1392 | midend_force_redraw(fe->me); |
1393 | } | ||
1366 | 1394 | ||
1395 | static gint configure_area(GtkWidget *widget, | ||
1396 | GdkEventConfigure *event, gpointer data) | ||
1397 | { | ||
1398 | frontend *fe = (frontend *)data; | ||
1399 | resize_puzzle_to_area(fe, event->width, event->height); | ||
1400 | fe->awaiting_resize_ack = FALSE; | ||
1367 | return TRUE; | 1401 | return TRUE; |
1368 | } | 1402 | } |
1369 | 1403 | ||
1404 | #if GTK_CHECK_VERSION(3,0,0) | ||
1405 | static void window_size_alloc(GtkWidget *widget, GtkAllocation *allocation, | ||
1406 | gpointer data) | ||
1407 | { | ||
1408 | frontend *fe = (frontend *)data; | ||
1409 | if (fe->awaiting_resize_ack) { | ||
1410 | GtkAllocation a; | ||
1411 | gtk_widget_get_allocation(fe->area, &a); | ||
1412 | resize_puzzle_to_area(fe, a.width, a.height); | ||
1413 | fe->awaiting_resize_ack = FALSE; | ||
1414 | } | ||
1415 | } | ||
1416 | #endif | ||
1417 | |||
1370 | static gint timer_func(gpointer data) | 1418 | static gint timer_func(gpointer data) |
1371 | { | 1419 | { |
1372 | frontend *fe = (frontend *)data; | 1420 | frontend *fe = (frontend *)data; |
@@ -1444,8 +1492,8 @@ static void align_label(GtkLabel *label, double x, double y) | |||
1444 | } | 1492 | } |
1445 | 1493 | ||
1446 | #if GTK_CHECK_VERSION(3,0,0) | 1494 | #if GTK_CHECK_VERSION(3,0,0) |
1447 | int message_box(GtkWidget *parent, char *title, char *msg, int centre, | 1495 | int message_box(GtkWidget *parent, const char *title, const char *msg, |
1448 | int type) | 1496 | int centre, int type) |
1449 | { | 1497 | { |
1450 | GtkWidget *window; | 1498 | GtkWidget *window; |
1451 | gint ret; | 1499 | gint ret; |
@@ -1539,7 +1587,7 @@ int message_box(GtkWidget *parent, char *title, char *msg, int centre, | |||
1539 | } | 1587 | } |
1540 | #endif /* GTK_CHECK_VERSION(3,0,0) */ | 1588 | #endif /* GTK_CHECK_VERSION(3,0,0) */ |
1541 | 1589 | ||
1542 | void error_box(GtkWidget *parent, char *msg) | 1590 | void error_box(GtkWidget *parent, const char *msg) |
1543 | { | 1591 | { |
1544 | message_box(parent, "Error", msg, FALSE, MB_OK); | 1592 | message_box(parent, "Error", msg, FALSE, MB_OK); |
1545 | } | 1593 | } |
@@ -1547,7 +1595,7 @@ void error_box(GtkWidget *parent, char *msg) | |||
1547 | static void config_ok_button_clicked(GtkButton *button, gpointer data) | 1595 | static void config_ok_button_clicked(GtkButton *button, gpointer data) |
1548 | { | 1596 | { |
1549 | frontend *fe = (frontend *)data; | 1597 | frontend *fe = (frontend *)data; |
1550 | char *err; | 1598 | const char *err; |
1551 | 1599 | ||
1552 | err = midend_set_config(fe->me, fe->cfg_which, fe->cfg); | 1600 | err = midend_set_config(fe->me, fe->cfg_which, fe->cfg); |
1553 | 1601 | ||
@@ -1593,22 +1641,25 @@ static void editbox_changed(GtkEditable *ed, gpointer data) | |||
1593 | { | 1641 | { |
1594 | config_item *i = (config_item *)data; | 1642 | config_item *i = (config_item *)data; |
1595 | 1643 | ||
1596 | sfree(i->sval); | 1644 | assert(i->type == C_STRING); |
1597 | i->sval = dupstr(gtk_entry_get_text(GTK_ENTRY(ed))); | 1645 | sfree(i->u.string.sval); |
1646 | i->u.string.sval = dupstr(gtk_entry_get_text(GTK_ENTRY(ed))); | ||
1598 | } | 1647 | } |
1599 | 1648 | ||
1600 | static void button_toggled(GtkToggleButton *tb, gpointer data) | 1649 | static void button_toggled(GtkToggleButton *tb, gpointer data) |
1601 | { | 1650 | { |
1602 | config_item *i = (config_item *)data; | 1651 | config_item *i = (config_item *)data; |
1603 | 1652 | ||
1604 | i->ival = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tb)); | 1653 | assert(i->type == C_BOOLEAN); |
1654 | i->u.boolean.bval = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tb)); | ||
1605 | } | 1655 | } |
1606 | 1656 | ||
1607 | static void droplist_sel(GtkComboBox *combo, gpointer data) | 1657 | static void droplist_sel(GtkComboBox *combo, gpointer data) |
1608 | { | 1658 | { |
1609 | config_item *i = (config_item *)data; | 1659 | config_item *i = (config_item *)data; |
1610 | 1660 | ||
1611 | i->ival = gtk_combo_box_get_active(combo); | 1661 | assert(i->type == C_CHOICES); |
1662 | i->u.choices.selected = gtk_combo_box_get_active(combo); | ||
1612 | } | 1663 | } |
1613 | 1664 | ||
1614 | static int get_config(frontend *fe, int which) | 1665 | static int get_config(frontend *fe, int which) |
@@ -1703,7 +1754,7 @@ static int get_config(frontend *fe, int which) | |||
1703 | GTK_EXPAND | GTK_SHRINK | GTK_FILL, | 1754 | GTK_EXPAND | GTK_SHRINK | GTK_FILL, |
1704 | 3, 3); | 1755 | 3, 3); |
1705 | #endif | 1756 | #endif |
1706 | gtk_entry_set_text(GTK_ENTRY(w), i->sval); | 1757 | gtk_entry_set_text(GTK_ENTRY(w), i->u.string.sval); |
1707 | g_signal_connect(G_OBJECT(w), "changed", | 1758 | g_signal_connect(G_OBJECT(w), "changed", |
1708 | G_CALLBACK(editbox_changed), i); | 1759 | G_CALLBACK(editbox_changed), i); |
1709 | g_signal_connect(G_OBJECT(w), "key_press_event", | 1760 | g_signal_connect(G_OBJECT(w), "key_press_event", |
@@ -1728,7 +1779,8 @@ static int get_config(frontend *fe, int which) | |||
1728 | GTK_EXPAND | GTK_SHRINK | GTK_FILL, | 1779 | GTK_EXPAND | GTK_SHRINK | GTK_FILL, |
1729 | 3, 3); | 1780 | 3, 3); |
1730 | #endif | 1781 | #endif |
1731 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), i->ival); | 1782 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), |
1783 | i->u.boolean.bval); | ||
1732 | gtk_widget_show(w); | 1784 | gtk_widget_show(w); |
1733 | break; | 1785 | break; |
1734 | 1786 | ||
@@ -1751,15 +1803,16 @@ static int get_config(frontend *fe, int which) | |||
1751 | 1803 | ||
1752 | { | 1804 | { |
1753 | int c; | 1805 | int c; |
1754 | char *p, *q, *name; | 1806 | const char *p, *q; |
1807 | char *name; | ||
1755 | GtkListStore *model; | 1808 | GtkListStore *model; |
1756 | GtkCellRenderer *cr; | 1809 | GtkCellRenderer *cr; |
1757 | GtkTreeIter iter; | 1810 | GtkTreeIter iter; |
1758 | 1811 | ||
1759 | model = gtk_list_store_new(1, G_TYPE_STRING); | 1812 | model = gtk_list_store_new(1, G_TYPE_STRING); |
1760 | 1813 | ||
1761 | c = *i->sval; | 1814 | c = *i->u.choices.choicenames; |
1762 | p = i->sval+1; | 1815 | p = i->u.choices.choicenames+1; |
1763 | 1816 | ||
1764 | while (*p) { | 1817 | while (*p) { |
1765 | q = p; | 1818 | q = p; |
@@ -1780,7 +1833,8 @@ static int get_config(frontend *fe, int which) | |||
1780 | 1833 | ||
1781 | w = gtk_combo_box_new_with_model(GTK_TREE_MODEL(model)); | 1834 | w = gtk_combo_box_new_with_model(GTK_TREE_MODEL(model)); |
1782 | 1835 | ||
1783 | gtk_combo_box_set_active(GTK_COMBO_BOX(w), i->ival); | 1836 | gtk_combo_box_set_active(GTK_COMBO_BOX(w), |
1837 | i->u.choices.selected); | ||
1784 | 1838 | ||
1785 | cr = gtk_cell_renderer_text_new(); | 1839 | cr = gtk_cell_renderer_text_new(); |
1786 | gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(w), cr, TRUE); | 1840 | gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(w), cr, TRUE); |
@@ -1881,8 +1935,7 @@ static void changed_preset(frontend *fe) | |||
1881 | struct preset_menu_entry *entry = | 1935 | struct preset_menu_entry *entry = |
1882 | (struct preset_menu_entry *)g_object_get_data( | 1936 | (struct preset_menu_entry *)g_object_get_data( |
1883 | G_OBJECT(gs->data), "user-data"); | 1937 | G_OBJECT(gs->data), "user-data"); |
1884 | 1938 | if (!entry || entry->id != n) | |
1885 | if (entry && entry->id != n) | ||
1886 | gtk_check_menu_item_set_active( | 1939 | gtk_check_menu_item_set_active( |
1887 | GTK_CHECK_MENU_ITEM(gs->data), FALSE); | 1940 | GTK_CHECK_MENU_ITEM(gs->data), FALSE); |
1888 | else | 1941 | else |
@@ -1890,7 +1943,7 @@ static void changed_preset(frontend *fe) | |||
1890 | } | 1943 | } |
1891 | if (found) | 1944 | if (found) |
1892 | gtk_check_menu_item_set_active( | 1945 | gtk_check_menu_item_set_active( |
1893 | GTK_CHECK_MENU_ITEM(found->data), FALSE); | 1946 | GTK_CHECK_MENU_ITEM(found->data), TRUE); |
1894 | } | 1947 | } |
1895 | fe->preset_threaded = FALSE; | 1948 | fe->preset_threaded = FALSE; |
1896 | 1949 | ||
@@ -1996,6 +2049,7 @@ static void resize_fe(frontend *fe) | |||
1996 | 2049 | ||
1997 | #if GTK_CHECK_VERSION(3,0,0) | 2050 | #if GTK_CHECK_VERSION(3,0,0) |
1998 | gtk_window_resize(GTK_WINDOW(fe->window), x, y + window_extra_height(fe)); | 2051 | gtk_window_resize(GTK_WINDOW(fe->window), x, y + window_extra_height(fe)); |
2052 | fe->awaiting_resize_ack = TRUE; | ||
1999 | #else | 2053 | #else |
2000 | fe->drawing_area_shrink_pending = FALSE; | 2054 | fe->drawing_area_shrink_pending = FALSE; |
2001 | gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y); | 2055 | gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y); |
@@ -2114,7 +2168,7 @@ static void filesel_ok(GtkButton *button, gpointer data) | |||
2114 | fe->filesel_name = dupstr(name); | 2168 | fe->filesel_name = dupstr(name); |
2115 | } | 2169 | } |
2116 | 2170 | ||
2117 | static char *file_selector(frontend *fe, char *title, int save) | 2171 | static char *file_selector(frontend *fe, const char *title, int save) |
2118 | { | 2172 | { |
2119 | GtkWidget *filesel = | 2173 | GtkWidget *filesel = |
2120 | gtk_file_selection_new(title); | 2174 | gtk_file_selection_new(title); |
@@ -2145,7 +2199,7 @@ static char *file_selector(frontend *fe, char *title, int save) | |||
2145 | 2199 | ||
2146 | #else | 2200 | #else |
2147 | 2201 | ||
2148 | static char *file_selector(frontend *fe, char *title, int save) | 2202 | static char *file_selector(frontend *fe, const char *title, int save) |
2149 | { | 2203 | { |
2150 | char *filesel_name = NULL; | 2204 | char *filesel_name = NULL; |
2151 | 2205 | ||
@@ -2177,7 +2231,7 @@ struct savefile_write_ctx { | |||
2177 | int error; | 2231 | int error; |
2178 | }; | 2232 | }; |
2179 | 2233 | ||
2180 | static void savefile_write(void *wctx, void *buf, int len) | 2234 | static void savefile_write(void *wctx, const void *buf, int len) |
2181 | { | 2235 | { |
2182 | struct savefile_write_ctx *ctx = (struct savefile_write_ctx *)wctx; | 2236 | struct savefile_write_ctx *ctx = (struct savefile_write_ctx *)wctx; |
2183 | if (fwrite(buf, 1, len, ctx->fp) < len) | 2237 | if (fwrite(buf, 1, len, ctx->fp) < len) |
@@ -2244,7 +2298,8 @@ static void menu_save_event(GtkMenuItem *menuitem, gpointer data) | |||
2244 | static void menu_load_event(GtkMenuItem *menuitem, gpointer data) | 2298 | static void menu_load_event(GtkMenuItem *menuitem, gpointer data) |
2245 | { | 2299 | { |
2246 | frontend *fe = (frontend *)data; | 2300 | frontend *fe = (frontend *)data; |
2247 | char *name, *err; | 2301 | char *name; |
2302 | const char *err; | ||
2248 | 2303 | ||
2249 | name = file_selector(fe, "Enter name of saved game file to load", FALSE); | 2304 | name = file_selector(fe, "Enter name of saved game file to load", FALSE); |
2250 | 2305 | ||
@@ -2275,7 +2330,7 @@ static void menu_load_event(GtkMenuItem *menuitem, gpointer data) | |||
2275 | static void menu_solve_event(GtkMenuItem *menuitem, gpointer data) | 2330 | static void menu_solve_event(GtkMenuItem *menuitem, gpointer data) |
2276 | { | 2331 | { |
2277 | frontend *fe = (frontend *)data; | 2332 | frontend *fe = (frontend *)data; |
2278 | char *msg; | 2333 | const char *msg; |
2279 | 2334 | ||
2280 | msg = midend_solve(fe->me); | 2335 | msg = midend_solve(fe->me); |
2281 | 2336 | ||
@@ -2341,7 +2396,7 @@ static void menu_about_event(GtkMenuItem *menuitem, gpointer data) | |||
2341 | } | 2396 | } |
2342 | 2397 | ||
2343 | static GtkWidget *add_menu_ui_item( | 2398 | static GtkWidget *add_menu_ui_item( |
2344 | frontend *fe, GtkContainer *cont, char *text, int action, | 2399 | frontend *fe, GtkContainer *cont, const char *text, int action, |
2345 | int accel_key, int accel_keyqual) | 2400 | int accel_key, int accel_keyqual) |
2346 | { | 2401 | { |
2347 | GtkWidget *menuitem = gtk_menu_item_new_with_label(text); | 2402 | GtkWidget *menuitem = gtk_menu_item_new_with_label(text); |
@@ -2434,7 +2489,7 @@ static frontend *new_window(char *arg, int argtype, char **error) | |||
2434 | fe->me = midend_new(fe, &thegame, >k_drawing, fe); | 2489 | fe->me = midend_new(fe, &thegame, >k_drawing, fe); |
2435 | 2490 | ||
2436 | if (arg) { | 2491 | if (arg) { |
2437 | char *err; | 2492 | const char *err; |
2438 | FILE *fp; | 2493 | FILE *fp; |
2439 | 2494 | ||
2440 | errbuf[0] = '\0'; | 2495 | errbuf[0] = '\0'; |
@@ -2522,6 +2577,10 @@ static frontend *new_window(char *arg, int argtype, char **error) | |||
2522 | } | 2577 | } |
2523 | #endif | 2578 | #endif |
2524 | 2579 | ||
2580 | #if GTK_CHECK_VERSION(3,0,0) | ||
2581 | fe->awaiting_resize_ack = FALSE; | ||
2582 | #endif | ||
2583 | |||
2525 | fe->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 2584 | fe->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
2526 | gtk_window_set_title(GTK_WINDOW(fe->window), thegame.name); | 2585 | gtk_window_set_title(GTK_WINDOW(fe->window), thegame.name); |
2527 | 2586 | ||
@@ -2786,6 +2845,10 @@ static frontend *new_window(char *arg, int argtype, char **error) | |||
2786 | G_CALLBACK(configure_area), fe); | 2845 | G_CALLBACK(configure_area), fe); |
2787 | g_signal_connect(G_OBJECT(fe->window), "configure_event", | 2846 | g_signal_connect(G_OBJECT(fe->window), "configure_event", |
2788 | G_CALLBACK(configure_window), fe); | 2847 | G_CALLBACK(configure_window), fe); |
2848 | #if GTK_CHECK_VERSION(3,0,0) | ||
2849 | g_signal_connect(G_OBJECT(fe->window), "size_allocate", | ||
2850 | G_CALLBACK(window_size_alloc), fe); | ||
2851 | #endif | ||
2789 | 2852 | ||
2790 | gtk_widget_add_events(GTK_WIDGET(fe->area), | 2853 | gtk_widget_add_events(GTK_WIDGET(fe->area), |
2791 | GDK_BUTTON_PRESS_MASK | | 2854 | GDK_BUTTON_PRESS_MASK | |
@@ -2865,7 +2928,7 @@ int main(int argc, char **argv) | |||
2865 | int soln = FALSE, colour = FALSE; | 2928 | int soln = FALSE, colour = FALSE; |
2866 | float scale = 1.0F; | 2929 | float scale = 1.0F; |
2867 | float redo_proportion = 0.0F; | 2930 | float redo_proportion = 0.0F; |
2868 | char *savefile = NULL, *savesuffix = NULL; | 2931 | const char *savefile = NULL, *savesuffix = NULL; |
2869 | char *arg = NULL; | 2932 | char *arg = NULL; |
2870 | int argtype = ARG_EITHER; | 2933 | int argtype = ARG_EITHER; |
2871 | char *screenshot_file = NULL; | 2934 | char *screenshot_file = NULL; |
@@ -3108,7 +3171,8 @@ int main(int argc, char **argv) | |||
3108 | * generated descriptive game IDs.) | 3171 | * generated descriptive game IDs.) |
3109 | */ | 3172 | */ |
3110 | while (ngenerate == 0 || i < n) { | 3173 | while (ngenerate == 0 || i < n) { |
3111 | char *pstr, *err, *seed; | 3174 | char *pstr, *seed; |
3175 | const char *err; | ||
3112 | struct rusage before, after; | 3176 | struct rusage before, after; |
3113 | 3177 | ||
3114 | if (ngenerate == 0) { | 3178 | if (ngenerate == 0) { |
@@ -3162,7 +3226,7 @@ int main(int argc, char **argv) | |||
3162 | * re-entering the same game id, and then try to solve | 3226 | * re-entering the same game id, and then try to solve |
3163 | * it. | 3227 | * it. |
3164 | */ | 3228 | */ |
3165 | char *game_id, *err; | 3229 | char *game_id; |
3166 | 3230 | ||
3167 | game_id = midend_get_game_id(me); | 3231 | game_id = midend_get_game_id(me); |
3168 | err = midend_game_id(me, game_id); | 3232 | err = midend_game_id(me, game_id); |
@@ -3207,7 +3271,7 @@ int main(int argc, char **argv) | |||
3207 | sprintf(realname, "%s%d%s", savefile, i, savesuffix); | 3271 | sprintf(realname, "%s%d%s", savefile, i, savesuffix); |
3208 | 3272 | ||
3209 | if (soln) { | 3273 | if (soln) { |
3210 | char *err = midend_solve(me); | 3274 | const char *err = midend_solve(me); |
3211 | if (err) { | 3275 | if (err) { |
3212 | fprintf(stderr, "%s: unable to show solution: %s\n", | 3276 | fprintf(stderr, "%s: unable to show solution: %s\n", |
3213 | realname, err); | 3277 | realname, err); |
diff --git a/apps/plugins/puzzles/src/guess.c b/apps/plugins/puzzles/src/guess.c index 8f058638da..a14f3bdc4d 100644 --- a/apps/plugins/puzzles/src/guess.c +++ b/apps/plugins/puzzles/src/guess.c | |||
@@ -74,7 +74,7 @@ static game_params *dup_params(const game_params *params) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | static const struct { | 76 | static const struct { |
77 | char *name; | 77 | const char *name; |
78 | game_params params; | 78 | game_params params; |
79 | } guess_presets[] = { | 79 | } guess_presets[] = { |
80 | {"Standard", {6, 4, 10, FALSE, TRUE}}, | 80 | {"Standard", {6, 4, 10, FALSE, TRUE}}, |
@@ -166,35 +166,28 @@ static config_item *game_configure(const game_params *params) | |||
166 | ret[0].name = "Colours"; | 166 | ret[0].name = "Colours"; |
167 | ret[0].type = C_STRING; | 167 | ret[0].type = C_STRING; |
168 | sprintf(buf, "%d", params->ncolours); | 168 | sprintf(buf, "%d", params->ncolours); |
169 | ret[0].sval = dupstr(buf); | 169 | ret[0].u.string.sval = dupstr(buf); |
170 | ret[0].ival = 0; | ||
171 | 170 | ||
172 | ret[1].name = "Pegs per guess"; | 171 | ret[1].name = "Pegs per guess"; |
173 | ret[1].type = C_STRING; | 172 | ret[1].type = C_STRING; |
174 | sprintf(buf, "%d", params->npegs); | 173 | sprintf(buf, "%d", params->npegs); |
175 | ret[1].sval = dupstr(buf); | 174 | ret[1].u.string.sval = dupstr(buf); |
176 | ret[1].ival = 0; | ||
177 | 175 | ||
178 | ret[2].name = "Guesses"; | 176 | ret[2].name = "Guesses"; |
179 | ret[2].type = C_STRING; | 177 | ret[2].type = C_STRING; |
180 | sprintf(buf, "%d", params->nguesses); | 178 | sprintf(buf, "%d", params->nguesses); |
181 | ret[2].sval = dupstr(buf); | 179 | ret[2].u.string.sval = dupstr(buf); |
182 | ret[2].ival = 0; | ||
183 | 180 | ||
184 | ret[3].name = "Allow blanks"; | 181 | ret[3].name = "Allow blanks"; |
185 | ret[3].type = C_BOOLEAN; | 182 | ret[3].type = C_BOOLEAN; |
186 | ret[3].sval = NULL; | 183 | ret[3].u.boolean.bval = params->allow_blank; |
187 | ret[3].ival = params->allow_blank; | ||
188 | 184 | ||
189 | ret[4].name = "Allow duplicates"; | 185 | ret[4].name = "Allow duplicates"; |
190 | ret[4].type = C_BOOLEAN; | 186 | ret[4].type = C_BOOLEAN; |
191 | ret[4].sval = NULL; | 187 | ret[4].u.boolean.bval = params->allow_multiple; |
192 | ret[4].ival = params->allow_multiple; | ||
193 | 188 | ||
194 | ret[5].name = NULL; | 189 | ret[5].name = NULL; |
195 | ret[5].type = C_END; | 190 | ret[5].type = C_END; |
196 | ret[5].sval = NULL; | ||
197 | ret[5].ival = 0; | ||
198 | 191 | ||
199 | return ret; | 192 | return ret; |
200 | } | 193 | } |
@@ -203,17 +196,17 @@ static game_params *custom_params(const config_item *cfg) | |||
203 | { | 196 | { |
204 | game_params *ret = snew(game_params); | 197 | game_params *ret = snew(game_params); |
205 | 198 | ||
206 | ret->ncolours = atoi(cfg[0].sval); | 199 | ret->ncolours = atoi(cfg[0].u.string.sval); |
207 | ret->npegs = atoi(cfg[1].sval); | 200 | ret->npegs = atoi(cfg[1].u.string.sval); |
208 | ret->nguesses = atoi(cfg[2].sval); | 201 | ret->nguesses = atoi(cfg[2].u.string.sval); |
209 | 202 | ||
210 | ret->allow_blank = cfg[3].ival; | 203 | ret->allow_blank = cfg[3].u.boolean.bval; |
211 | ret->allow_multiple = cfg[4].ival; | 204 | ret->allow_multiple = cfg[4].u.boolean.bval; |
212 | 205 | ||
213 | return ret; | 206 | return ret; |
214 | } | 207 | } |
215 | 208 | ||
216 | static char *validate_params(const game_params *params, int full) | 209 | static const char *validate_params(const game_params *params, int full) |
217 | { | 210 | { |
218 | if (params->ncolours < 2 || params->npegs < 2) | 211 | if (params->ncolours < 2 || params->npegs < 2) |
219 | return "Trivial solutions are uninteresting"; | 212 | return "Trivial solutions are uninteresting"; |
@@ -287,7 +280,7 @@ newcol: | |||
287 | return ret; | 280 | return ret; |
288 | } | 281 | } |
289 | 282 | ||
290 | static char *validate_desc(const game_params *params, const char *desc) | 283 | static const char *validate_desc(const game_params *params, const char *desc) |
291 | { | 284 | { |
292 | unsigned char *bmp; | 285 | unsigned char *bmp; |
293 | int i; | 286 | int i; |
@@ -367,7 +360,7 @@ static void free_game(game_state *state) | |||
367 | } | 360 | } |
368 | 361 | ||
369 | static char *solve_game(const game_state *state, const game_state *currstate, | 362 | static char *solve_game(const game_state *state, const game_state *currstate, |
370 | const char *aux, char **error) | 363 | const char *aux, const char **error) |
371 | { | 364 | { |
372 | return dupstr("S"); | 365 | return dupstr("S"); |
373 | } | 366 | } |
@@ -447,7 +440,8 @@ static void free_ui(game_ui *ui) | |||
447 | 440 | ||
448 | static char *encode_ui(const game_ui *ui) | 441 | static char *encode_ui(const game_ui *ui) |
449 | { | 442 | { |
450 | char *ret, *p, *sep; | 443 | char *ret, *p; |
444 | const char *sep; | ||
451 | int i; | 445 | int i; |
452 | 446 | ||
453 | /* | 447 | /* |
@@ -621,7 +615,8 @@ static int mark_pegs(pegrow guess, const pegrow solution, int ncols) | |||
621 | 615 | ||
622 | static char *encode_move(const game_state *from, game_ui *ui) | 616 | static char *encode_move(const game_state *from, game_ui *ui) |
623 | { | 617 | { |
624 | char *buf, *p, *sep; | 618 | char *buf, *p; |
619 | const char *sep; | ||
625 | int len, i; | 620 | int len, i; |
626 | 621 | ||
627 | len = ui->curr_pegs->npegs * 20 + 2; | 622 | len = ui->curr_pegs->npegs * 20 + 2; |
@@ -779,7 +774,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
779 | */ | 774 | */ |
780 | if (button == 'l' || button == 'L') { | 775 | if (button == 'l' || button == 'L') { |
781 | ui->show_labels = !ui->show_labels; | 776 | ui->show_labels = !ui->show_labels; |
782 | return ""; | 777 | return UI_UPDATE; |
783 | } | 778 | } |
784 | 779 | ||
785 | if (from->solved) return NULL; | 780 | if (from->solved) return NULL; |
@@ -836,13 +831,13 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
836 | ui->drag_y = y; | 831 | ui->drag_y = y; |
837 | debug(("Start dragging, col = %d, (%d,%d)", | 832 | debug(("Start dragging, col = %d, (%d,%d)", |
838 | ui->drag_col, ui->drag_x, ui->drag_y)); | 833 | ui->drag_col, ui->drag_x, ui->drag_y)); |
839 | ret = ""; | 834 | ret = UI_UPDATE; |
840 | } | 835 | } |
841 | } else if (button == LEFT_DRAG && ui->drag_col) { | 836 | } else if (button == LEFT_DRAG && ui->drag_col) { |
842 | ui->drag_x = x; | 837 | ui->drag_x = x; |
843 | ui->drag_y = y; | 838 | ui->drag_y = y; |
844 | debug(("Keep dragging, (%d,%d)", ui->drag_x, ui->drag_y)); | 839 | debug(("Keep dragging, (%d,%d)", ui->drag_x, ui->drag_y)); |
845 | ret = ""; | 840 | ret = UI_UPDATE; |
846 | } else if (button == LEFT_RELEASE && ui->drag_col) { | 841 | } else if (button == LEFT_RELEASE && ui->drag_col) { |
847 | if (over_guess > -1) { | 842 | if (over_guess > -1) { |
848 | debug(("Dropping colour %d onto guess peg %d", | 843 | debug(("Dropping colour %d onto guess peg %d", |
@@ -859,13 +854,13 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
859 | ui->drag_opeg = -1; | 854 | ui->drag_opeg = -1; |
860 | ui->display_cur = 0; | 855 | ui->display_cur = 0; |
861 | debug(("Stop dragging.")); | 856 | debug(("Stop dragging.")); |
862 | ret = ""; | 857 | ret = UI_UPDATE; |
863 | } else if (button == RIGHT_BUTTON) { | 858 | } else if (button == RIGHT_BUTTON) { |
864 | if (over_guess > -1) { | 859 | if (over_guess > -1) { |
865 | /* we use ths feedback in the game_ui to signify | 860 | /* we use ths feedback in the game_ui to signify |
866 | * 'carry this peg to the next guess as well'. */ | 861 | * 'carry this peg to the next guess as well'. */ |
867 | ui->holds[over_guess] = 1 - ui->holds[over_guess]; | 862 | ui->holds[over_guess] = 1 - ui->holds[over_guess]; |
868 | ret = ""; | 863 | ret = UI_UPDATE; |
869 | } | 864 | } |
870 | } else if (button == LEFT_RELEASE && over_hint && ui->markable) { | 865 | } else if (button == LEFT_RELEASE && over_hint && ui->markable) { |
871 | /* NB this won't trigger if on the end of a drag; that's on | 866 | /* NB this won't trigger if on the end of a drag; that's on |
@@ -880,10 +875,10 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
880 | ui->colour_cur++; | 875 | ui->colour_cur++; |
881 | if (button == CURSOR_UP && ui->colour_cur > 0) | 876 | if (button == CURSOR_UP && ui->colour_cur > 0) |
882 | ui->colour_cur--; | 877 | ui->colour_cur--; |
883 | ret = ""; | 878 | ret = UI_UPDATE; |
884 | } else if (button == 'h' || button == 'H' || button == '?') { | 879 | } else if (button == 'h' || button == 'H' || button == '?') { |
885 | compute_hint(from, ui); | 880 | compute_hint(from, ui); |
886 | ret = ""; | 881 | ret = UI_UPDATE; |
887 | } else if (button == CURSOR_LEFT || button == CURSOR_RIGHT) { | 882 | } else if (button == CURSOR_LEFT || button == CURSOR_RIGHT) { |
888 | int maxcur = from->params.npegs; | 883 | int maxcur = from->params.npegs; |
889 | if (ui->markable) maxcur++; | 884 | if (ui->markable) maxcur++; |
@@ -893,25 +888,25 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
893 | ui->peg_cur++; | 888 | ui->peg_cur++; |
894 | if (button == CURSOR_LEFT && ui->peg_cur > 0) | 889 | if (button == CURSOR_LEFT && ui->peg_cur > 0) |
895 | ui->peg_cur--; | 890 | ui->peg_cur--; |
896 | ret = ""; | 891 | ret = UI_UPDATE; |
897 | } else if (IS_CURSOR_SELECT(button)) { | 892 | } else if (IS_CURSOR_SELECT(button)) { |
898 | ui->display_cur = 1; | 893 | ui->display_cur = 1; |
899 | if (ui->peg_cur == from->params.npegs) { | 894 | if (ui->peg_cur == from->params.npegs) { |
900 | ret = encode_move(from, ui); | 895 | ret = encode_move(from, ui); |
901 | } else { | 896 | } else { |
902 | set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1); | 897 | set_peg(&from->params, ui, ui->peg_cur, ui->colour_cur+1); |
903 | ret = ""; | 898 | ret = UI_UPDATE; |
904 | } | 899 | } |
905 | } else if (button == 'D' || button == 'd' || button == '\b') { | 900 | } else if (button == 'D' || button == 'd' || button == '\b') { |
906 | ui->display_cur = 1; | 901 | ui->display_cur = 1; |
907 | set_peg(&from->params, ui, ui->peg_cur, 0); | 902 | set_peg(&from->params, ui, ui->peg_cur, 0); |
908 | ret = ""; | 903 | ret = UI_UPDATE; |
909 | } else if (button == CURSOR_SELECT2) { | 904 | } else if (button == CURSOR_SELECT2) { |
910 | if (ui->peg_cur == from->params.npegs) | 905 | if (ui->peg_cur == from->params.npegs) |
911 | return NULL; | 906 | return NULL; |
912 | ui->display_cur = 1; | 907 | ui->display_cur = 1; |
913 | ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur]; | 908 | ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur]; |
914 | ret = ""; | 909 | ret = UI_UPDATE; |
915 | } | 910 | } |
916 | return ret; | 911 | return ret; |
917 | } | 912 | } |
diff --git a/apps/plugins/puzzles/src/inertia.c b/apps/plugins/puzzles/src/inertia.c index 918f9797e5..22cf235f20 100644 --- a/apps/plugins/puzzles/src/inertia.c +++ b/apps/plugins/puzzles/src/inertia.c | |||
@@ -168,19 +168,15 @@ static config_item *game_configure(const game_params *params) | |||
168 | ret[0].name = "Width"; | 168 | ret[0].name = "Width"; |
169 | ret[0].type = C_STRING; | 169 | ret[0].type = C_STRING; |
170 | sprintf(buf, "%d", params->w); | 170 | sprintf(buf, "%d", params->w); |
171 | ret[0].sval = dupstr(buf); | 171 | ret[0].u.string.sval = dupstr(buf); |
172 | ret[0].ival = 0; | ||
173 | 172 | ||
174 | ret[1].name = "Height"; | 173 | ret[1].name = "Height"; |
175 | ret[1].type = C_STRING; | 174 | ret[1].type = C_STRING; |
176 | sprintf(buf, "%d", params->h); | 175 | sprintf(buf, "%d", params->h); |
177 | ret[1].sval = dupstr(buf); | 176 | ret[1].u.string.sval = dupstr(buf); |
178 | ret[1].ival = 0; | ||
179 | 177 | ||
180 | ret[2].name = NULL; | 178 | ret[2].name = NULL; |
181 | ret[2].type = C_END; | 179 | ret[2].type = C_END; |
182 | ret[2].sval = NULL; | ||
183 | ret[2].ival = 0; | ||
184 | 180 | ||
185 | return ret; | 181 | return ret; |
186 | } | 182 | } |
@@ -189,13 +185,13 @@ static game_params *custom_params(const config_item *cfg) | |||
189 | { | 185 | { |
190 | game_params *ret = snew(game_params); | 186 | game_params *ret = snew(game_params); |
191 | 187 | ||
192 | ret->w = atoi(cfg[0].sval); | 188 | ret->w = atoi(cfg[0].u.string.sval); |
193 | ret->h = atoi(cfg[1].sval); | 189 | ret->h = atoi(cfg[1].u.string.sval); |
194 | 190 | ||
195 | return ret; | 191 | return ret; |
196 | } | 192 | } |
197 | 193 | ||
198 | static char *validate_params(const game_params *params, int full) | 194 | static const char *validate_params(const game_params *params, int full) |
199 | { | 195 | { |
200 | /* | 196 | /* |
201 | * Avoid completely degenerate cases which only have one | 197 | * Avoid completely degenerate cases which only have one |
@@ -589,7 +585,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
589 | return gengrid(params->w, params->h, rs); | 585 | return gengrid(params->w, params->h, rs); |
590 | } | 586 | } |
591 | 587 | ||
592 | static char *validate_desc(const game_params *params, const char *desc) | 588 | static const char *validate_desc(const game_params *params, const char *desc) |
593 | { | 589 | { |
594 | int w = params->w, h = params->h, wh = w*h; | 590 | int w = params->w, h = params->h, wh = w*h; |
595 | int starts = 0, gems = 0, i; | 591 | int starts = 0, gems = 0, i; |
@@ -733,7 +729,7 @@ static int compare_integers(const void *av, const void *bv) | |||
733 | } | 729 | } |
734 | 730 | ||
735 | static char *solve_game(const game_state *state, const game_state *currstate, | 731 | static char *solve_game(const game_state *state, const game_state *currstate, |
736 | const char *aux, char **error) | 732 | const char *aux, const char **error) |
737 | { | 733 | { |
738 | int w = currstate->p.w, h = currstate->p.h, wh = w*h; | 734 | int w = currstate->p.w, h = currstate->p.h, wh = w*h; |
739 | int *nodes, *nodeindex, *edges, *backedges, *edgei, *backedgei, *circuit; | 735 | int *nodes, *nodeindex, *edges, *backedges, *edgei, *backedgei, *circuit; |
@@ -742,7 +738,8 @@ static char *solve_game(const game_state *state, const game_state *currstate, | |||
742 | int *unvisited; | 738 | int *unvisited; |
743 | int circuitlen, circuitsize; | 739 | int circuitlen, circuitsize; |
744 | int head, tail, pass, i, j, n, x, y, d, dd; | 740 | int head, tail, pass, i, j, n, x, y, d, dd; |
745 | char *err, *soln, *p; | 741 | const char *err; |
742 | char *soln, *p; | ||
746 | 743 | ||
747 | /* | 744 | /* |
748 | * Before anything else, deal with the special case in which | 745 | * Before anything else, deal with the special case in which |
@@ -1737,7 +1734,8 @@ static game_state *execute_move(const game_state *state, const char *move) | |||
1737 | assert(ret->solnpos < ret->soln->len); /* or gems == 0 */ | 1734 | assert(ret->solnpos < ret->soln->len); /* or gems == 0 */ |
1738 | assert(!ret->dead); /* or not a solution */ | 1735 | assert(!ret->dead); /* or not a solution */ |
1739 | } else { | 1736 | } else { |
1740 | char *error = NULL, *soln = solve_game(NULL, ret, NULL, &error); | 1737 | const char *error = NULL; |
1738 | char *soln = solve_game(NULL, ret, NULL, &error); | ||
1741 | if (!error) { | 1739 | if (!error) { |
1742 | install_new_solution(ret, soln); | 1740 | install_new_solution(ret, soln); |
1743 | sfree(soln); | 1741 | sfree(soln); |
diff --git a/apps/plugins/puzzles/src/keen.c b/apps/plugins/puzzles/src/keen.c index fdaae32e5d..ec7af12985 100644 --- a/apps/plugins/puzzles/src/keen.c +++ b/apps/plugins/puzzles/src/keen.c | |||
@@ -183,23 +183,19 @@ static config_item *game_configure(const game_params *params) | |||
183 | ret[0].name = "Grid size"; | 183 | ret[0].name = "Grid size"; |
184 | ret[0].type = C_STRING; | 184 | ret[0].type = C_STRING; |
185 | sprintf(buf, "%d", params->w); | 185 | sprintf(buf, "%d", params->w); |
186 | ret[0].sval = dupstr(buf); | 186 | ret[0].u.string.sval = dupstr(buf); |
187 | ret[0].ival = 0; | ||
188 | 187 | ||
189 | ret[1].name = "Difficulty"; | 188 | ret[1].name = "Difficulty"; |
190 | ret[1].type = C_CHOICES; | 189 | ret[1].type = C_CHOICES; |
191 | ret[1].sval = DIFFCONFIG; | 190 | ret[1].u.choices.choicenames = DIFFCONFIG; |
192 | ret[1].ival = params->diff; | 191 | ret[1].u.choices.selected = params->diff; |
193 | 192 | ||
194 | ret[2].name = "Multiplication only"; | 193 | ret[2].name = "Multiplication only"; |
195 | ret[2].type = C_BOOLEAN; | 194 | ret[2].type = C_BOOLEAN; |
196 | ret[2].sval = NULL; | 195 | ret[2].u.boolean.bval = params->multiplication_only; |
197 | ret[2].ival = params->multiplication_only; | ||
198 | 196 | ||
199 | ret[3].name = NULL; | 197 | ret[3].name = NULL; |
200 | ret[3].type = C_END; | 198 | ret[3].type = C_END; |
201 | ret[3].sval = NULL; | ||
202 | ret[3].ival = 0; | ||
203 | 199 | ||
204 | return ret; | 200 | return ret; |
205 | } | 201 | } |
@@ -208,14 +204,14 @@ static game_params *custom_params(const config_item *cfg) | |||
208 | { | 204 | { |
209 | game_params *ret = snew(game_params); | 205 | game_params *ret = snew(game_params); |
210 | 206 | ||
211 | ret->w = atoi(cfg[0].sval); | 207 | ret->w = atoi(cfg[0].u.string.sval); |
212 | ret->diff = cfg[1].ival; | 208 | ret->diff = cfg[1].u.choices.selected; |
213 | ret->multiplication_only = cfg[2].ival; | 209 | ret->multiplication_only = cfg[2].u.boolean.bval; |
214 | 210 | ||
215 | return ret; | 211 | return ret; |
216 | } | 212 | } |
217 | 213 | ||
218 | static char *validate_params(const game_params *params, int full) | 214 | static const char *validate_params(const game_params *params, int full) |
219 | { | 215 | { |
220 | if (params->w < 3 || params->w > 9) | 216 | if (params->w < 3 || params->w > 9) |
221 | return "Grid size must be between 3 and 9"; | 217 | return "Grid size must be between 3 and 9"; |
@@ -731,7 +727,7 @@ static char *encode_block_structure(char *p, int w, int *dsf) | |||
731 | return q; | 727 | return q; |
732 | } | 728 | } |
733 | 729 | ||
734 | static char *parse_block_structure(const char **p, int w, int *dsf) | 730 | static const char *parse_block_structure(const char **p, int w, int *dsf) |
735 | { | 731 | { |
736 | int a = w*w; | 732 | int a = w*w; |
737 | int pos = 0; | 733 | int pos = 0; |
@@ -1207,11 +1203,11 @@ done | |||
1207 | * Gameplay. | 1203 | * Gameplay. |
1208 | */ | 1204 | */ |
1209 | 1205 | ||
1210 | static char *validate_desc(const game_params *params, const char *desc) | 1206 | static const char *validate_desc(const game_params *params, const char *desc) |
1211 | { | 1207 | { |
1212 | int w = params->w, a = w*w; | 1208 | int w = params->w, a = w*w; |
1213 | int *dsf; | 1209 | int *dsf; |
1214 | char *ret; | 1210 | const char *ret; |
1215 | const char *p = desc; | 1211 | const char *p = desc; |
1216 | int i; | 1212 | int i; |
1217 | 1213 | ||
@@ -1349,7 +1345,7 @@ static void free_game(game_state *state) | |||
1349 | } | 1345 | } |
1350 | 1346 | ||
1351 | static char *solve_game(const game_state *state, const game_state *currstate, | 1347 | static char *solve_game(const game_state *state, const game_state *currstate, |
1352 | const char *aux, char **error) | 1348 | const char *aux, const char **error) |
1353 | { | 1349 | { |
1354 | int w = state->par.w, a = w*w; | 1350 | int w = state->par.w, a = w*w; |
1355 | int i, ret; | 1351 | int i, ret; |
@@ -1616,7 +1612,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1616 | ui->hpencil = 0; | 1612 | ui->hpencil = 0; |
1617 | } | 1613 | } |
1618 | ui->hcursor = 0; | 1614 | ui->hcursor = 0; |
1619 | return ""; /* UI activity occurred */ | 1615 | return UI_UPDATE; |
1620 | } | 1616 | } |
1621 | if (button == RIGHT_BUTTON) { | 1617 | if (button == RIGHT_BUTTON) { |
1622 | /* | 1618 | /* |
@@ -1636,19 +1632,19 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1636 | ui->hshow = 0; | 1632 | ui->hshow = 0; |
1637 | } | 1633 | } |
1638 | ui->hcursor = 0; | 1634 | ui->hcursor = 0; |
1639 | return ""; /* UI activity occurred */ | 1635 | return UI_UPDATE; |
1640 | } | 1636 | } |
1641 | } | 1637 | } |
1642 | if (IS_CURSOR_MOVE(button)) { | 1638 | if (IS_CURSOR_MOVE(button)) { |
1643 | move_cursor(button, &ui->hx, &ui->hy, w, w, 0); | 1639 | move_cursor(button, &ui->hx, &ui->hy, w, w, 0); |
1644 | ui->hshow = ui->hcursor = 1; | 1640 | ui->hshow = ui->hcursor = 1; |
1645 | return ""; | 1641 | return UI_UPDATE; |
1646 | } | 1642 | } |
1647 | if (ui->hshow && | 1643 | if (ui->hshow && |
1648 | (button == CURSOR_SELECT)) { | 1644 | (button == CURSOR_SELECT)) { |
1649 | ui->hpencil = 1 - ui->hpencil; | 1645 | ui->hpencil = 1 - ui->hpencil; |
1650 | ui->hcursor = 1; | 1646 | ui->hcursor = 1; |
1651 | return ""; | 1647 | return UI_UPDATE; |
1652 | } | 1648 | } |
1653 | 1649 | ||
1654 | if (ui->hshow && | 1650 | if (ui->hshow && |
@@ -2383,7 +2379,8 @@ int main(int argc, char **argv) | |||
2383 | { | 2379 | { |
2384 | game_params *p; | 2380 | game_params *p; |
2385 | game_state *s; | 2381 | game_state *s; |
2386 | char *id = NULL, *desc, *err; | 2382 | char *id = NULL, *desc; |
2383 | const char *err; | ||
2387 | int grade = FALSE; | 2384 | int grade = FALSE; |
2388 | int ret, diff, really_show_working = FALSE; | 2385 | int ret, diff, really_show_working = FALSE; |
2389 | 2386 | ||
diff --git a/apps/plugins/puzzles/src/latin.c b/apps/plugins/puzzles/src/latin.c index 03d78aff1f..50fae3cfea 100644 --- a/apps/plugins/puzzles/src/latin.c +++ b/apps/plugins/puzzles/src/latin.c | |||
@@ -73,7 +73,7 @@ void latin_solver_place(struct latin_solver *solver, int x, int y, int n) | |||
73 | 73 | ||
74 | int latin_solver_elim(struct latin_solver *solver, int start, int step | 74 | int latin_solver_elim(struct latin_solver *solver, int start, int step |
75 | #ifdef STANDALONE_SOLVER | 75 | #ifdef STANDALONE_SOLVER |
76 | , char *fmt, ... | 76 | , const char *fmt, ... |
77 | #endif | 77 | #endif |
78 | ) | 78 | ) |
79 | { | 79 | { |
@@ -150,7 +150,7 @@ int latin_solver_set(struct latin_solver *solver, | |||
150 | struct latin_solver_scratch *scratch, | 150 | struct latin_solver_scratch *scratch, |
151 | int start, int step1, int step2 | 151 | int start, int step1, int step2 |
152 | #ifdef STANDALONE_SOLVER | 152 | #ifdef STANDALONE_SOLVER |
153 | , char *fmt, ... | 153 | , const char *fmt, ... |
154 | #endif | 154 | #endif |
155 | ) | 155 | ) |
156 | { | 156 | { |
@@ -499,7 +499,7 @@ int latin_solver_forcing(struct latin_solver *solver, | |||
499 | (xt == x || yt == y)) { | 499 | (xt == x || yt == y)) { |
500 | #ifdef STANDALONE_SOLVER | 500 | #ifdef STANDALONE_SOLVER |
501 | if (solver_show_working) { | 501 | if (solver_show_working) { |
502 | char *sep = ""; | 502 | const char *sep = ""; |
503 | int xl, yl; | 503 | int xl, yl; |
504 | printf("%*sforcing chain, %s at ends of ", | 504 | printf("%*sforcing chain, %s at ends of ", |
505 | solver_recurse_depth*4, "", | 505 | solver_recurse_depth*4, "", |
@@ -775,7 +775,7 @@ static int latin_solver_recurse | |||
775 | 775 | ||
776 | #ifdef STANDALONE_SOLVER | 776 | #ifdef STANDALONE_SOLVER |
777 | if (solver_show_working) { | 777 | if (solver_show_working) { |
778 | char *sep = ""; | 778 | const char *sep = ""; |
779 | printf("%*srecursing on (%d,%d) [", | 779 | printf("%*srecursing on (%d,%d) [", |
780 | solver_recurse_depth*4, "", x+1, y+1); | 780 | solver_recurse_depth*4, "", x+1, y+1); |
781 | for (i = 0; i < j; i++) { | 781 | for (i = 0; i < j; i++) { |
diff --git a/apps/plugins/puzzles/src/latin.h b/apps/plugins/puzzles/src/latin.h index 4b09f16ce1..e13050e9a8 100644 --- a/apps/plugins/puzzles/src/latin.h +++ b/apps/plugins/puzzles/src/latin.h | |||
@@ -39,7 +39,7 @@ void latin_solver_place(struct latin_solver *solver, int x, int y, int n); | |||
39 | /* Positional elimination. */ | 39 | /* Positional elimination. */ |
40 | int latin_solver_elim(struct latin_solver *solver, int start, int step | 40 | int latin_solver_elim(struct latin_solver *solver, int start, int step |
41 | #ifdef STANDALONE_SOLVER | 41 | #ifdef STANDALONE_SOLVER |
42 | , char *fmt, ... | 42 | , const char *fmt, ... |
43 | #endif | 43 | #endif |
44 | ); | 44 | ); |
45 | 45 | ||
@@ -49,7 +49,7 @@ int latin_solver_set(struct latin_solver *solver, | |||
49 | struct latin_solver_scratch *scratch, | 49 | struct latin_solver_scratch *scratch, |
50 | int start, int step1, int step2 | 50 | int start, int step1, int step2 |
51 | #ifdef STANDALONE_SOLVER | 51 | #ifdef STANDALONE_SOLVER |
52 | , char *fmt, ... | 52 | , const char *fmt, ... |
53 | #endif | 53 | #endif |
54 | ); | 54 | ); |
55 | 55 | ||
diff --git a/apps/plugins/puzzles/src/lightup.c b/apps/plugins/puzzles/src/lightup.c index 4dd46c8392..fd363e076e 100644 --- a/apps/plugins/puzzles/src/lightup.c +++ b/apps/plugins/puzzles/src/lightup.c | |||
@@ -299,37 +299,32 @@ static config_item *game_configure(const game_params *params) | |||
299 | ret[0].name = "Width"; | 299 | ret[0].name = "Width"; |
300 | ret[0].type = C_STRING; | 300 | ret[0].type = C_STRING; |
301 | sprintf(buf, "%d", params->w); | 301 | sprintf(buf, "%d", params->w); |
302 | ret[0].sval = dupstr(buf); | 302 | ret[0].u.string.sval = dupstr(buf); |
303 | ret[0].ival = 0; | ||
304 | 303 | ||
305 | ret[1].name = "Height"; | 304 | ret[1].name = "Height"; |
306 | ret[1].type = C_STRING; | 305 | ret[1].type = C_STRING; |
307 | sprintf(buf, "%d", params->h); | 306 | sprintf(buf, "%d", params->h); |
308 | ret[1].sval = dupstr(buf); | 307 | ret[1].u.string.sval = dupstr(buf); |
309 | ret[1].ival = 0; | ||
310 | 308 | ||
311 | ret[2].name = "%age of black squares"; | 309 | ret[2].name = "%age of black squares"; |
312 | ret[2].type = C_STRING; | 310 | ret[2].type = C_STRING; |
313 | sprintf(buf, "%d", params->blackpc); | 311 | sprintf(buf, "%d", params->blackpc); |
314 | ret[2].sval = dupstr(buf); | 312 | ret[2].u.string.sval = dupstr(buf); |
315 | ret[2].ival = 0; | ||
316 | 313 | ||
317 | ret[3].name = "Symmetry"; | 314 | ret[3].name = "Symmetry"; |
318 | ret[3].type = C_CHOICES; | 315 | ret[3].type = C_CHOICES; |
319 | ret[3].sval = ":None" | 316 | ret[3].u.choices.choicenames = ":None" |
320 | ":2-way mirror:2-way rotational" | 317 | ":2-way mirror:2-way rotational" |
321 | ":4-way mirror:4-way rotational"; | 318 | ":4-way mirror:4-way rotational"; |
322 | ret[3].ival = params->symm; | 319 | ret[3].u.choices.selected = params->symm; |
323 | 320 | ||
324 | ret[4].name = "Difficulty"; | 321 | ret[4].name = "Difficulty"; |
325 | ret[4].type = C_CHOICES; | 322 | ret[4].type = C_CHOICES; |
326 | ret[4].sval = ":Easy:Tricky:Hard"; | 323 | ret[4].u.choices.choicenames = ":Easy:Tricky:Hard"; |
327 | ret[4].ival = params->difficulty; | 324 | ret[4].u.choices.selected = params->difficulty; |
328 | 325 | ||
329 | ret[5].name = NULL; | 326 | ret[5].name = NULL; |
330 | ret[5].type = C_END; | 327 | ret[5].type = C_END; |
331 | ret[5].sval = NULL; | ||
332 | ret[5].ival = 0; | ||
333 | 328 | ||
334 | return ret; | 329 | return ret; |
335 | } | 330 | } |
@@ -338,16 +333,16 @@ static game_params *custom_params(const config_item *cfg) | |||
338 | { | 333 | { |
339 | game_params *ret = snew(game_params); | 334 | game_params *ret = snew(game_params); |
340 | 335 | ||
341 | ret->w = atoi(cfg[0].sval); | 336 | ret->w = atoi(cfg[0].u.string.sval); |
342 | ret->h = atoi(cfg[1].sval); | 337 | ret->h = atoi(cfg[1].u.string.sval); |
343 | ret->blackpc = atoi(cfg[2].sval); | 338 | ret->blackpc = atoi(cfg[2].u.string.sval); |
344 | ret->symm = cfg[3].ival; | 339 | ret->symm = cfg[3].u.choices.selected; |
345 | ret->difficulty = cfg[4].ival; | 340 | ret->difficulty = cfg[4].u.choices.selected; |
346 | 341 | ||
347 | return ret; | 342 | return ret; |
348 | } | 343 | } |
349 | 344 | ||
350 | static char *validate_params(const game_params *params, int full) | 345 | static const char *validate_params(const game_params *params, int full) |
351 | { | 346 | { |
352 | if (params->w < 2 || params->h < 2) | 347 | if (params->w < 2 || params->h < 2) |
353 | return "Width and height must be at least 2"; | 348 | return "Width and height must be at least 2"; |
@@ -1629,7 +1624,7 @@ goodpuzzle: | |||
1629 | return ret; | 1624 | return ret; |
1630 | } | 1625 | } |
1631 | 1626 | ||
1632 | static char *validate_desc(const game_params *params, const char *desc) | 1627 | static const char *validate_desc(const game_params *params, const char *desc) |
1633 | { | 1628 | { |
1634 | int i; | 1629 | int i; |
1635 | for (i = 0; i < params->w*params->h; i++) { | 1630 | for (i = 0; i < params->w*params->h; i++) { |
@@ -1700,7 +1695,7 @@ static game_state *new_game(midend *me, const game_params *params, | |||
1700 | } | 1695 | } |
1701 | 1696 | ||
1702 | static char *solve_game(const game_state *state, const game_state *currstate, | 1697 | static char *solve_game(const game_state *state, const game_state *currstate, |
1703 | const char *aux, char **error) | 1698 | const char *aux, const char **error) |
1704 | { | 1699 | { |
1705 | game_state *solved; | 1700 | game_state *solved; |
1706 | char *move = NULL, buf[80]; | 1701 | char *move = NULL, buf[80]; |
@@ -1882,7 +1877,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1882 | enum { NONE, FLIP_LIGHT, FLIP_IMPOSSIBLE } action = NONE; | 1877 | enum { NONE, FLIP_LIGHT, FLIP_IMPOSSIBLE } action = NONE; |
1883 | int cx = -1, cy = -1; | 1878 | int cx = -1, cy = -1; |
1884 | unsigned int flags; | 1879 | unsigned int flags; |
1885 | char buf[80], *nullret = NULL, *empty = "", c; | 1880 | char buf[80], *nullret = UI_UPDATE, *empty = UI_UPDATE, c; |
1886 | 1881 | ||
1887 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { | 1882 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { |
1888 | if (ui->cur_visible) | 1883 | if (ui->cur_visible) |
@@ -2331,7 +2326,8 @@ int main(int argc, char **argv) | |||
2331 | { | 2326 | { |
2332 | game_params *p; | 2327 | game_params *p; |
2333 | game_state *s; | 2328 | game_state *s; |
2334 | char *id = NULL, *desc, *err, *result; | 2329 | char *id = NULL, *desc, *result; |
2330 | const char *err; | ||
2335 | int nsol, diff, really_verbose = 0; | 2331 | int nsol, diff, really_verbose = 0; |
2336 | unsigned int sflags; | 2332 | unsigned int sflags; |
2337 | 2333 | ||
diff --git a/apps/plugins/puzzles/src/loopy.c b/apps/plugins/puzzles/src/loopy.c index 92b27ab516..5f1940e945 100644 --- a/apps/plugins/puzzles/src/loopy.c +++ b/apps/plugins/puzzles/src/loopy.c | |||
@@ -232,7 +232,7 @@ struct game_drawstate { | |||
232 | char *clue_satisfied; | 232 | char *clue_satisfied; |
233 | }; | 233 | }; |
234 | 234 | ||
235 | static char *validate_desc(const game_params *params, const char *desc); | 235 | static const char *validate_desc(const game_params *params, const char *desc); |
236 | static int dot_order(const game_state* state, int i, char line_type); | 236 | static int dot_order(const game_state* state, int i, char line_type); |
237 | static int face_order(const game_state* state, int i, char line_type); | 237 | static int face_order(const game_state* state, int i, char line_type); |
238 | static solver_state *solve_game_rec(const solver_state *sstate); | 238 | static solver_state *solve_game_rec(const solver_state *sstate); |
@@ -295,7 +295,7 @@ static grid_type grid_types[] = { GRIDLIST(GRID_GRIDTYPE) }; | |||
295 | #define NUM_GRID_TYPES (sizeof(grid_types) / sizeof(grid_types[0])) | 295 | #define NUM_GRID_TYPES (sizeof(grid_types) / sizeof(grid_types[0])) |
296 | static const struct { | 296 | static const struct { |
297 | int amin, omin; | 297 | int amin, omin; |
298 | char *aerr, *oerr; | 298 | const char *aerr, *oerr; |
299 | } grid_size_limits[] = { GRIDLIST(GRID_SIZES) }; | 299 | } grid_size_limits[] = { GRIDLIST(GRID_SIZES) }; |
300 | 300 | ||
301 | /* Generates a (dynamically allocated) new grid, according to the | 301 | /* Generates a (dynamically allocated) new grid, according to the |
@@ -640,29 +640,25 @@ static config_item *game_configure(const game_params *params) | |||
640 | ret[0].name = "Width"; | 640 | ret[0].name = "Width"; |
641 | ret[0].type = C_STRING; | 641 | ret[0].type = C_STRING; |
642 | sprintf(buf, "%d", params->w); | 642 | sprintf(buf, "%d", params->w); |
643 | ret[0].sval = dupstr(buf); | 643 | ret[0].u.string.sval = dupstr(buf); |
644 | ret[0].ival = 0; | ||
645 | 644 | ||
646 | ret[1].name = "Height"; | 645 | ret[1].name = "Height"; |
647 | ret[1].type = C_STRING; | 646 | ret[1].type = C_STRING; |
648 | sprintf(buf, "%d", params->h); | 647 | sprintf(buf, "%d", params->h); |
649 | ret[1].sval = dupstr(buf); | 648 | ret[1].u.string.sval = dupstr(buf); |
650 | ret[1].ival = 0; | ||
651 | 649 | ||
652 | ret[2].name = "Grid type"; | 650 | ret[2].name = "Grid type"; |
653 | ret[2].type = C_CHOICES; | 651 | ret[2].type = C_CHOICES; |
654 | ret[2].sval = GRID_CONFIGS; | 652 | ret[2].u.choices.choicenames = GRID_CONFIGS; |
655 | ret[2].ival = params->type; | 653 | ret[2].u.choices.selected = params->type; |
656 | 654 | ||
657 | ret[3].name = "Difficulty"; | 655 | ret[3].name = "Difficulty"; |
658 | ret[3].type = C_CHOICES; | 656 | ret[3].type = C_CHOICES; |
659 | ret[3].sval = DIFFCONFIG; | 657 | ret[3].u.choices.choicenames = DIFFCONFIG; |
660 | ret[3].ival = params->diff; | 658 | ret[3].u.choices.selected = params->diff; |
661 | 659 | ||
662 | ret[4].name = NULL; | 660 | ret[4].name = NULL; |
663 | ret[4].type = C_END; | 661 | ret[4].type = C_END; |
664 | ret[4].sval = NULL; | ||
665 | ret[4].ival = 0; | ||
666 | 662 | ||
667 | return ret; | 663 | return ret; |
668 | } | 664 | } |
@@ -671,15 +667,15 @@ static game_params *custom_params(const config_item *cfg) | |||
671 | { | 667 | { |
672 | game_params *ret = snew(game_params); | 668 | game_params *ret = snew(game_params); |
673 | 669 | ||
674 | ret->w = atoi(cfg[0].sval); | 670 | ret->w = atoi(cfg[0].u.string.sval); |
675 | ret->h = atoi(cfg[1].sval); | 671 | ret->h = atoi(cfg[1].u.string.sval); |
676 | ret->type = cfg[2].ival; | 672 | ret->type = cfg[2].u.choices.selected; |
677 | ret->diff = cfg[3].ival; | 673 | ret->diff = cfg[3].u.choices.selected; |
678 | 674 | ||
679 | return ret; | 675 | return ret; |
680 | } | 676 | } |
681 | 677 | ||
682 | static char *validate_params(const game_params *params, int full) | 678 | static const char *validate_params(const game_params *params, int full) |
683 | { | 679 | { |
684 | if (params->type < 0 || params->type >= NUM_GRID_TYPES) | 680 | if (params->type < 0 || params->type >= NUM_GRID_TYPES) |
685 | return "Illegal grid type"; | 681 | return "Illegal grid type"; |
@@ -760,11 +756,12 @@ static char *extract_grid_desc(const char **desc) | |||
760 | 756 | ||
761 | /* We require that the params pass the test in validate_params and that the | 757 | /* We require that the params pass the test in validate_params and that the |
762 | * description fills the entire game area */ | 758 | * description fills the entire game area */ |
763 | static char *validate_desc(const game_params *params, const char *desc) | 759 | static const char *validate_desc(const game_params *params, const char *desc) |
764 | { | 760 | { |
765 | int count = 0; | 761 | int count = 0; |
766 | grid *g; | 762 | grid *g; |
767 | char *grid_desc, *ret; | 763 | char *grid_desc; |
764 | const char *ret; | ||
768 | 765 | ||
769 | /* It's pretty inefficient to do this just for validation. All we need to | 766 | /* It's pretty inefficient to do this just for validation. All we need to |
770 | * know is the precise number of faces. */ | 767 | * know is the precise number of faces. */ |
@@ -2912,7 +2909,7 @@ static solver_state *solve_game_rec(const solver_state *sstate_start) | |||
2912 | } | 2909 | } |
2913 | 2910 | ||
2914 | static char *solve_game(const game_state *state, const game_state *currstate, | 2911 | static char *solve_game(const game_state *state, const game_state *currstate, |
2915 | const char *aux, char **error) | 2912 | const char *aux, const char **error) |
2916 | { | 2913 | { |
2917 | char *soln = NULL; | 2914 | char *soln = NULL; |
2918 | solver_state *sstate, *new_sstate; | 2915 | solver_state *sstate, *new_sstate; |
@@ -3691,7 +3688,8 @@ int main(int argc, char **argv) | |||
3691 | { | 3688 | { |
3692 | game_params *p; | 3689 | game_params *p; |
3693 | game_state *s; | 3690 | game_state *s; |
3694 | char *id = NULL, *desc, *err; | 3691 | char *id = NULL, *desc; |
3692 | const char *err; | ||
3695 | int grade = FALSE; | 3693 | int grade = FALSE; |
3696 | int ret, diff; | 3694 | int ret, diff; |
3697 | #if 0 /* verbose solver not supported here (yet) */ | 3695 | #if 0 /* verbose solver not supported here (yet) */ |
diff --git a/apps/plugins/puzzles/src/magnets.c b/apps/plugins/puzzles/src/magnets.c index 553ca0d0da..ebb537663a 100644 --- a/apps/plugins/puzzles/src/magnets.c +++ b/apps/plugins/puzzles/src/magnets.c | |||
@@ -193,29 +193,24 @@ static config_item *game_configure(const game_params *params) | |||
193 | ret[0].name = "Width"; | 193 | ret[0].name = "Width"; |
194 | ret[0].type = C_STRING; | 194 | ret[0].type = C_STRING; |
195 | sprintf(buf, "%d", params->w); | 195 | sprintf(buf, "%d", params->w); |
196 | ret[0].sval = dupstr(buf); | 196 | ret[0].u.string.sval = dupstr(buf); |
197 | ret[0].ival = 0; | ||
198 | 197 | ||
199 | ret[1].name = "Height"; | 198 | ret[1].name = "Height"; |
200 | ret[1].type = C_STRING; | 199 | ret[1].type = C_STRING; |
201 | sprintf(buf, "%d", params->h); | 200 | sprintf(buf, "%d", params->h); |
202 | ret[1].sval = dupstr(buf); | 201 | ret[1].u.string.sval = dupstr(buf); |
203 | ret[1].ival = 0; | ||
204 | 202 | ||
205 | ret[2].name = "Difficulty"; | 203 | ret[2].name = "Difficulty"; |
206 | ret[2].type = C_CHOICES; | 204 | ret[2].type = C_CHOICES; |
207 | ret[2].sval = DIFFCONFIG; | 205 | ret[2].u.choices.choicenames = DIFFCONFIG; |
208 | ret[2].ival = params->diff; | 206 | ret[2].u.choices.selected = params->diff; |
209 | 207 | ||
210 | ret[3].name = "Strip clues"; | 208 | ret[3].name = "Strip clues"; |
211 | ret[3].type = C_BOOLEAN; | 209 | ret[3].type = C_BOOLEAN; |
212 | ret[3].sval = NULL; | 210 | ret[3].u.boolean.bval = params->stripclues; |
213 | ret[3].ival = params->stripclues; | ||
214 | 211 | ||
215 | ret[4].name = NULL; | 212 | ret[4].name = NULL; |
216 | ret[4].type = C_END; | 213 | ret[4].type = C_END; |
217 | ret[4].sval = NULL; | ||
218 | ret[4].ival = 0; | ||
219 | 214 | ||
220 | return ret; | 215 | return ret; |
221 | } | 216 | } |
@@ -224,15 +219,15 @@ static game_params *custom_params(const config_item *cfg) | |||
224 | { | 219 | { |
225 | game_params *ret = snew(game_params); | 220 | game_params *ret = snew(game_params); |
226 | 221 | ||
227 | ret->w = atoi(cfg[0].sval); | 222 | ret->w = atoi(cfg[0].u.string.sval); |
228 | ret->h = atoi(cfg[1].sval); | 223 | ret->h = atoi(cfg[1].u.string.sval); |
229 | ret->diff = cfg[2].ival; | 224 | ret->diff = cfg[2].u.choices.selected; |
230 | ret->stripclues = cfg[3].ival; | 225 | ret->stripclues = cfg[3].u.boolean.bval; |
231 | 226 | ||
232 | return ret; | 227 | return ret; |
233 | } | 228 | } |
234 | 229 | ||
235 | static char *validate_params(const game_params *params, int full) | 230 | static const char *validate_params(const game_params *params, int full) |
236 | { | 231 | { |
237 | if (params->w < 2) return "Width must be at least one"; | 232 | if (params->w < 2) return "Width must be at least one"; |
238 | if (params->h < 2) return "Height must be at least one"; | 233 | if (params->h < 2) return "Height must be at least one"; |
@@ -539,7 +534,7 @@ done: | |||
539 | return state; | 534 | return state; |
540 | } | 535 | } |
541 | 536 | ||
542 | static char *validate_desc(const game_params *params, const char *desc) | 537 | static const char *validate_desc(const game_params *params, const char *desc) |
543 | { | 538 | { |
544 | const char *prob; | 539 | const char *prob; |
545 | game_state *st = new_game_int(params, desc, &prob); | 540 | game_state *st = new_game_int(params, desc, &prob); |
@@ -1455,7 +1450,7 @@ static void solve_from_aux(const game_state *state, const char *aux) | |||
1455 | } | 1450 | } |
1456 | 1451 | ||
1457 | static char *solve_game(const game_state *state, const game_state *currstate, | 1452 | static char *solve_game(const game_state *state, const game_state *currstate, |
1458 | const char *aux, char **error) | 1453 | const char *aux, const char **error) |
1459 | { | 1454 | { |
1460 | game_state *solved = dup_game(currstate); | 1455 | game_state *solved = dup_game(currstate); |
1461 | char *move = NULL; | 1456 | char *move = NULL; |
@@ -1804,11 +1799,11 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1804 | if (IS_CURSOR_MOVE(button)) { | 1799 | if (IS_CURSOR_MOVE(button)) { |
1805 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, 0); | 1800 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->w, state->h, 0); |
1806 | ui->cur_visible = 1; | 1801 | ui->cur_visible = 1; |
1807 | return ""; | 1802 | return UI_UPDATE; |
1808 | } else if (IS_CURSOR_SELECT(button)) { | 1803 | } else if (IS_CURSOR_SELECT(button)) { |
1809 | if (!ui->cur_visible) { | 1804 | if (!ui->cur_visible) { |
1810 | ui->cur_visible = 1; | 1805 | ui->cur_visible = 1; |
1811 | return ""; | 1806 | return UI_UPDATE; |
1812 | } | 1807 | } |
1813 | action = (button == CURSOR_SELECT) ? CYCLE_MAGNET : CYCLE_NEUTRAL; | 1808 | action = (button == CURSOR_SELECT) ? CYCLE_MAGNET : CYCLE_NEUTRAL; |
1814 | gx = ui->cur_x; | 1809 | gx = ui->cur_x; |
@@ -1817,7 +1812,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1817 | (button == LEFT_BUTTON || button == RIGHT_BUTTON)) { | 1812 | (button == LEFT_BUTTON || button == RIGHT_BUTTON)) { |
1818 | if (ui->cur_visible) { | 1813 | if (ui->cur_visible) { |
1819 | ui->cur_visible = 0; | 1814 | ui->cur_visible = 0; |
1820 | nullret = ""; | 1815 | nullret = UI_UPDATE; |
1821 | } | 1816 | } |
1822 | action = (button == LEFT_BUTTON) ? CYCLE_MAGNET : CYCLE_NEUTRAL; | 1817 | action = (button == LEFT_BUTTON) ? CYCLE_MAGNET : CYCLE_NEUTRAL; |
1823 | } else if (button == LEFT_BUTTON && is_clue(state, gx, gy)) { | 1818 | } else if (button == LEFT_BUTTON && is_clue(state, gx, gy)) { |
@@ -2540,7 +2535,8 @@ static void start_soak(game_params *p, random_state *rs) | |||
2540 | int main(int argc, const char *argv[]) | 2535 | int main(int argc, const char *argv[]) |
2541 | { | 2536 | { |
2542 | int print = 0, soak = 0, solved = 0, ret; | 2537 | int print = 0, soak = 0, solved = 0, ret; |
2543 | char *id = NULL, *desc, *desc_gen = NULL, *err, *aux = NULL; | 2538 | char *id = NULL, *desc, *desc_gen = NULL, *aux = NULL; |
2539 | const char *err; | ||
2544 | game_state *s = NULL; | 2540 | game_state *s = NULL; |
2545 | game_params *p = NULL; | 2541 | game_params *p = NULL; |
2546 | random_state *rs = NULL; | 2542 | random_state *rs = NULL; |
diff --git a/apps/plugins/puzzles/src/map.c b/apps/plugins/puzzles/src/map.c index 54073bad0d..cdcd5861a8 100644 --- a/apps/plugins/puzzles/src/map.c +++ b/apps/plugins/puzzles/src/map.c | |||
@@ -213,30 +213,25 @@ static config_item *game_configure(const game_params *params) | |||
213 | ret[0].name = "Width"; | 213 | ret[0].name = "Width"; |
214 | ret[0].type = C_STRING; | 214 | ret[0].type = C_STRING; |
215 | sprintf(buf, "%d", params->w); | 215 | sprintf(buf, "%d", params->w); |
216 | ret[0].sval = dupstr(buf); | 216 | ret[0].u.string.sval = dupstr(buf); |
217 | ret[0].ival = 0; | ||
218 | 217 | ||
219 | ret[1].name = "Height"; | 218 | ret[1].name = "Height"; |
220 | ret[1].type = C_STRING; | 219 | ret[1].type = C_STRING; |
221 | sprintf(buf, "%d", params->h); | 220 | sprintf(buf, "%d", params->h); |
222 | ret[1].sval = dupstr(buf); | 221 | ret[1].u.string.sval = dupstr(buf); |
223 | ret[1].ival = 0; | ||
224 | 222 | ||
225 | ret[2].name = "Regions"; | 223 | ret[2].name = "Regions"; |
226 | ret[2].type = C_STRING; | 224 | ret[2].type = C_STRING; |
227 | sprintf(buf, "%d", params->n); | 225 | sprintf(buf, "%d", params->n); |
228 | ret[2].sval = dupstr(buf); | 226 | ret[2].u.string.sval = dupstr(buf); |
229 | ret[2].ival = 0; | ||
230 | 227 | ||
231 | ret[3].name = "Difficulty"; | 228 | ret[3].name = "Difficulty"; |
232 | ret[3].type = C_CHOICES; | 229 | ret[3].type = C_CHOICES; |
233 | ret[3].sval = DIFFCONFIG; | 230 | ret[3].u.choices.choicenames = DIFFCONFIG; |
234 | ret[3].ival = params->diff; | 231 | ret[3].u.choices.selected = params->diff; |
235 | 232 | ||
236 | ret[4].name = NULL; | 233 | ret[4].name = NULL; |
237 | ret[4].type = C_END; | 234 | ret[4].type = C_END; |
238 | ret[4].sval = NULL; | ||
239 | ret[4].ival = 0; | ||
240 | 235 | ||
241 | return ret; | 236 | return ret; |
242 | } | 237 | } |
@@ -245,15 +240,15 @@ static game_params *custom_params(const config_item *cfg) | |||
245 | { | 240 | { |
246 | game_params *ret = snew(game_params); | 241 | game_params *ret = snew(game_params); |
247 | 242 | ||
248 | ret->w = atoi(cfg[0].sval); | 243 | ret->w = atoi(cfg[0].u.string.sval); |
249 | ret->h = atoi(cfg[1].sval); | 244 | ret->h = atoi(cfg[1].u.string.sval); |
250 | ret->n = atoi(cfg[2].sval); | 245 | ret->n = atoi(cfg[2].u.string.sval); |
251 | ret->diff = cfg[3].ival; | 246 | ret->diff = cfg[3].u.choices.selected; |
252 | 247 | ||
253 | return ret; | 248 | return ret; |
254 | } | 249 | } |
255 | 250 | ||
256 | static char *validate_params(const game_params *params, int full) | 251 | static const char *validate_params(const game_params *params, int full) |
257 | { | 252 | { |
258 | if (params->w < 2 || params->h < 2) | 253 | if (params->w < 2 || params->h < 2) |
259 | return "Width and height must be at least two"; | 254 | return "Width and height must be at least two"; |
@@ -878,7 +873,7 @@ static const char colnames[FOUR] = { 'R', 'Y', 'G', 'B' }; | |||
878 | static int place_colour(struct solver_scratch *sc, | 873 | static int place_colour(struct solver_scratch *sc, |
879 | int *colouring, int index, int colour | 874 | int *colouring, int index, int colour |
880 | #ifdef SOLVER_DIAGNOSTICS | 875 | #ifdef SOLVER_DIAGNOSTICS |
881 | , char *verb | 876 | , const char *verb |
882 | #endif | 877 | #endif |
883 | ) | 878 | ) |
884 | { | 879 | { |
@@ -925,7 +920,7 @@ static char *colourset(char *buf, int set) | |||
925 | { | 920 | { |
926 | int i; | 921 | int i; |
927 | char *p = buf; | 922 | char *p = buf; |
928 | char *sep = ""; | 923 | const char *sep = ""; |
929 | 924 | ||
930 | for (i = 0; i < FOUR; i++) | 925 | for (i = 0; i < FOUR; i++) |
931 | if (set & (1 << i)) { | 926 | if (set & (1 << i)) { |
@@ -1219,7 +1214,8 @@ static int map_solver(struct solver_scratch *sc, | |||
1219 | (sc->possible[k] & currc)) { | 1214 | (sc->possible[k] & currc)) { |
1220 | #ifdef SOLVER_DIAGNOSTICS | 1215 | #ifdef SOLVER_DIAGNOSTICS |
1221 | if (verbose) { | 1216 | if (verbose) { |
1222 | char buf[80], *sep = ""; | 1217 | char buf[80]; |
1218 | const char *sep = ""; | ||
1223 | int r; | 1219 | int r; |
1224 | 1220 | ||
1225 | printf("%*sforcing chain, colour %s, ", | 1221 | printf("%*sforcing chain, colour %s, ", |
@@ -1704,8 +1700,8 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1704 | return ret; | 1700 | return ret; |
1705 | } | 1701 | } |
1706 | 1702 | ||
1707 | static char *parse_edge_list(const game_params *params, const char **desc, | 1703 | static const char *parse_edge_list(const game_params *params, |
1708 | int *map) | 1704 | const char **desc, int *map) |
1709 | { | 1705 | { |
1710 | int w = params->w, h = params->h, wh = w*h, n = params->n; | 1706 | int w = params->w, h = params->h, wh = w*h, n = params->n; |
1711 | int i, k, pos, state; | 1707 | int i, k, pos, state; |
@@ -1781,12 +1777,12 @@ static char *parse_edge_list(const game_params *params, const char **desc, | |||
1781 | return NULL; | 1777 | return NULL; |
1782 | } | 1778 | } |
1783 | 1779 | ||
1784 | static char *validate_desc(const game_params *params, const char *desc) | 1780 | static const char *validate_desc(const game_params *params, const char *desc) |
1785 | { | 1781 | { |
1786 | int w = params->w, h = params->h, wh = w*h, n = params->n; | 1782 | int w = params->w, h = params->h, wh = w*h, n = params->n; |
1787 | int area; | 1783 | int area; |
1788 | int *map; | 1784 | int *map; |
1789 | char *ret; | 1785 | const char *ret; |
1790 | 1786 | ||
1791 | map = snewn(2*wh, int); | 1787 | map = snewn(2*wh, int); |
1792 | ret = parse_edge_list(params, &desc, map); | 1788 | ret = parse_edge_list(params, &desc, map); |
@@ -1846,7 +1842,7 @@ static game_state *new_game(midend *me, const game_params *params, | |||
1846 | p = desc; | 1842 | p = desc; |
1847 | 1843 | ||
1848 | { | 1844 | { |
1849 | char *ret; | 1845 | const char *ret; |
1850 | ret = parse_edge_list(params, &p, state->map->map); | 1846 | ret = parse_edge_list(params, &p, state->map->map); |
1851 | assert(!ret); | 1847 | assert(!ret); |
1852 | } | 1848 | } |
@@ -2191,7 +2187,7 @@ static void free_game(game_state *state) | |||
2191 | } | 2187 | } |
2192 | 2188 | ||
2193 | static char *solve_game(const game_state *state, const game_state *currstate, | 2189 | static char *solve_game(const game_state *state, const game_state *currstate, |
2194 | const char *aux, char **error) | 2190 | const char *aux, const char **error) |
2195 | { | 2191 | { |
2196 | if (!aux) { | 2192 | if (!aux) { |
2197 | /* | 2193 | /* |
@@ -2375,7 +2371,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2375 | */ | 2371 | */ |
2376 | if (button == 'l' || button == 'L') { | 2372 | if (button == 'l' || button == 'L') { |
2377 | ui->show_numbers = !ui->show_numbers; | 2373 | ui->show_numbers = !ui->show_numbers; |
2378 | return ""; | 2374 | return UI_UPDATE; |
2379 | } | 2375 | } |
2380 | 2376 | ||
2381 | if (IS_CURSOR_MOVE(button)) { | 2377 | if (IS_CURSOR_MOVE(button)) { |
@@ -2385,14 +2381,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2385 | ui->cur_lastmove = button; | 2381 | ui->cur_lastmove = button; |
2386 | ui->dragx = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(button); | 2382 | ui->dragx = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(button); |
2387 | ui->dragy = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(button); | 2383 | ui->dragy = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(button); |
2388 | return ""; | 2384 | return UI_UPDATE; |
2389 | } | 2385 | } |
2390 | if (IS_CURSOR_SELECT(button)) { | 2386 | if (IS_CURSOR_SELECT(button)) { |
2391 | if (!ui->cur_visible) { | 2387 | if (!ui->cur_visible) { |
2392 | ui->dragx = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(ui->cur_lastmove); | 2388 | ui->dragx = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(ui->cur_lastmove); |
2393 | ui->dragy = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(ui->cur_lastmove); | 2389 | ui->dragy = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(ui->cur_lastmove); |
2394 | ui->cur_visible = 1; | 2390 | ui->cur_visible = 1; |
2395 | return ""; | 2391 | return UI_UPDATE; |
2396 | } | 2392 | } |
2397 | if (ui->drag_colour == -2) { /* not currently cursor-dragging, start. */ | 2393 | if (ui->drag_colour == -2) { /* not currently cursor-dragging, start. */ |
2398 | int r = region_from_coords(state, ds, ui->dragx, ui->dragy); | 2394 | int r = region_from_coords(state, ds, ui->dragx, ui->dragy); |
@@ -2404,7 +2400,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2404 | ui->drag_pencil = 0; | 2400 | ui->drag_pencil = 0; |
2405 | } | 2401 | } |
2406 | ui->cur_moved = 0; | 2402 | ui->cur_moved = 0; |
2407 | return ""; | 2403 | return UI_UPDATE; |
2408 | } else { /* currently cursor-dragging; drop the colour in the new region. */ | 2404 | } else { /* currently cursor-dragging; drop the colour in the new region. */ |
2409 | x = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(ui->cur_lastmove); | 2405 | x = COORD(ui->cur_x) + TILESIZE/2 + EPSILON_X(ui->cur_lastmove); |
2410 | y = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(ui->cur_lastmove); | 2406 | y = COORD(ui->cur_y) + TILESIZE/2 + EPSILON_Y(ui->cur_lastmove); |
@@ -2430,14 +2426,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2430 | ui->dragx = x; | 2426 | ui->dragx = x; |
2431 | ui->dragy = y; | 2427 | ui->dragy = y; |
2432 | ui->cur_visible = 0; | 2428 | ui->cur_visible = 0; |
2433 | return ""; | 2429 | return UI_UPDATE; |
2434 | } | 2430 | } |
2435 | 2431 | ||
2436 | if ((button == LEFT_DRAG || button == RIGHT_DRAG) && | 2432 | if ((button == LEFT_DRAG || button == RIGHT_DRAG) && |
2437 | ui->drag_colour > -2) { | 2433 | ui->drag_colour > -2) { |
2438 | ui->dragx = x; | 2434 | ui->dragx = x; |
2439 | ui->dragy = y; | 2435 | ui->dragy = y; |
2440 | return ""; | 2436 | return UI_UPDATE; |
2441 | } | 2437 | } |
2442 | 2438 | ||
2443 | if ((button == LEFT_RELEASE || button == RIGHT_RELEASE) && | 2439 | if ((button == LEFT_RELEASE || button == RIGHT_RELEASE) && |
@@ -2461,18 +2457,18 @@ drag_dropped: | |||
2461 | ui->drag_colour = -2; | 2457 | ui->drag_colour = -2; |
2462 | 2458 | ||
2463 | if (r < 0) | 2459 | if (r < 0) |
2464 | return ""; /* drag into border; do nothing else */ | 2460 | return UI_UPDATE; /* drag into border; do nothing else */ |
2465 | 2461 | ||
2466 | if (state->map->immutable[r]) | 2462 | if (state->map->immutable[r]) |
2467 | return ""; /* can't change this region */ | 2463 | return UI_UPDATE; /* can't change this region */ |
2468 | 2464 | ||
2469 | if (state->colouring[r] == c && state->pencil[r] == p) | 2465 | if (state->colouring[r] == c && state->pencil[r] == p) |
2470 | return ""; /* don't _need_ to change this region */ | 2466 | return UI_UPDATE; /* don't _need_ to change this region */ |
2471 | 2467 | ||
2472 | if (alt_button) { | 2468 | if (alt_button) { |
2473 | if (state->colouring[r] >= 0) { | 2469 | if (state->colouring[r] >= 0) { |
2474 | /* Can't pencil on a coloured region */ | 2470 | /* Can't pencil on a coloured region */ |
2475 | return ""; | 2471 | return UI_UPDATE; |
2476 | } else if (c >= 0) { | 2472 | } else if (c >= 0) { |
2477 | /* Right-dragging from colour to blank toggles one pencil */ | 2473 | /* Right-dragging from colour to blank toggles one pencil */ |
2478 | p = state->pencil[r] ^ (1 << c); | 2474 | p = state->pencil[r] ^ (1 << c); |
@@ -3240,7 +3236,8 @@ int main(int argc, char **argv) | |||
3240 | { | 3236 | { |
3241 | game_params *p; | 3237 | game_params *p; |
3242 | game_state *s; | 3238 | game_state *s; |
3243 | char *id = NULL, *desc, *err; | 3239 | char *id = NULL, *desc; |
3240 | const char *err; | ||
3244 | int grade = FALSE; | 3241 | int grade = FALSE; |
3245 | int ret, diff, really_verbose = FALSE; | 3242 | int ret, diff, really_verbose = FALSE; |
3246 | struct solver_scratch *sc; | 3243 | struct solver_scratch *sc; |
diff --git a/apps/plugins/puzzles/src/maxflow.c b/apps/plugins/puzzles/src/maxflow.c index 028946b9bd..97ae8c487d 100644 --- a/apps/plugins/puzzles/src/maxflow.c +++ b/apps/plugins/puzzles/src/maxflow.c | |||
@@ -80,7 +80,7 @@ int maxflow_with_scratch(void *scratch, int nv, int source, int sink, | |||
80 | /* | 80 | /* |
81 | * Now do the BFS loop. | 81 | * Now do the BFS loop. |
82 | */ | 82 | */ |
83 | while (head < tail && prev[sink] <= 0) { | 83 | while (head < tail && prev[sink] < 0) { |
84 | from = todo[head++]; | 84 | from = todo[head++]; |
85 | 85 | ||
86 | /* | 86 | /* |
diff --git a/apps/plugins/puzzles/src/midend.c b/apps/plugins/puzzles/src/midend.c index 09b59b25e2..4ccb1f94a0 100644 --- a/apps/plugins/puzzles/src/midend.c +++ b/apps/plugins/puzzles/src/midend.c | |||
@@ -63,6 +63,9 @@ struct midend { | |||
63 | int nstates, statesize, statepos; | 63 | int nstates, statesize, statepos; |
64 | struct midend_state_entry *states; | 64 | struct midend_state_entry *states; |
65 | 65 | ||
66 | char *newgame_undo_buf; | ||
67 | int newgame_undo_len, newgame_undo_size; | ||
68 | |||
66 | game_params *params, *curparams; | 69 | game_params *params, *curparams; |
67 | game_drawstate *drawstate; | 70 | game_drawstate *drawstate; |
68 | game_ui *ui; | 71 | game_ui *ui; |
@@ -94,6 +97,30 @@ struct midend { | |||
94 | } \ | 97 | } \ |
95 | } while (0) | 98 | } while (0) |
96 | 99 | ||
100 | /* | ||
101 | * Structure storing all the decoded data from reading a serialised | ||
102 | * game. We keep it in one of these while we check its sanity, and | ||
103 | * only once we're completely satisfied do we install it all in the | ||
104 | * midend structure proper. | ||
105 | */ | ||
106 | struct deserialise_data { | ||
107 | char *seed, *parstr, *desc, *privdesc; | ||
108 | char *auxinfo, *uistr, *cparstr; | ||
109 | float elapsed; | ||
110 | game_params *params, *cparams; | ||
111 | game_ui *ui; | ||
112 | struct midend_state_entry *states; | ||
113 | int nstates, statepos; | ||
114 | }; | ||
115 | |||
116 | /* | ||
117 | * Forward reference. | ||
118 | */ | ||
119 | static const char *midend_deserialise_internal( | ||
120 | midend *me, int (*read)(void *ctx, void *buf, int len), void *rctx, | ||
121 | const char *(*check)(void *ctx, midend *, const struct deserialise_data *), | ||
122 | void *cctx); | ||
123 | |||
97 | void midend_reset_tilesize(midend *me) | 124 | void midend_reset_tilesize(midend *me) |
98 | { | 125 | { |
99 | me->preferred_tilesize = me->ourgame->preferred_tilesize; | 126 | me->preferred_tilesize = me->ourgame->preferred_tilesize; |
@@ -131,6 +158,8 @@ midend *midend_new(frontend *fe, const game *ourgame, | |||
131 | me->random = random_new(randseed, randseedsize); | 158 | me->random = random_new(randseed, randseedsize); |
132 | me->nstates = me->statesize = me->statepos = 0; | 159 | me->nstates = me->statesize = me->statepos = 0; |
133 | me->states = NULL; | 160 | me->states = NULL; |
161 | me->newgame_undo_buf = NULL; | ||
162 | me->newgame_undo_size = me->newgame_undo_len = 0; | ||
134 | me->params = ourgame->default_params(); | 163 | me->params = ourgame->default_params(); |
135 | me->game_id_change_notify_function = NULL; | 164 | me->game_id_change_notify_function = NULL; |
136 | me->game_id_change_notify_ctx = NULL; | 165 | me->game_id_change_notify_ctx = NULL; |
@@ -228,6 +257,7 @@ void midend_free(midend *me) | |||
228 | if (me->drawing) | 257 | if (me->drawing) |
229 | drawing_free(me->drawing); | 258 | drawing_free(me->drawing); |
230 | random_free(me->random); | 259 | random_free(me->random); |
260 | sfree(me->newgame_undo_buf); | ||
231 | sfree(me->states); | 261 | sfree(me->states); |
232 | sfree(me->desc); | 262 | sfree(me->desc); |
233 | sfree(me->privdesc); | 263 | sfree(me->privdesc); |
@@ -354,8 +384,40 @@ void midend_force_redraw(midend *me) | |||
354 | midend_redraw(me); | 384 | midend_redraw(me); |
355 | } | 385 | } |
356 | 386 | ||
387 | static void newgame_serialise_write(void *ctx, const void *buf, int len) | ||
388 | { | ||
389 | midend *const me = ctx; | ||
390 | int new_len; | ||
391 | |||
392 | assert(len < INT_MAX - me->newgame_undo_len); | ||
393 | new_len = me->newgame_undo_len + len; | ||
394 | if (new_len > me->newgame_undo_size) { | ||
395 | me->newgame_undo_size = new_len + new_len / 4 + 1024; | ||
396 | me->newgame_undo_buf = sresize(me->newgame_undo_buf, | ||
397 | me->newgame_undo_size, char); | ||
398 | } | ||
399 | memcpy(me->newgame_undo_buf + me->newgame_undo_len, buf, len); | ||
400 | me->newgame_undo_len = new_len; | ||
401 | } | ||
402 | |||
357 | void midend_new_game(midend *me) | 403 | void midend_new_game(midend *me) |
358 | { | 404 | { |
405 | me->newgame_undo_len = 0; | ||
406 | if (me->nstates != 0) { | ||
407 | /* | ||
408 | * Serialise the whole of the game that we're about to | ||
409 | * supersede, so that the 'New Game' action can be undone | ||
410 | * later. But if nstates == 0, that means there _isn't_ a | ||
411 | * current game (not even a starting position), because this | ||
412 | * is the initial call to midend_new_game when the midend is | ||
413 | * first set up; in that situation, we want to avoid writing | ||
414 | * out any serialisation, because it would be useless anyway | ||
415 | * and just confuse us into thinking we had something to undo | ||
416 | * to. | ||
417 | */ | ||
418 | midend_serialise(me, newgame_serialise_write, me); | ||
419 | } | ||
420 | |||
359 | midend_stop_anim(me); | 421 | midend_stop_anim(me); |
360 | midend_free_game(me); | 422 | midend_free_game(me); |
361 | 423 | ||
@@ -434,7 +496,8 @@ void midend_new_game(midend *me) | |||
434 | */ | 496 | */ |
435 | if (me->ourgame->can_solve && me->aux_info) { | 497 | if (me->ourgame->can_solve && me->aux_info) { |
436 | game_state *s; | 498 | game_state *s; |
437 | char *msg, *movestr; | 499 | const char *msg; |
500 | char *movestr; | ||
438 | 501 | ||
439 | msg = NULL; | 502 | msg = NULL; |
440 | movestr = me->ourgame->solve(me->states[0].state, | 503 | movestr = me->ourgame->solve(me->states[0].state, |
@@ -469,7 +532,7 @@ void midend_new_game(midend *me) | |||
469 | 532 | ||
470 | int midend_can_undo(midend *me) | 533 | int midend_can_undo(midend *me) |
471 | { | 534 | { |
472 | return (me->statepos > 1); | 535 | return (me->statepos > 1 || me->newgame_undo_len); |
473 | } | 536 | } |
474 | 537 | ||
475 | int midend_can_redo(midend *me) | 538 | int midend_can_redo(midend *me) |
@@ -477,8 +540,82 @@ int midend_can_redo(midend *me) | |||
477 | return (me->statepos < me->nstates); | 540 | return (me->statepos < me->nstates); |
478 | } | 541 | } |
479 | 542 | ||
543 | struct newgame_undo_deserialise_read_ctx { | ||
544 | midend *me; | ||
545 | int len, pos; | ||
546 | }; | ||
547 | |||
548 | static int newgame_undo_deserialise_read(void *ctx, void *buf, int len) | ||
549 | { | ||
550 | struct newgame_undo_deserialise_read_ctx *const rctx = ctx; | ||
551 | midend *const me = rctx->me; | ||
552 | |||
553 | int use = min(len, rctx->len - rctx->pos); | ||
554 | memcpy(buf, me->newgame_undo_buf + rctx->pos, use); | ||
555 | rctx->pos += use; | ||
556 | return use; | ||
557 | } | ||
558 | |||
559 | struct newgame_undo_deserialise_check_ctx { | ||
560 | int refused; | ||
561 | }; | ||
562 | |||
563 | static const char *newgame_undo_deserialise_check( | ||
564 | void *vctx, midend *me, const struct deserialise_data *data) | ||
565 | { | ||
566 | struct newgame_undo_deserialise_check_ctx *ctx = | ||
567 | (struct newgame_undo_deserialise_check_ctx *)vctx; | ||
568 | char *old, *new; | ||
569 | |||
570 | /* | ||
571 | * Undoing a New Game operation is only permitted if it doesn't | ||
572 | * change the game parameters. The point of having the ability at | ||
573 | * all is to recover from the momentary finger error of having hit | ||
574 | * the 'n' key (perhaps in place of some other nearby key), or hit | ||
575 | * the New Game menu item by mistake when aiming for the adjacent | ||
576 | * Restart; in both those situations, the game params are the same | ||
577 | * before and after the new-game operation. | ||
578 | * | ||
579 | * In principle, we could generalise this so that _any_ call to | ||
580 | * midend_new_game could be undone, but that would need all front | ||
581 | * ends to be alert to the possibility that any keystroke passed | ||
582 | * to midend_process_key might (if it turns out to have been one | ||
583 | * of the synonyms for undo, which the frontend doesn't | ||
584 | * necessarily check for) have various knock-on effects like | ||
585 | * needing to select a different preset in the game type menu, or | ||
586 | * even resizing the window. At least for the moment, it's easier | ||
587 | * not to do that, and to simply disallow any newgame-undo that is | ||
588 | * disruptive in either of those ways. | ||
589 | * | ||
590 | * We check both params and cparams, to be as safe as possible. | ||
591 | */ | ||
592 | |||
593 | old = me->ourgame->encode_params(me->params, TRUE); | ||
594 | new = me->ourgame->encode_params(data->params, TRUE); | ||
595 | if (strcmp(old, new)) { | ||
596 | /* Set a flag to distinguish this deserialise failure | ||
597 | * from one due to faulty decoding */ | ||
598 | ctx->refused = TRUE; | ||
599 | return "Undoing this new-game operation would change params"; | ||
600 | } | ||
601 | |||
602 | old = me->ourgame->encode_params(me->curparams, TRUE); | ||
603 | new = me->ourgame->encode_params(data->cparams, TRUE); | ||
604 | if (strcmp(old, new)) { | ||
605 | ctx->refused = TRUE; | ||
606 | return "Undoing this new-game operation would change params"; | ||
607 | } | ||
608 | |||
609 | /* | ||
610 | * Otherwise, fine, go ahead. | ||
611 | */ | ||
612 | return NULL; | ||
613 | } | ||
614 | |||
480 | static int midend_undo(midend *me) | 615 | static int midend_undo(midend *me) |
481 | { | 616 | { |
617 | const char *deserialise_error; | ||
618 | |||
482 | if (me->statepos > 1) { | 619 | if (me->statepos > 1) { |
483 | if (me->ui) | 620 | if (me->ui) |
484 | me->ourgame->changed_state(me->ui, | 621 | me->ourgame->changed_state(me->ui, |
@@ -487,6 +624,36 @@ static int midend_undo(midend *me) | |||
487 | me->statepos--; | 624 | me->statepos--; |
488 | me->dir = -1; | 625 | me->dir = -1; |
489 | return 1; | 626 | return 1; |
627 | } else if (me->newgame_undo_len) { | ||
628 | /* This undo cannot be undone with redo */ | ||
629 | struct newgame_undo_deserialise_read_ctx rctx; | ||
630 | struct newgame_undo_deserialise_check_ctx cctx; | ||
631 | rctx.me = me; | ||
632 | rctx.len = me->newgame_undo_len; /* copy for reentrancy safety */ | ||
633 | rctx.pos = 0; | ||
634 | cctx.refused = FALSE; | ||
635 | deserialise_error = midend_deserialise_internal( | ||
636 | me, newgame_undo_deserialise_read, &rctx, | ||
637 | newgame_undo_deserialise_check, &cctx); | ||
638 | if (cctx.refused) { | ||
639 | /* | ||
640 | * Our post-deserialisation check shows that we can't use | ||
641 | * this saved game after all. (deserialise_error will | ||
642 | * contain the dummy error message generated by our check | ||
643 | * function, which we ignore.) | ||
644 | */ | ||
645 | return 0; | ||
646 | } else { | ||
647 | /* | ||
648 | * There should never be any _other_ deserialisation | ||
649 | * error, because this serialised data has been held in | ||
650 | * our memory since it was created, and hasn't had any | ||
651 | * opportunity to be corrupted on disk, accidentally | ||
652 | * replaced by the wrong file, etc., by user error. | ||
653 | */ | ||
654 | assert(!deserialise_error); | ||
655 | return 1; | ||
656 | } | ||
490 | } else | 657 | } else |
491 | return 0; | 658 | return 0; |
492 | } | 659 | } |
@@ -629,7 +796,7 @@ static int midend_really_process_key(midend *me, int x, int y, int button) | |||
629 | } else | 796 | } else |
630 | goto done; | 797 | goto done; |
631 | } else { | 798 | } else { |
632 | if (!*movestr) | 799 | if (movestr == UI_UPDATE) |
633 | s = me->states[me->statepos-1].state; | 800 | s = me->states[me->statepos-1].state; |
634 | else { | 801 | else { |
635 | s = me->ourgame->execute_move(me->states[me->statepos-1].state, | 802 | s = me->ourgame->execute_move(me->states[me->statepos-1].state, |
@@ -1166,7 +1333,8 @@ void midend_request_id_changes(midend *me, void (*notify)(void *), void *ctx) | |||
1166 | me->game_id_change_notify_ctx = ctx; | 1333 | me->game_id_change_notify_ctx = ctx; |
1167 | } | 1334 | } |
1168 | 1335 | ||
1169 | void midend_supersede_game_desc(midend *me, char *desc, char *privdesc) | 1336 | void midend_supersede_game_desc(midend *me, const char *desc, |
1337 | const char *privdesc) | ||
1170 | { | 1338 | { |
1171 | sfree(me->desc); | 1339 | sfree(me->desc); |
1172 | sfree(me->privdesc); | 1340 | sfree(me->privdesc); |
@@ -1178,7 +1346,8 @@ void midend_supersede_game_desc(midend *me, char *desc, char *privdesc) | |||
1178 | 1346 | ||
1179 | config_item *midend_get_config(midend *me, int which, char **wintitle) | 1347 | config_item *midend_get_config(midend *me, int which, char **wintitle) |
1180 | { | 1348 | { |
1181 | char *titlebuf, *parstr, *rest; | 1349 | char *titlebuf, *parstr; |
1350 | const char *rest; | ||
1182 | config_item *ret; | 1351 | config_item *ret; |
1183 | char sep; | 1352 | char sep; |
1184 | 1353 | ||
@@ -1207,7 +1376,6 @@ config_item *midend_get_config(midend *me, int which, char **wintitle) | |||
1207 | ret[0].name = "Game random seed"; | 1376 | ret[0].name = "Game random seed"; |
1208 | else | 1377 | else |
1209 | ret[0].name = "Game ID"; | 1378 | ret[0].name = "Game ID"; |
1210 | ret[0].ival = 0; | ||
1211 | /* | 1379 | /* |
1212 | * For CFG_DESC the text going in here will be a string | 1380 | * For CFG_DESC the text going in here will be a string |
1213 | * encoding of the restricted parameters, plus a colon, | 1381 | * encoding of the restricted parameters, plus a colon, |
@@ -1226,13 +1394,12 @@ config_item *midend_get_config(midend *me, int which, char **wintitle) | |||
1226 | rest = me->seedstr ? me->seedstr : ""; | 1394 | rest = me->seedstr ? me->seedstr : ""; |
1227 | sep = '#'; | 1395 | sep = '#'; |
1228 | } | 1396 | } |
1229 | ret[0].sval = snewn(strlen(parstr) + strlen(rest) + 2, char); | 1397 | ret[0].u.string.sval = snewn(strlen(parstr) + strlen(rest) + 2, char); |
1230 | sprintf(ret[0].sval, "%s%c%s", parstr, sep, rest); | 1398 | sprintf(ret[0].u.string.sval, "%s%c%s", parstr, sep, rest); |
1231 | sfree(parstr); | 1399 | sfree(parstr); |
1232 | 1400 | ||
1233 | ret[1].type = C_END; | 1401 | ret[1].type = C_END; |
1234 | ret[1].name = ret[1].sval = NULL; | 1402 | ret[1].name = NULL; |
1235 | ret[1].ival = 0; | ||
1236 | 1403 | ||
1237 | return ret; | 1404 | return ret; |
1238 | } | 1405 | } |
@@ -1241,9 +1408,11 @@ config_item *midend_get_config(midend *me, int which, char **wintitle) | |||
1241 | return NULL; | 1408 | return NULL; |
1242 | } | 1409 | } |
1243 | 1410 | ||
1244 | static char *midend_game_id_int(midend *me, char *id, int defmode) | 1411 | static const char *midend_game_id_int(midend *me, const char *id, int defmode) |
1245 | { | 1412 | { |
1246 | char *error, *par, *desc, *seed; | 1413 | const char *error; |
1414 | char *par = NULL; | ||
1415 | const char *desc, *seed; | ||
1247 | game_params *newcurparams, *newparams, *oldparams1, *oldparams2; | 1416 | game_params *newcurparams, *newparams, *oldparams1, *oldparams2; |
1248 | int free_params; | 1417 | int free_params; |
1249 | 1418 | ||
@@ -1256,8 +1425,10 @@ static char *midend_game_id_int(midend *me, char *id, int defmode) | |||
1256 | * description. So `par' now points to the parameters | 1425 | * description. So `par' now points to the parameters |
1257 | * string, and `desc' to the description string. | 1426 | * string, and `desc' to the description string. |
1258 | */ | 1427 | */ |
1259 | *desc++ = '\0'; | 1428 | par = snewn(desc-id + 1, char); |
1260 | par = id; | 1429 | strncpy(par, id, desc-id); |
1430 | par[desc-id] = '\0'; | ||
1431 | desc++; | ||
1261 | seed = NULL; | 1432 | seed = NULL; |
1262 | } else if (seed && (!desc || seed < desc)) { | 1433 | } else if (seed && (!desc || seed < desc)) { |
1263 | /* | 1434 | /* |
@@ -1265,8 +1436,10 @@ static char *midend_game_id_int(midend *me, char *id, int defmode) | |||
1265 | * So `par' now points to the parameters string, and `seed' | 1436 | * So `par' now points to the parameters string, and `seed' |
1266 | * to the seed string. | 1437 | * to the seed string. |
1267 | */ | 1438 | */ |
1268 | *seed++ = '\0'; | 1439 | par = snewn(seed-id + 1, char); |
1269 | par = id; | 1440 | strncpy(par, id, seed-id); |
1441 | par[seed-id] = '\0'; | ||
1442 | seed++; | ||
1270 | desc = NULL; | 1443 | desc = NULL; |
1271 | } else { | 1444 | } else { |
1272 | /* | 1445 | /* |
@@ -1275,12 +1448,14 @@ static char *midend_game_id_int(midend *me, char *id, int defmode) | |||
1275 | */ | 1448 | */ |
1276 | if (defmode == DEF_SEED) { | 1449 | if (defmode == DEF_SEED) { |
1277 | seed = id; | 1450 | seed = id; |
1278 | par = desc = NULL; | 1451 | par = NULL; |
1452 | desc = NULL; | ||
1279 | } else if (defmode == DEF_DESC) { | 1453 | } else if (defmode == DEF_DESC) { |
1280 | desc = id; | 1454 | desc = id; |
1281 | par = seed = NULL; | 1455 | par = NULL; |
1456 | seed = NULL; | ||
1282 | } else { | 1457 | } else { |
1283 | par = id; | 1458 | par = dupstr(id); |
1284 | seed = desc = NULL; | 1459 | seed = desc = NULL; |
1285 | } | 1460 | } |
1286 | } | 1461 | } |
@@ -1410,10 +1585,12 @@ static char *midend_game_id_int(midend *me, char *id, int defmode) | |||
1410 | me->genmode = GOT_SEED; | 1585 | me->genmode = GOT_SEED; |
1411 | } | 1586 | } |
1412 | 1587 | ||
1588 | sfree(par); | ||
1589 | |||
1413 | return NULL; | 1590 | return NULL; |
1414 | } | 1591 | } |
1415 | 1592 | ||
1416 | char *midend_game_id(midend *me, char *id) | 1593 | const char *midend_game_id(midend *me, const char *id) |
1417 | { | 1594 | { |
1418 | return midend_game_id_int(me, id, DEF_PARAMS); | 1595 | return midend_game_id_int(me, id, DEF_PARAMS); |
1419 | } | 1596 | } |
@@ -1446,9 +1623,9 @@ char *midend_get_random_seed(midend *me) | |||
1446 | return ret; | 1623 | return ret; |
1447 | } | 1624 | } |
1448 | 1625 | ||
1449 | char *midend_set_config(midend *me, int which, config_item *cfg) | 1626 | const char *midend_set_config(midend *me, int which, config_item *cfg) |
1450 | { | 1627 | { |
1451 | char *error; | 1628 | const char *error; |
1452 | game_params *params; | 1629 | game_params *params; |
1453 | 1630 | ||
1454 | switch (which) { | 1631 | switch (which) { |
@@ -1467,7 +1644,7 @@ char *midend_set_config(midend *me, int which, config_item *cfg) | |||
1467 | 1644 | ||
1468 | case CFG_SEED: | 1645 | case CFG_SEED: |
1469 | case CFG_DESC: | 1646 | case CFG_DESC: |
1470 | error = midend_game_id_int(me, cfg[0].sval, | 1647 | error = midend_game_id_int(me, cfg[0].u.string.sval, |
1471 | (which == CFG_SEED ? DEF_SEED : DEF_DESC)); | 1648 | (which == CFG_SEED ? DEF_SEED : DEF_DESC)); |
1472 | if (error) | 1649 | if (error) |
1473 | return error; | 1650 | return error; |
@@ -1494,10 +1671,11 @@ char *midend_text_format(midend *me) | |||
1494 | return NULL; | 1671 | return NULL; |
1495 | } | 1672 | } |
1496 | 1673 | ||
1497 | char *midend_solve(midend *me) | 1674 | const char *midend_solve(midend *me) |
1498 | { | 1675 | { |
1499 | game_state *s; | 1676 | game_state *s; |
1500 | char *msg, *movestr; | 1677 | const char *msg; |
1678 | char *movestr; | ||
1501 | 1679 | ||
1502 | if (!me->ourgame->can_solve) | 1680 | if (!me->ourgame->can_solve) |
1503 | return "This game does not support the Solve operation"; | 1681 | return "This game does not support the Solve operation"; |
@@ -1509,6 +1687,7 @@ char *midend_solve(midend *me) | |||
1509 | movestr = me->ourgame->solve(me->states[0].state, | 1687 | movestr = me->ourgame->solve(me->states[0].state, |
1510 | me->states[me->statepos-1].state, | 1688 | me->states[me->statepos-1].state, |
1511 | me->aux_info, &msg); | 1689 | me->aux_info, &msg); |
1690 | assert(movestr != UI_UPDATE); | ||
1512 | if (!movestr) { | 1691 | if (!movestr) { |
1513 | if (!msg) | 1692 | if (!msg) |
1514 | msg = "Solve operation failed"; /* _shouldn't_ happen, but can */ | 1693 | msg = "Solve operation failed"; /* _shouldn't_ happen, but can */ |
@@ -1566,7 +1745,7 @@ int midend_status(midend *me) | |||
1566 | return me->ourgame->status(me->states[me->statepos-1].state); | 1745 | return me->ourgame->status(me->states[me->statepos-1].state); |
1567 | } | 1746 | } |
1568 | 1747 | ||
1569 | char *midend_rewrite_statusbar(midend *me, char *text) | 1748 | char *midend_rewrite_statusbar(midend *me, const char *text) |
1570 | { | 1749 | { |
1571 | /* | 1750 | /* |
1572 | * An important special case is that we are occasionally called | 1751 | * An important special case is that we are occasionally called |
@@ -1600,7 +1779,7 @@ char *midend_rewrite_statusbar(midend *me, char *text) | |||
1600 | #define SERIALISE_VERSION "1" | 1779 | #define SERIALISE_VERSION "1" |
1601 | 1780 | ||
1602 | void midend_serialise(midend *me, | 1781 | void midend_serialise(midend *me, |
1603 | void (*write)(void *ctx, void *buf, int len), | 1782 | void (*write)(void *ctx, const void *buf, int len), |
1604 | void *wctx) | 1783 | void *wctx) |
1605 | { | 1784 | { |
1606 | int i; | 1785 | int i; |
@@ -1616,7 +1795,7 @@ void midend_serialise(midend *me, | |||
1616 | */ | 1795 | */ |
1617 | #define wr(h,s) do { \ | 1796 | #define wr(h,s) do { \ |
1618 | char hbuf[80]; \ | 1797 | char hbuf[80]; \ |
1619 | char *str = (s); \ | 1798 | const char *str = (s); \ |
1620 | char lbuf[9]; \ | 1799 | char lbuf[9]; \ |
1621 | copy_left_justified(lbuf, sizeof(lbuf), h); \ | 1800 | copy_left_justified(lbuf, sizeof(lbuf), h); \ |
1622 | sprintf(hbuf, "%s:%d:", lbuf, (int)strlen(str)); \ | 1801 | sprintf(hbuf, "%s:%d:", lbuf, (int)strlen(str)); \ |
@@ -1748,39 +1927,43 @@ void midend_serialise(midend *me, | |||
1748 | } | 1927 | } |
1749 | 1928 | ||
1750 | /* | 1929 | /* |
1751 | * This function returns NULL on success, or an error message. | 1930 | * Internal version of midend_deserialise, taking an extra check |
1931 | * function to be called just before beginning to install things in | ||
1932 | * the midend. | ||
1933 | * | ||
1934 | * Like midend_deserialise proper, this function returns NULL on | ||
1935 | * success, or an error message. | ||
1752 | */ | 1936 | */ |
1753 | char *midend_deserialise(midend *me, | 1937 | static const char *midend_deserialise_internal( |
1754 | int (*read)(void *ctx, void *buf, int len), | 1938 | midend *me, int (*read)(void *ctx, void *buf, int len), void *rctx, |
1755 | void *rctx) | 1939 | const char *(*check)(void *ctx, midend *, const struct deserialise_data *), |
1940 | void *cctx) | ||
1756 | { | 1941 | { |
1757 | int nstates = 0, statepos = -1, gotstates = 0; | 1942 | struct deserialise_data data; |
1943 | int gotstates = 0; | ||
1758 | int started = FALSE; | 1944 | int started = FALSE; |
1759 | int i; | 1945 | int i; |
1760 | 1946 | ||
1761 | char *val = NULL; | 1947 | char *val = NULL; |
1762 | /* Initially all errors give the same report */ | 1948 | /* Initially all errors give the same report */ |
1763 | char *ret = "Data does not appear to be a saved game file"; | 1949 | const char *ret = "Data does not appear to be a saved game file"; |
1764 | 1950 | ||
1765 | /* | 1951 | data.seed = data.parstr = data.desc = data.privdesc = NULL; |
1766 | * We construct all the new state in local variables while we | 1952 | data.auxinfo = data.uistr = data.cparstr = NULL; |
1767 | * check its sanity. Only once we have finished reading the | 1953 | data.elapsed = 0.0F; |
1768 | * serialised data and detected no errors at all do we start | 1954 | data.params = data.cparams = NULL; |
1769 | * modifying stuff in the midend passed in. | 1955 | data.ui = NULL; |
1770 | */ | 1956 | data.states = NULL; |
1771 | char *seed = NULL, *parstr = NULL, *desc = NULL, *privdesc = NULL; | 1957 | data.nstates = 0; |
1772 | char *auxinfo = NULL, *uistr = NULL, *cparstr = NULL; | 1958 | data.statepos = -1; |
1773 | float elapsed = 0.0F; | ||
1774 | game_params *params = NULL, *cparams = NULL; | ||
1775 | game_ui *ui = NULL; | ||
1776 | struct midend_state_entry *states = NULL; | ||
1777 | 1959 | ||
1778 | /* | 1960 | /* |
1779 | * Loop round and round reading one key/value pair at a time | 1961 | * Loop round and round reading one key/value pair at a time |
1780 | * from the serialised stream, until we have enough game states | 1962 | * from the serialised stream, until we have enough game states |
1781 | * to finish. | 1963 | * to finish. |
1782 | */ | 1964 | */ |
1783 | while (nstates <= 0 || statepos < 0 || gotstates < nstates-1) { | 1965 | while (data.nstates <= 0 || data.statepos < 0 || |
1966 | gotstates < data.nstates-1) { | ||
1784 | char key[9], c; | 1967 | char key[9], c; |
1785 | int len; | 1968 | int len; |
1786 | 1969 | ||
@@ -1852,24 +2035,24 @@ char *midend_deserialise(midend *me, | |||
1852 | goto cleanup; | 2035 | goto cleanup; |
1853 | } | 2036 | } |
1854 | } else if (!strcmp(key, "PARAMS")) { | 2037 | } else if (!strcmp(key, "PARAMS")) { |
1855 | sfree(parstr); | 2038 | sfree(data.parstr); |
1856 | parstr = val; | 2039 | data.parstr = val; |
1857 | val = NULL; | 2040 | val = NULL; |
1858 | } else if (!strcmp(key, "CPARAMS")) { | 2041 | } else if (!strcmp(key, "CPARAMS")) { |
1859 | sfree(cparstr); | 2042 | sfree(data.cparstr); |
1860 | cparstr = val; | 2043 | data.cparstr = val; |
1861 | val = NULL; | 2044 | val = NULL; |
1862 | } else if (!strcmp(key, "SEED")) { | 2045 | } else if (!strcmp(key, "SEED")) { |
1863 | sfree(seed); | 2046 | sfree(data.seed); |
1864 | seed = val; | 2047 | data.seed = val; |
1865 | val = NULL; | 2048 | val = NULL; |
1866 | } else if (!strcmp(key, "DESC")) { | 2049 | } else if (!strcmp(key, "DESC")) { |
1867 | sfree(desc); | 2050 | sfree(data.desc); |
1868 | desc = val; | 2051 | data.desc = val; |
1869 | val = NULL; | 2052 | val = NULL; |
1870 | } else if (!strcmp(key, "PRIVDESC")) { | 2053 | } else if (!strcmp(key, "PRIVDESC")) { |
1871 | sfree(privdesc); | 2054 | sfree(data.privdesc); |
1872 | privdesc = val; | 2055 | data.privdesc = val; |
1873 | val = NULL; | 2056 | val = NULL; |
1874 | } else if (!strcmp(key, "AUXINFO")) { | 2057 | } else if (!strcmp(key, "AUXINFO")) { |
1875 | unsigned char *tmp; | 2058 | unsigned char *tmp; |
@@ -1877,49 +2060,49 @@ char *midend_deserialise(midend *me, | |||
1877 | tmp = hex2bin(val, len); | 2060 | tmp = hex2bin(val, len); |
1878 | obfuscate_bitmap(tmp, len*8, TRUE); | 2061 | obfuscate_bitmap(tmp, len*8, TRUE); |
1879 | 2062 | ||
1880 | sfree(auxinfo); | 2063 | sfree(data.auxinfo); |
1881 | auxinfo = snewn(len + 1, char); | 2064 | data.auxinfo = snewn(len + 1, char); |
1882 | memcpy(auxinfo, tmp, len); | 2065 | memcpy(data.auxinfo, tmp, len); |
1883 | auxinfo[len] = '\0'; | 2066 | data.auxinfo[len] = '\0'; |
1884 | sfree(tmp); | 2067 | sfree(tmp); |
1885 | } else if (!strcmp(key, "UI")) { | 2068 | } else if (!strcmp(key, "UI")) { |
1886 | sfree(uistr); | 2069 | sfree(data.uistr); |
1887 | uistr = val; | 2070 | data.uistr = val; |
1888 | val = NULL; | 2071 | val = NULL; |
1889 | } else if (!strcmp(key, "TIME")) { | 2072 | } else if (!strcmp(key, "TIME")) { |
1890 | elapsed = (float)atof(val); | 2073 | data.elapsed = (float)atof(val); |
1891 | } else if (!strcmp(key, "NSTATES")) { | 2074 | } else if (!strcmp(key, "NSTATES")) { |
1892 | nstates = atoi(val); | 2075 | data.nstates = atoi(val); |
1893 | if (nstates <= 0) { | 2076 | if (data.nstates <= 0) { |
1894 | ret = "Number of states in save file was negative"; | 2077 | ret = "Number of states in save file was negative"; |
1895 | goto cleanup; | 2078 | goto cleanup; |
1896 | } | 2079 | } |
1897 | if (states) { | 2080 | if (data.states) { |
1898 | ret = "Two state counts provided in save file"; | 2081 | ret = "Two state counts provided in save file"; |
1899 | goto cleanup; | 2082 | goto cleanup; |
1900 | } | 2083 | } |
1901 | states = snewn(nstates, struct midend_state_entry); | 2084 | data.states = snewn(data.nstates, struct midend_state_entry); |
1902 | for (i = 0; i < nstates; i++) { | 2085 | for (i = 0; i < data.nstates; i++) { |
1903 | states[i].state = NULL; | 2086 | data.states[i].state = NULL; |
1904 | states[i].movestr = NULL; | 2087 | data.states[i].movestr = NULL; |
1905 | states[i].movetype = NEWGAME; | 2088 | data.states[i].movetype = NEWGAME; |
1906 | } | 2089 | } |
1907 | } else if (!strcmp(key, "STATEPOS")) { | 2090 | } else if (!strcmp(key, "STATEPOS")) { |
1908 | statepos = atoi(val); | 2091 | data.statepos = atoi(val); |
1909 | } else if (!strcmp(key, "MOVE")) { | 2092 | } else if (!strcmp(key, "MOVE")) { |
1910 | gotstates++; | 2093 | gotstates++; |
1911 | states[gotstates].movetype = MOVE; | 2094 | data.states[gotstates].movetype = MOVE; |
1912 | states[gotstates].movestr = val; | 2095 | data.states[gotstates].movestr = val; |
1913 | val = NULL; | 2096 | val = NULL; |
1914 | } else if (!strcmp(key, "SOLVE")) { | 2097 | } else if (!strcmp(key, "SOLVE")) { |
1915 | gotstates++; | 2098 | gotstates++; |
1916 | states[gotstates].movetype = SOLVE; | 2099 | data.states[gotstates].movetype = SOLVE; |
1917 | states[gotstates].movestr = val; | 2100 | data.states[gotstates].movestr = val; |
1918 | val = NULL; | 2101 | val = NULL; |
1919 | } else if (!strcmp(key, "RESTART")) { | 2102 | } else if (!strcmp(key, "RESTART")) { |
1920 | gotstates++; | 2103 | gotstates++; |
1921 | states[gotstates].movetype = RESTART; | 2104 | data.states[gotstates].movetype = RESTART; |
1922 | states[gotstates].movestr = val; | 2105 | data.states[gotstates].movestr = val; |
1923 | val = NULL; | 2106 | val = NULL; |
1924 | } | 2107 | } |
1925 | } | 2108 | } |
@@ -1928,68 +2111,77 @@ char *midend_deserialise(midend *me, | |||
1928 | val = NULL; | 2111 | val = NULL; |
1929 | } | 2112 | } |
1930 | 2113 | ||
1931 | params = me->ourgame->default_params(); | 2114 | data.params = me->ourgame->default_params(); |
1932 | me->ourgame->decode_params(params, parstr); | 2115 | me->ourgame->decode_params(data.params, data.parstr); |
1933 | if (me->ourgame->validate_params(params, TRUE)) { | 2116 | if (me->ourgame->validate_params(data.params, TRUE)) { |
1934 | ret = "Long-term parameters in save file are invalid"; | 2117 | ret = "Long-term parameters in save file are invalid"; |
1935 | goto cleanup; | 2118 | goto cleanup; |
1936 | } | 2119 | } |
1937 | cparams = me->ourgame->default_params(); | 2120 | data.cparams = me->ourgame->default_params(); |
1938 | me->ourgame->decode_params(cparams, cparstr); | 2121 | me->ourgame->decode_params(data.cparams, data.cparstr); |
1939 | if (me->ourgame->validate_params(cparams, FALSE)) { | 2122 | if (me->ourgame->validate_params(data.cparams, FALSE)) { |
1940 | ret = "Short-term parameters in save file are invalid"; | 2123 | ret = "Short-term parameters in save file are invalid"; |
1941 | goto cleanup; | 2124 | goto cleanup; |
1942 | } | 2125 | } |
1943 | if (seed && me->ourgame->validate_params(cparams, TRUE)) { | 2126 | if (data.seed && me->ourgame->validate_params(data.cparams, TRUE)) { |
1944 | /* | 2127 | /* |
1945 | * The seed's no use with this version, but we can perfectly | 2128 | * The seed's no use with this version, but we can perfectly |
1946 | * well use the rest of the data. | 2129 | * well use the rest of the data. |
1947 | */ | 2130 | */ |
1948 | sfree(seed); | 2131 | sfree(data.seed); |
1949 | seed = NULL; | 2132 | data.seed = NULL; |
1950 | } | 2133 | } |
1951 | if (!desc) { | 2134 | if (!data.desc) { |
1952 | ret = "Game description in save file is missing"; | 2135 | ret = "Game description in save file is missing"; |
1953 | goto cleanup; | 2136 | goto cleanup; |
1954 | } else if (me->ourgame->validate_desc(params, desc)) { | 2137 | } else if (me->ourgame->validate_desc(data.cparams, data.desc)) { |
1955 | ret = "Game description in save file is invalid"; | 2138 | ret = "Game description in save file is invalid"; |
1956 | goto cleanup; | 2139 | goto cleanup; |
1957 | } | 2140 | } |
1958 | if (privdesc && me->ourgame->validate_desc(params, privdesc)) { | 2141 | if (data.privdesc && |
2142 | me->ourgame->validate_desc(data.cparams, data.privdesc)) { | ||
1959 | ret = "Game private description in save file is invalid"; | 2143 | ret = "Game private description in save file is invalid"; |
1960 | goto cleanup; | 2144 | goto cleanup; |
1961 | } | 2145 | } |
1962 | if (statepos < 0 || statepos >= nstates) { | 2146 | if (data.statepos < 0 || data.statepos >= data.nstates) { |
1963 | ret = "Game position in save file is out of range"; | 2147 | ret = "Game position in save file is out of range"; |
1964 | } | 2148 | } |
1965 | 2149 | ||
1966 | states[0].state = me->ourgame->new_game(me, params, | 2150 | data.states[0].state = me->ourgame->new_game( |
1967 | privdesc ? privdesc : desc); | 2151 | me, data.cparams, data.privdesc ? data.privdesc : data.desc); |
1968 | for (i = 1; i < nstates; i++) { | 2152 | for (i = 1; i < data.nstates; i++) { |
1969 | assert(states[i].movetype != NEWGAME); | 2153 | assert(data.states[i].movetype != NEWGAME); |
1970 | switch (states[i].movetype) { | 2154 | switch (data.states[i].movetype) { |
1971 | case MOVE: | 2155 | case MOVE: |
1972 | case SOLVE: | 2156 | case SOLVE: |
1973 | states[i].state = me->ourgame->execute_move(states[i-1].state, | 2157 | data.states[i].state = me->ourgame->execute_move( |
1974 | states[i].movestr); | 2158 | data.states[i-1].state, data.states[i].movestr); |
1975 | if (states[i].state == NULL) { | 2159 | if (data.states[i].state == NULL) { |
1976 | ret = "Save file contained an invalid move"; | 2160 | ret = "Save file contained an invalid move"; |
1977 | goto cleanup; | 2161 | goto cleanup; |
1978 | } | 2162 | } |
1979 | break; | 2163 | break; |
1980 | case RESTART: | 2164 | case RESTART: |
1981 | if (me->ourgame->validate_desc(params, states[i].movestr)) { | 2165 | if (me->ourgame->validate_desc( |
2166 | data.cparams, data.states[i].movestr)) { | ||
1982 | ret = "Save file contained an invalid restart move"; | 2167 | ret = "Save file contained an invalid restart move"; |
1983 | goto cleanup; | 2168 | goto cleanup; |
1984 | } | 2169 | } |
1985 | states[i].state = me->ourgame->new_game(me, params, | 2170 | data.states[i].state = me->ourgame->new_game( |
1986 | states[i].movestr); | 2171 | me, data.cparams, data.states[i].movestr); |
1987 | break; | 2172 | break; |
1988 | } | 2173 | } |
1989 | } | 2174 | } |
1990 | 2175 | ||
1991 | ui = me->ourgame->new_ui(states[0].state); | 2176 | data.ui = me->ourgame->new_ui(data.states[0].state); |
1992 | me->ourgame->decode_ui(ui, uistr); | 2177 | me->ourgame->decode_ui(data.ui, data.uistr); |
2178 | |||
2179 | /* | ||
2180 | * Run the externally provided check function, and abort if it | ||
2181 | * returns an error message. | ||
2182 | */ | ||
2183 | if (check && (ret = check(cctx, me, &data)) != NULL) | ||
2184 | goto cleanup; /* error message is already in ret */ | ||
1993 | 2185 | ||
1994 | /* | 2186 | /* |
1995 | * Now we've run out of possible error conditions, so we're | 2187 | * Now we've run out of possible error conditions, so we're |
@@ -2002,45 +2194,54 @@ char *midend_deserialise(midend *me, | |||
2002 | char *tmp; | 2194 | char *tmp; |
2003 | 2195 | ||
2004 | tmp = me->desc; | 2196 | tmp = me->desc; |
2005 | me->desc = desc; | 2197 | me->desc = data.desc; |
2006 | desc = tmp; | 2198 | data.desc = tmp; |
2007 | 2199 | ||
2008 | tmp = me->privdesc; | 2200 | tmp = me->privdesc; |
2009 | me->privdesc = privdesc; | 2201 | me->privdesc = data.privdesc; |
2010 | privdesc = tmp; | 2202 | data.privdesc = tmp; |
2011 | 2203 | ||
2012 | tmp = me->seedstr; | 2204 | tmp = me->seedstr; |
2013 | me->seedstr = seed; | 2205 | me->seedstr = data.seed; |
2014 | seed = tmp; | 2206 | data.seed = tmp; |
2015 | 2207 | ||
2016 | tmp = me->aux_info; | 2208 | tmp = me->aux_info; |
2017 | me->aux_info = auxinfo; | 2209 | me->aux_info = data.auxinfo; |
2018 | auxinfo = tmp; | 2210 | data.auxinfo = tmp; |
2019 | } | 2211 | } |
2020 | 2212 | ||
2021 | me->genmode = GOT_NOTHING; | 2213 | me->genmode = GOT_NOTHING; |
2022 | 2214 | ||
2023 | me->statesize = nstates; | 2215 | me->statesize = data.nstates; |
2024 | nstates = me->nstates; | 2216 | data.nstates = me->nstates; |
2025 | me->nstates = me->statesize; | 2217 | me->nstates = me->statesize; |
2026 | { | 2218 | { |
2027 | struct midend_state_entry *tmp; | 2219 | struct midend_state_entry *tmp; |
2028 | tmp = me->states; | 2220 | tmp = me->states; |
2029 | me->states = states; | 2221 | me->states = data.states; |
2030 | states = tmp; | 2222 | data.states = tmp; |
2031 | } | 2223 | } |
2032 | me->statepos = statepos; | 2224 | me->statepos = data.statepos; |
2225 | |||
2226 | /* | ||
2227 | * Don't save the "new game undo" state. So "new game" twice or | ||
2228 | * (in some environments) switching away and back, will make a | ||
2229 | * "new game" irreversible. Maybe in the future we will have a | ||
2230 | * more sophisticated way to decide when to discard the previous | ||
2231 | * game state. | ||
2232 | */ | ||
2233 | me->newgame_undo_len = 0; | ||
2033 | 2234 | ||
2034 | { | 2235 | { |
2035 | game_params *tmp; | 2236 | game_params *tmp; |
2036 | 2237 | ||
2037 | tmp = me->params; | 2238 | tmp = me->params; |
2038 | me->params = params; | 2239 | me->params = data.params; |
2039 | params = tmp; | 2240 | data.params = tmp; |
2040 | 2241 | ||
2041 | tmp = me->curparams; | 2242 | tmp = me->curparams; |
2042 | me->curparams = cparams; | 2243 | me->curparams = data.cparams; |
2043 | cparams = tmp; | 2244 | data.cparams = tmp; |
2044 | } | 2245 | } |
2045 | 2246 | ||
2046 | me->oldstate = NULL; | 2247 | me->oldstate = NULL; |
@@ -2051,11 +2252,11 @@ char *midend_deserialise(midend *me, | |||
2051 | game_ui *tmp; | 2252 | game_ui *tmp; |
2052 | 2253 | ||
2053 | tmp = me->ui; | 2254 | tmp = me->ui; |
2054 | me->ui = ui; | 2255 | me->ui = data.ui; |
2055 | ui = tmp; | 2256 | data.ui = tmp; |
2056 | } | 2257 | } |
2057 | 2258 | ||
2058 | me->elapsed = elapsed; | 2259 | me->elapsed = data.elapsed; |
2059 | me->pressed_mouse_button = 0; | 2260 | me->pressed_mouse_button = 0; |
2060 | 2261 | ||
2061 | midend_set_timer(me); | 2262 | midend_set_timer(me); |
@@ -2073,33 +2274,39 @@ char *midend_deserialise(midend *me, | |||
2073 | 2274 | ||
2074 | cleanup: | 2275 | cleanup: |
2075 | sfree(val); | 2276 | sfree(val); |
2076 | sfree(seed); | 2277 | sfree(data.seed); |
2077 | sfree(parstr); | 2278 | sfree(data.parstr); |
2078 | sfree(cparstr); | 2279 | sfree(data.cparstr); |
2079 | sfree(desc); | 2280 | sfree(data.desc); |
2080 | sfree(privdesc); | 2281 | sfree(data.privdesc); |
2081 | sfree(auxinfo); | 2282 | sfree(data.auxinfo); |
2082 | sfree(uistr); | 2283 | sfree(data.uistr); |
2083 | if (params) | 2284 | if (data.params) |
2084 | me->ourgame->free_params(params); | 2285 | me->ourgame->free_params(data.params); |
2085 | if (cparams) | 2286 | if (data.cparams) |
2086 | me->ourgame->free_params(cparams); | 2287 | me->ourgame->free_params(data.cparams); |
2087 | if (ui) | 2288 | if (data.ui) |
2088 | me->ourgame->free_ui(ui); | 2289 | me->ourgame->free_ui(data.ui); |
2089 | if (states) { | 2290 | if (data.states) { |
2090 | int i; | 2291 | int i; |
2091 | 2292 | ||
2092 | for (i = 0; i < nstates; i++) { | 2293 | for (i = 0; i < data.nstates; i++) { |
2093 | if (states[i].state) | 2294 | if (data.states[i].state) |
2094 | me->ourgame->free_game(states[i].state); | 2295 | me->ourgame->free_game(data.states[i].state); |
2095 | sfree(states[i].movestr); | 2296 | sfree(data.states[i].movestr); |
2096 | } | 2297 | } |
2097 | sfree(states); | 2298 | sfree(data.states); |
2098 | } | 2299 | } |
2099 | 2300 | ||
2100 | return ret; | 2301 | return ret; |
2101 | } | 2302 | } |
2102 | 2303 | ||
2304 | const char *midend_deserialise( | ||
2305 | midend *me, int (*read)(void *ctx, void *buf, int len), void *rctx) | ||
2306 | { | ||
2307 | return midend_deserialise_internal(me, read, rctx, NULL, NULL); | ||
2308 | } | ||
2309 | |||
2103 | /* | 2310 | /* |
2104 | * This function examines a saved game file just far enough to | 2311 | * This function examines a saved game file just far enough to |
2105 | * determine which game type it contains. It returns NULL on success | 2312 | * determine which game type it contains. It returns NULL on success |
@@ -2107,15 +2314,16 @@ char *midend_deserialise(midend *me, | |||
2107 | * allocated and should be caller-freed), or an error message on | 2314 | * allocated and should be caller-freed), or an error message on |
2108 | * failure. | 2315 | * failure. |
2109 | */ | 2316 | */ |
2110 | char *identify_game(char **name, int (*read)(void *ctx, void *buf, int len), | 2317 | const char *identify_game(char **name, |
2111 | void *rctx) | 2318 | int (*read)(void *ctx, void *buf, int len), |
2319 | void *rctx) | ||
2112 | { | 2320 | { |
2113 | int nstates = 0, statepos = -1, gotstates = 0; | 2321 | int nstates = 0, statepos = -1, gotstates = 0; |
2114 | int started = FALSE; | 2322 | int started = FALSE; |
2115 | 2323 | ||
2116 | char *val = NULL; | 2324 | char *val = NULL; |
2117 | /* Initially all errors give the same report */ | 2325 | /* Initially all errors give the same report */ |
2118 | char *ret = "Data does not appear to be a saved game file"; | 2326 | const char *ret = "Data does not appear to be a saved game file"; |
2119 | 2327 | ||
2120 | *name = NULL; | 2328 | *name = NULL; |
2121 | 2329 | ||
@@ -2205,7 +2413,7 @@ char *identify_game(char **name, int (*read)(void *ctx, void *buf, int len), | |||
2205 | return ret; | 2413 | return ret; |
2206 | } | 2414 | } |
2207 | 2415 | ||
2208 | char *midend_print_puzzle(midend *me, document *doc, int with_soln) | 2416 | const char *midend_print_puzzle(midend *me, document *doc, int with_soln) |
2209 | { | 2417 | { |
2210 | game_state *soln = NULL; | 2418 | game_state *soln = NULL; |
2211 | 2419 | ||
@@ -2213,7 +2421,8 @@ char *midend_print_puzzle(midend *me, document *doc, int with_soln) | |||
2213 | return "No game set up to print";/* _shouldn't_ happen! */ | 2421 | return "No game set up to print";/* _shouldn't_ happen! */ |
2214 | 2422 | ||
2215 | if (with_soln) { | 2423 | if (with_soln) { |
2216 | char *msg, *movestr; | 2424 | const char *msg; |
2425 | char *movestr; | ||
2217 | 2426 | ||
2218 | if (!me->ourgame->can_solve) | 2427 | if (!me->ourgame->can_solve) |
2219 | return "This game does not support the Solve operation"; | 2428 | return "This game does not support the Solve operation"; |
diff --git a/apps/plugins/puzzles/src/mines.c b/apps/plugins/puzzles/src/mines.c index 107b3ba159..340bb4b8d3 100644 --- a/apps/plugins/puzzles/src/mines.c +++ b/apps/plugins/puzzles/src/mines.c | |||
@@ -203,30 +203,24 @@ static config_item *game_configure(const game_params *params) | |||
203 | ret[0].name = "Width"; | 203 | ret[0].name = "Width"; |
204 | ret[0].type = C_STRING; | 204 | ret[0].type = C_STRING; |
205 | sprintf(buf, "%d", params->w); | 205 | sprintf(buf, "%d", params->w); |
206 | ret[0].sval = dupstr(buf); | 206 | ret[0].u.string.sval = dupstr(buf); |
207 | ret[0].ival = 0; | ||
208 | 207 | ||
209 | ret[1].name = "Height"; | 208 | ret[1].name = "Height"; |
210 | ret[1].type = C_STRING; | 209 | ret[1].type = C_STRING; |
211 | sprintf(buf, "%d", params->h); | 210 | sprintf(buf, "%d", params->h); |
212 | ret[1].sval = dupstr(buf); | 211 | ret[1].u.string.sval = dupstr(buf); |
213 | ret[1].ival = 0; | ||
214 | 212 | ||
215 | ret[2].name = "Mines"; | 213 | ret[2].name = "Mines"; |
216 | ret[2].type = C_STRING; | 214 | ret[2].type = C_STRING; |
217 | sprintf(buf, "%d", params->n); | 215 | sprintf(buf, "%d", params->n); |
218 | ret[2].sval = dupstr(buf); | 216 | ret[2].u.string.sval = dupstr(buf); |
219 | ret[2].ival = 0; | ||
220 | 217 | ||
221 | ret[3].name = "Ensure solubility"; | 218 | ret[3].name = "Ensure solubility"; |
222 | ret[3].type = C_BOOLEAN; | 219 | ret[3].type = C_BOOLEAN; |
223 | ret[3].sval = NULL; | 220 | ret[3].u.boolean.bval = params->unique; |
224 | ret[3].ival = params->unique; | ||
225 | 221 | ||
226 | ret[4].name = NULL; | 222 | ret[4].name = NULL; |
227 | ret[4].type = C_END; | 223 | ret[4].type = C_END; |
228 | ret[4].sval = NULL; | ||
229 | ret[4].ival = 0; | ||
230 | 224 | ||
231 | return ret; | 225 | return ret; |
232 | } | 226 | } |
@@ -235,17 +229,17 @@ static game_params *custom_params(const config_item *cfg) | |||
235 | { | 229 | { |
236 | game_params *ret = snew(game_params); | 230 | game_params *ret = snew(game_params); |
237 | 231 | ||
238 | ret->w = atoi(cfg[0].sval); | 232 | ret->w = atoi(cfg[0].u.string.sval); |
239 | ret->h = atoi(cfg[1].sval); | 233 | ret->h = atoi(cfg[1].u.string.sval); |
240 | ret->n = atoi(cfg[2].sval); | 234 | ret->n = atoi(cfg[2].u.string.sval); |
241 | if (strchr(cfg[2].sval, '%')) | 235 | if (strchr(cfg[2].u.string.sval, '%')) |
242 | ret->n = ret->n * (ret->w * ret->h) / 100; | 236 | ret->n = ret->n * (ret->w * ret->h) / 100; |
243 | ret->unique = cfg[3].ival; | 237 | ret->unique = cfg[3].u.boolean.bval; |
244 | 238 | ||
245 | return ret; | 239 | return ret; |
246 | } | 240 | } |
247 | 241 | ||
248 | static char *validate_params(const game_params *params, int full) | 242 | static const char *validate_params(const game_params *params, int full) |
249 | { | 243 | { |
250 | /* | 244 | /* |
251 | * Lower limit on grid size: each dimension must be at least 3. | 245 | * Lower limit on grid size: each dimension must be at least 3. |
@@ -1996,7 +1990,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1996 | } | 1990 | } |
1997 | } | 1991 | } |
1998 | 1992 | ||
1999 | static char *validate_desc(const game_params *params, const char *desc) | 1993 | static const char *validate_desc(const game_params *params, const char *desc) |
2000 | { | 1994 | { |
2001 | int wh = params->w * params->h; | 1995 | int wh = params->w * params->h; |
2002 | int x, y; | 1996 | int x, y; |
@@ -2306,7 +2300,7 @@ static void free_game(game_state *state) | |||
2306 | } | 2300 | } |
2307 | 2301 | ||
2308 | static char *solve_game(const game_state *state, const game_state *currstate, | 2302 | static char *solve_game(const game_state *state, const game_state *currstate, |
2309 | const char *aux, char **error) | 2303 | const char *aux, const char **error) |
2310 | { | 2304 | { |
2311 | if (!state->layout->mines) { | 2305 | if (!state->layout->mines) { |
2312 | *error = "Game has not been started yet"; | 2306 | *error = "Game has not been started yet"; |
@@ -2434,14 +2428,14 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2434 | if (IS_CURSOR_MOVE(button)) { | 2428 | if (IS_CURSOR_MOVE(button)) { |
2435 | move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, 0); | 2429 | move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, 0); |
2436 | ui->cur_visible = 1; | 2430 | ui->cur_visible = 1; |
2437 | return ""; | 2431 | return UI_UPDATE; |
2438 | } | 2432 | } |
2439 | if (IS_CURSOR_SELECT(button)) { | 2433 | if (IS_CURSOR_SELECT(button)) { |
2440 | int v = from->grid[ui->cur_y * from->w + ui->cur_x]; | 2434 | int v = from->grid[ui->cur_y * from->w + ui->cur_x]; |
2441 | 2435 | ||
2442 | if (!ui->cur_visible) { | 2436 | if (!ui->cur_visible) { |
2443 | ui->cur_visible = 1; | 2437 | ui->cur_visible = 1; |
2444 | return ""; | 2438 | return UI_UPDATE; |
2445 | } | 2439 | } |
2446 | if (button == CURSOR_SELECT2) { | 2440 | if (button == CURSOR_SELECT2) { |
2447 | /* As for RIGHT_BUTTON; only works on covered square. */ | 2441 | /* As for RIGHT_BUTTON; only works on covered square. */ |
@@ -2481,7 +2475,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2481 | else if (button == MIDDLE_BUTTON) | 2475 | else if (button == MIDDLE_BUTTON) |
2482 | ui->validradius = 1; | 2476 | ui->validradius = 1; |
2483 | ui->cur_visible = 0; | 2477 | ui->cur_visible = 0; |
2484 | return ""; | 2478 | return UI_UPDATE; |
2485 | } | 2479 | } |
2486 | 2480 | ||
2487 | if (button == RIGHT_BUTTON) { | 2481 | if (button == RIGHT_BUTTON) { |
@@ -2509,10 +2503,10 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2509 | 2503 | ||
2510 | /* | 2504 | /* |
2511 | * At this stage we must never return NULL: we have adjusted | 2505 | * At this stage we must never return NULL: we have adjusted |
2512 | * the ui, so at worst we return "". | 2506 | * the ui, so at worst we return UI_UPDATE. |
2513 | */ | 2507 | */ |
2514 | if (cx < 0 || cx >= from->w || cy < 0 || cy >= from->h) | 2508 | if (cx < 0 || cx >= from->w || cy < 0 || cy >= from->h) |
2515 | return ""; | 2509 | return UI_UPDATE; |
2516 | 2510 | ||
2517 | /* | 2511 | /* |
2518 | * Left-clicking on a covered square opens a tile. Not | 2512 | * Left-clicking on a covered square opens a tile. Not |
@@ -2566,7 +2560,7 @@ uncover: | |||
2566 | * can. | 2560 | * can. |
2567 | */ | 2561 | */ |
2568 | char *p = buf; | 2562 | char *p = buf; |
2569 | char *sep = ""; | 2563 | const char *sep = ""; |
2570 | 2564 | ||
2571 | for (dy = -1; dy <= +1; dy++) | 2565 | for (dy = -1; dy <= +1; dy++) |
2572 | for (dx = -1; dx <= +1; dx++) | 2566 | for (dx = -1; dx <= +1; dx++) |
@@ -2590,7 +2584,7 @@ uncover: | |||
2590 | } | 2584 | } |
2591 | } | 2585 | } |
2592 | 2586 | ||
2593 | return ""; | 2587 | return UI_UPDATE; |
2594 | } | 2588 | } |
2595 | } | 2589 | } |
2596 | 2590 | ||
@@ -3235,7 +3229,8 @@ int main(int argc, char **argv) | |||
3235 | { | 3229 | { |
3236 | game_params *p; | 3230 | game_params *p; |
3237 | game_state *s; | 3231 | game_state *s; |
3238 | char *id = NULL, *desc, *err; | 3232 | char *id = NULL, *desc; |
3233 | const char *err; | ||
3239 | int y, x; | 3234 | int y, x; |
3240 | 3235 | ||
3241 | while (--argc > 0) { | 3236 | while (--argc > 0) { |
diff --git a/apps/plugins/puzzles/src/misc.c b/apps/plugins/puzzles/src/misc.c index 816d47e43a..83671a2744 100644 --- a/apps/plugins/puzzles/src/misc.c +++ b/apps/plugins/puzzles/src/misc.c | |||
@@ -9,13 +9,15 @@ | |||
9 | 9 | ||
10 | #include "puzzles.h" | 10 | #include "puzzles.h" |
11 | 11 | ||
12 | char UI_UPDATE[] = ""; | ||
13 | |||
12 | void free_cfg(config_item *cfg) | 14 | void free_cfg(config_item *cfg) |
13 | { | 15 | { |
14 | config_item *i; | 16 | config_item *i; |
15 | 17 | ||
16 | for (i = cfg; i->type != C_END; i++) | 18 | for (i = cfg; i->type != C_END; i++) |
17 | if (i->type == C_STRING) | 19 | if (i->type == C_STRING) |
18 | sfree(i->sval); | 20 | sfree(i->u.string.sval); |
19 | sfree(cfg); | 21 | sfree(cfg); |
20 | } | 22 | } |
21 | 23 | ||
@@ -349,7 +351,7 @@ void pos2c(int w, int h, int pos, int *cx, int *cy) | |||
349 | 351 | ||
350 | void draw_text_outline(drawing *dr, int x, int y, int fonttype, | 352 | void draw_text_outline(drawing *dr, int x, int y, int fonttype, |
351 | int fontsize, int align, | 353 | int fontsize, int align, |
352 | int text_colour, int outline_colour, char *text) | 354 | int text_colour, int outline_colour, const char *text) |
353 | { | 355 | { |
354 | if (outline_colour > -1) { | 356 | if (outline_colour > -1) { |
355 | draw_text(dr, x-1, y, fonttype, fontsize, align, outline_colour, text); | 357 | draw_text(dr, x-1, y, fonttype, fontsize, align, outline_colour, text); |
diff --git a/apps/plugins/puzzles/src/nestedvm.c b/apps/plugins/puzzles/src/nestedvm.c index f7a2ae8ec5..0ad0f3fab4 100644 --- a/apps/plugins/puzzles/src/nestedvm.c +++ b/apps/plugins/puzzles/src/nestedvm.c | |||
@@ -17,7 +17,7 @@ | |||
17 | extern void _pause(); | 17 | extern void _pause(); |
18 | extern int _call_java(int cmd, int arg1, int arg2, int arg3); | 18 | extern int _call_java(int cmd, int arg1, int arg2, int arg3); |
19 | 19 | ||
20 | void fatal(char *fmt, ...) | 20 | void fatal(const char *fmt, ...) |
21 | { | 21 | { |
22 | va_list ap; | 22 | va_list ap; |
23 | fprintf(stderr, "fatal error: "); | 23 | fprintf(stderr, "fatal error: "); |
@@ -53,7 +53,7 @@ void frontend_default_colour(frontend *fe, float *output) | |||
53 | output[0] = output[1]= output[2] = 0.8f; | 53 | output[0] = output[1]= output[2] = 0.8f; |
54 | } | 54 | } |
55 | 55 | ||
56 | void nestedvm_status_bar(void *handle, char *text) | 56 | void nestedvm_status_bar(void *handle, const char *text) |
57 | { | 57 | { |
58 | _call_java(4,0,(int)text,0); | 58 | _call_java(4,0,(int)text,0); |
59 | } | 59 | } |
@@ -79,7 +79,7 @@ void nestedvm_unclip(void *handle) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | void nestedvm_draw_text(void *handle, int x, int y, int fonttype, int fontsize, | 81 | void nestedvm_draw_text(void *handle, int x, int y, int fonttype, int fontsize, |
82 | int align, int colour, char *text) | 82 | int align, int colour, const char *text) |
83 | { | 83 | { |
84 | frontend *fe = (frontend *)handle; | 84 | frontend *fe = (frontend *)handle; |
85 | _call_java(5, x + fe->ox, y + fe->oy, | 85 | _call_java(5, x + fe->ox, y + fe->oy, |
@@ -259,7 +259,7 @@ void activate_timer(frontend *fe) | |||
259 | void jcallback_config_ok() | 259 | void jcallback_config_ok() |
260 | { | 260 | { |
261 | frontend *fe = (frontend *)_fe; | 261 | frontend *fe = (frontend *)_fe; |
262 | char *err; | 262 | const char *err; |
263 | 263 | ||
264 | err = midend_set_config(fe->me, fe->cfg_which, fe->cfg); | 264 | err = midend_set_config(fe->me, fe->cfg_which, fe->cfg); |
265 | 265 | ||
@@ -273,19 +273,22 @@ void jcallback_config_ok() | |||
273 | void jcallback_config_set_string(int item_ptr, int char_ptr) { | 273 | void jcallback_config_set_string(int item_ptr, int char_ptr) { |
274 | config_item *i = (config_item *)item_ptr; | 274 | config_item *i = (config_item *)item_ptr; |
275 | char* newval = (char*) char_ptr; | 275 | char* newval = (char*) char_ptr; |
276 | sfree(i->sval); | 276 | assert(i->type == C_STRING); |
277 | i->sval = dupstr(newval); | 277 | sfree(i->u.string.sval); |
278 | i->u.string.sval = dupstr(newval); | ||
278 | free(newval); | 279 | free(newval); |
279 | } | 280 | } |
280 | 281 | ||
281 | void jcallback_config_set_boolean(int item_ptr, int selected) { | 282 | void jcallback_config_set_boolean(int item_ptr, int selected) { |
282 | config_item *i = (config_item *)item_ptr; | 283 | config_item *i = (config_item *)item_ptr; |
283 | i->ival = selected != 0 ? TRUE : FALSE; | 284 | assert(i->type == C_BOOLEAN); |
285 | i->u.boolean.bval = selected != 0 ? TRUE : FALSE; | ||
284 | } | 286 | } |
285 | 287 | ||
286 | void jcallback_config_set_choice(int item_ptr, int selected) { | 288 | void jcallback_config_set_choice(int item_ptr, int selected) { |
287 | config_item *i = (config_item *)item_ptr; | 289 | config_item *i = (config_item *)item_ptr; |
288 | i->ival = selected; | 290 | assert(i->type == C_CHOICES); |
291 | i->u.choices.selected = selected; | ||
289 | } | 292 | } |
290 | 293 | ||
291 | static int get_config(frontend *fe, int which) | 294 | static int get_config(frontend *fe, int which) |
@@ -298,7 +301,18 @@ static int get_config(frontend *fe, int which) | |||
298 | _call_java(10, (int)title, 0, 0); | 301 | _call_java(10, (int)title, 0, 0); |
299 | for (i = fe->cfg; i->type != C_END; i++) { | 302 | for (i = fe->cfg; i->type != C_END; i++) { |
300 | _call_java(5, (int)i, i->type, (int)i->name); | 303 | _call_java(5, (int)i, i->type, (int)i->name); |
301 | _call_java(11, (int)i->sval, i->ival, 0); | 304 | switch (i->type) { |
305 | case C_STRING: | ||
306 | _call_java(11, (int)i->u.string.sval, 0, 0); | ||
307 | break; | ||
308 | case C_BOOLEAN: | ||
309 | _call_java(11, 0, i->u.boolean.bval, 0); | ||
310 | break; | ||
311 | case C_CHOICES: | ||
312 | _call_java(11, (int)i->u.choices.choicenames, | ||
313 | i->u.choices.selected, 0); | ||
314 | break; | ||
315 | } | ||
302 | } | 316 | } |
303 | _call_java(12,0,0,0); | 317 | _call_java(12,0,0,0); |
304 | free_cfg(fe->cfg); | 318 | free_cfg(fe->cfg); |
@@ -363,7 +377,7 @@ int jcallback_preset_event(int ptr_game_params) | |||
363 | int jcallback_solve_event() | 377 | int jcallback_solve_event() |
364 | { | 378 | { |
365 | frontend *fe = (frontend *)_fe; | 379 | frontend *fe = (frontend *)_fe; |
366 | char *msg; | 380 | const char *msg; |
367 | 381 | ||
368 | msg = midend_solve(fe->me); | 382 | msg = midend_solve(fe->me); |
369 | 383 | ||
diff --git a/apps/plugins/puzzles/src/net.c b/apps/plugins/puzzles/src/net.c index 0b3b82446d..ab2425e4e7 100644 --- a/apps/plugins/puzzles/src/net.c +++ b/apps/plugins/puzzles/src/net.c | |||
@@ -270,35 +270,28 @@ static config_item *game_configure(const game_params *params) | |||
270 | ret[0].name = "Width"; | 270 | ret[0].name = "Width"; |
271 | ret[0].type = C_STRING; | 271 | ret[0].type = C_STRING; |
272 | sprintf(buf, "%d", params->width); | 272 | sprintf(buf, "%d", params->width); |
273 | ret[0].sval = dupstr(buf); | 273 | ret[0].u.string.sval = dupstr(buf); |
274 | ret[0].ival = 0; | ||
275 | 274 | ||
276 | ret[1].name = "Height"; | 275 | ret[1].name = "Height"; |
277 | ret[1].type = C_STRING; | 276 | ret[1].type = C_STRING; |
278 | sprintf(buf, "%d", params->height); | 277 | sprintf(buf, "%d", params->height); |
279 | ret[1].sval = dupstr(buf); | 278 | ret[1].u.string.sval = dupstr(buf); |
280 | ret[1].ival = 0; | ||
281 | 279 | ||
282 | ret[2].name = "Walls wrap around"; | 280 | ret[2].name = "Walls wrap around"; |
283 | ret[2].type = C_BOOLEAN; | 281 | ret[2].type = C_BOOLEAN; |
284 | ret[2].sval = NULL; | 282 | ret[2].u.boolean.bval = params->wrapping; |
285 | ret[2].ival = params->wrapping; | ||
286 | 283 | ||
287 | ret[3].name = "Barrier probability"; | 284 | ret[3].name = "Barrier probability"; |
288 | ret[3].type = C_STRING; | 285 | ret[3].type = C_STRING; |
289 | ftoa(buf, params->barrier_probability); | 286 | ftoa(buf, params->barrier_probability); |
290 | ret[3].sval = dupstr(buf); | 287 | ret[3].u.string.sval = dupstr(buf); |
291 | ret[3].ival = 0; | ||
292 | 288 | ||
293 | ret[4].name = "Ensure unique solution"; | 289 | ret[4].name = "Ensure unique solution"; |
294 | ret[4].type = C_BOOLEAN; | 290 | ret[4].type = C_BOOLEAN; |
295 | ret[4].sval = NULL; | 291 | ret[4].u.boolean.bval = params->unique; |
296 | ret[4].ival = params->unique; | ||
297 | 292 | ||
298 | ret[5].name = NULL; | 293 | ret[5].name = NULL; |
299 | ret[5].type = C_END; | 294 | ret[5].type = C_END; |
300 | ret[5].sval = NULL; | ||
301 | ret[5].ival = 0; | ||
302 | 295 | ||
303 | return ret; | 296 | return ret; |
304 | } | 297 | } |
@@ -307,16 +300,16 @@ static game_params *custom_params(const config_item *cfg) | |||
307 | { | 300 | { |
308 | game_params *ret = snew(game_params); | 301 | game_params *ret = snew(game_params); |
309 | 302 | ||
310 | ret->width = atoi(cfg[0].sval); | 303 | ret->width = atoi(cfg[0].u.string.sval); |
311 | ret->height = atoi(cfg[1].sval); | 304 | ret->height = atoi(cfg[1].u.string.sval); |
312 | ret->wrapping = cfg[2].ival; | 305 | ret->wrapping = cfg[2].u.boolean.bval; |
313 | ret->barrier_probability = (float)atof(cfg[3].sval); | 306 | ret->barrier_probability = (float)atof(cfg[3].u.string.sval); |
314 | ret->unique = cfg[4].ival; | 307 | ret->unique = cfg[4].u.boolean.bval; |
315 | 308 | ||
316 | return ret; | 309 | return ret; |
317 | } | 310 | } |
318 | 311 | ||
319 | static char *validate_params(const game_params *params, int full) | 312 | static const char *validate_params(const game_params *params, int full) |
320 | { | 313 | { |
321 | if (params->width <= 0 || params->height <= 0) | 314 | if (params->width <= 0 || params->height <= 0) |
322 | return "Width and height must both be greater than zero"; | 315 | return "Width and height must both be greater than zero"; |
@@ -1601,7 +1594,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1601 | return desc; | 1594 | return desc; |
1602 | } | 1595 | } |
1603 | 1596 | ||
1604 | static char *validate_desc(const game_params *params, const char *desc) | 1597 | static const char *validate_desc(const game_params *params, const char *desc) |
1605 | { | 1598 | { |
1606 | int w = params->width, h = params->height; | 1599 | int w = params->width, h = params->height; |
1607 | int i; | 1600 | int i; |
@@ -1752,7 +1745,7 @@ static void free_game(game_state *state) | |||
1752 | } | 1745 | } |
1753 | 1746 | ||
1754 | static char *solve_game(const game_state *state, const game_state *currstate, | 1747 | static char *solve_game(const game_state *state, const game_state *currstate, |
1755 | const char *aux, char **error) | 1748 | const char *aux, const char **error) |
1756 | { | 1749 | { |
1757 | unsigned char *tiles; | 1750 | unsigned char *tiles; |
1758 | char *ret; | 1751 | char *ret; |
@@ -2099,7 +2092,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2099 | 2092 | ||
2100 | if (ui->cur_visible) { | 2093 | if (ui->cur_visible) { |
2101 | ui->cur_visible = FALSE; | 2094 | ui->cur_visible = FALSE; |
2102 | nullret = ""; | 2095 | nullret = UI_UPDATE; |
2103 | } | 2096 | } |
2104 | 2097 | ||
2105 | /* | 2098 | /* |
@@ -2339,7 +2332,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2339 | OFFSET(ui->cur_x, ui->cur_y, ui->cur_x, ui->cur_y, dir, state); | 2332 | OFFSET(ui->cur_x, ui->cur_y, ui->cur_x, ui->cur_y, dir, state); |
2340 | ui->cur_visible = TRUE; | 2333 | ui->cur_visible = TRUE; |
2341 | } | 2334 | } |
2342 | return ""; | 2335 | return UI_UPDATE; |
2343 | } else { | 2336 | } else { |
2344 | return NULL; | 2337 | return NULL; |
2345 | } | 2338 | } |
diff --git a/apps/plugins/puzzles/src/netslide.c b/apps/plugins/puzzles/src/netslide.c index bb9b0999ea..d4d9856295 100644 --- a/apps/plugins/puzzles/src/netslide.c +++ b/apps/plugins/puzzles/src/netslide.c | |||
@@ -265,36 +265,29 @@ static config_item *game_configure(const game_params *params) | |||
265 | ret[0].name = "Width"; | 265 | ret[0].name = "Width"; |
266 | ret[0].type = C_STRING; | 266 | ret[0].type = C_STRING; |
267 | sprintf(buf, "%d", params->width); | 267 | sprintf(buf, "%d", params->width); |
268 | ret[0].sval = dupstr(buf); | 268 | ret[0].u.string.sval = dupstr(buf); |
269 | ret[0].ival = 0; | ||
270 | 269 | ||
271 | ret[1].name = "Height"; | 270 | ret[1].name = "Height"; |
272 | ret[1].type = C_STRING; | 271 | ret[1].type = C_STRING; |
273 | sprintf(buf, "%d", params->height); | 272 | sprintf(buf, "%d", params->height); |
274 | ret[1].sval = dupstr(buf); | 273 | ret[1].u.string.sval = dupstr(buf); |
275 | ret[1].ival = 0; | ||
276 | 274 | ||
277 | ret[2].name = "Walls wrap around"; | 275 | ret[2].name = "Walls wrap around"; |
278 | ret[2].type = C_BOOLEAN; | 276 | ret[2].type = C_BOOLEAN; |
279 | ret[2].sval = NULL; | 277 | ret[2].u.boolean.bval = params->wrapping; |
280 | ret[2].ival = params->wrapping; | ||
281 | 278 | ||
282 | ret[3].name = "Barrier probability"; | 279 | ret[3].name = "Barrier probability"; |
283 | ret[3].type = C_STRING; | 280 | ret[3].type = C_STRING; |
284 | ftoa(buf, params->barrier_probability); | 281 | ftoa(buf, params->barrier_probability); |
285 | ret[3].sval = dupstr(buf); | 282 | ret[3].u.string.sval = dupstr(buf); |
286 | ret[3].ival = 0; | ||
287 | 283 | ||
288 | ret[4].name = "Number of shuffling moves"; | 284 | ret[4].name = "Number of shuffling moves"; |
289 | ret[4].type = C_STRING; | 285 | ret[4].type = C_STRING; |
290 | sprintf(buf, "%d", params->movetarget); | 286 | sprintf(buf, "%d", params->movetarget); |
291 | ret[4].sval = dupstr(buf); | 287 | ret[4].u.string.sval = dupstr(buf); |
292 | ret[4].ival = 0; | ||
293 | 288 | ||
294 | ret[5].name = NULL; | 289 | ret[5].name = NULL; |
295 | ret[5].type = C_END; | 290 | ret[5].type = C_END; |
296 | ret[5].sval = NULL; | ||
297 | ret[5].ival = 0; | ||
298 | 291 | ||
299 | return ret; | 292 | return ret; |
300 | } | 293 | } |
@@ -303,16 +296,16 @@ static game_params *custom_params(const config_item *cfg) | |||
303 | { | 296 | { |
304 | game_params *ret = snew(game_params); | 297 | game_params *ret = snew(game_params); |
305 | 298 | ||
306 | ret->width = atoi(cfg[0].sval); | 299 | ret->width = atoi(cfg[0].u.string.sval); |
307 | ret->height = atoi(cfg[1].sval); | 300 | ret->height = atoi(cfg[1].u.string.sval); |
308 | ret->wrapping = cfg[2].ival; | 301 | ret->wrapping = cfg[2].u.boolean.bval; |
309 | ret->barrier_probability = (float)atof(cfg[3].sval); | 302 | ret->barrier_probability = (float)atof(cfg[3].u.string.sval); |
310 | ret->movetarget = atoi(cfg[4].sval); | 303 | ret->movetarget = atoi(cfg[4].u.string.sval); |
311 | 304 | ||
312 | return ret; | 305 | return ret; |
313 | } | 306 | } |
314 | 307 | ||
315 | static char *validate_params(const game_params *params, int full) | 308 | static const char *validate_params(const game_params *params, int full) |
316 | { | 309 | { |
317 | if (params->width <= 1 || params->height <= 1) | 310 | if (params->width <= 1 || params->height <= 1) |
318 | return "Width and height must both be greater than one"; | 311 | return "Width and height must both be greater than one"; |
@@ -701,7 +694,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
701 | return desc; | 694 | return desc; |
702 | } | 695 | } |
703 | 696 | ||
704 | static char *validate_desc(const game_params *params, const char *desc) | 697 | static const char *validate_desc(const game_params *params, const char *desc) |
705 | { | 698 | { |
706 | int w = params->width, h = params->height; | 699 | int w = params->width, h = params->height; |
707 | int i; | 700 | int i; |
@@ -891,7 +884,7 @@ static void free_game(game_state *state) | |||
891 | } | 884 | } |
892 | 885 | ||
893 | static char *solve_game(const game_state *state, const game_state *currstate, | 886 | static char *solve_game(const game_state *state, const game_state *currstate, |
894 | const char *aux, char **error) | 887 | const char *aux, const char **error) |
895 | { | 888 | { |
896 | if (!aux) { | 889 | if (!aux) { |
897 | *error = "Solution not known for this puzzle"; | 890 | *error = "Solution not known for this puzzle"; |
@@ -1084,7 +1077,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1084 | } | 1077 | } |
1085 | 1078 | ||
1086 | ui->cur_visible = 1; | 1079 | ui->cur_visible = 1; |
1087 | return ""; | 1080 | return UI_UPDATE; |
1088 | } | 1081 | } |
1089 | 1082 | ||
1090 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { | 1083 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { |
@@ -1098,7 +1091,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1098 | } else { | 1091 | } else { |
1099 | /* 'click' when cursor is invisible just makes cursor visible. */ | 1092 | /* 'click' when cursor is invisible just makes cursor visible. */ |
1100 | ui->cur_visible = 1; | 1093 | ui->cur_visible = 1; |
1101 | return ""; | 1094 | return UI_UPDATE; |
1102 | } | 1095 | } |
1103 | } else | 1096 | } else |
1104 | return NULL; | 1097 | return NULL; |
diff --git a/apps/plugins/puzzles/src/nullfe.c b/apps/plugins/puzzles/src/nullfe.c index ad381a135b..14b6e096c0 100644 --- a/apps/plugins/puzzles/src/nullfe.c +++ b/apps/plugins/puzzles/src/nullfe.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | void frontend_default_colour(frontend *fe, float *output) {} | 11 | void frontend_default_colour(frontend *fe, float *output) {} |
12 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, | 12 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, |
13 | int align, int colour, char *text) {} | 13 | int align, int colour, const char *text) {} |
14 | void draw_rect(drawing *dr, int x, int y, int w, int h, int colour) {} | 14 | void draw_rect(drawing *dr, int x, int y, int w, int h, int colour) {} |
15 | void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour) {} | 15 | void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour) {} |
16 | void draw_thick_line(drawing *dr, float thickness, | 16 | void draw_thick_line(drawing *dr, float thickness, |
@@ -41,15 +41,16 @@ int print_rgb_hatched_colour(drawing *dr, float r, float g, float b, int hatch) | |||
41 | { return 0; } | 41 | { return 0; } |
42 | void print_line_width(drawing *dr, int width) {} | 42 | void print_line_width(drawing *dr, int width) {} |
43 | void print_line_dotted(drawing *dr, int dotted) {} | 43 | void print_line_dotted(drawing *dr, int dotted) {} |
44 | void midend_supersede_game_desc(midend *me, char *desc, char *privdesc) {} | 44 | void midend_supersede_game_desc(midend *me, const char *desc, |
45 | void status_bar(drawing *dr, char *text) {} | 45 | const char *privdesc) {} |
46 | void status_bar(drawing *dr, const char *text) {} | ||
46 | struct preset_menu *preset_menu_new(void) {return NULL;} | 47 | struct preset_menu *preset_menu_new(void) {return NULL;} |
47 | struct preset_menu *preset_menu_add_submenu(struct preset_menu *parent, | 48 | struct preset_menu *preset_menu_add_submenu(struct preset_menu *parent, |
48 | char *title) {return NULL;} | 49 | char *title) {return NULL;} |
49 | void preset_menu_add_preset(struct preset_menu *parent, | 50 | void preset_menu_add_preset(struct preset_menu *parent, |
50 | char *title, game_params *params) {} | 51 | char *title, game_params *params) {} |
51 | 52 | ||
52 | void fatal(char *fmt, ...) | 53 | void fatal(const char *fmt, ...) |
53 | { | 54 | { |
54 | va_list ap; | 55 | va_list ap; |
55 | 56 | ||
@@ -64,7 +65,7 @@ void fatal(char *fmt, ...) | |||
64 | } | 65 | } |
65 | 66 | ||
66 | #ifdef DEBUGGING | 67 | #ifdef DEBUGGING |
67 | void debug_printf(char *fmt, ...) | 68 | void debug_printf(const char *fmt, ...) |
68 | { | 69 | { |
69 | va_list ap; | 70 | va_list ap; |
70 | va_start(ap, fmt); | 71 | va_start(ap, fmt); |
diff --git a/apps/plugins/puzzles/src/nullgame.c b/apps/plugins/puzzles/src/nullgame.c index 183b1e39c2..bc19c1e6f0 100644 --- a/apps/plugins/puzzles/src/nullgame.c +++ b/apps/plugins/puzzles/src/nullgame.c | |||
@@ -78,7 +78,7 @@ static game_params *custom_params(const config_item *cfg) | |||
78 | return NULL; | 78 | return NULL; |
79 | } | 79 | } |
80 | 80 | ||
81 | static char *validate_params(const game_params *params, int full) | 81 | static const char *validate_params(const game_params *params, int full) |
82 | { | 82 | { |
83 | return NULL; | 83 | return NULL; |
84 | } | 84 | } |
@@ -89,7 +89,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
89 | return dupstr("FIXME"); | 89 | return dupstr("FIXME"); |
90 | } | 90 | } |
91 | 91 | ||
92 | static char *validate_desc(const game_params *params, const char *desc) | 92 | static const char *validate_desc(const game_params *params, const char *desc) |
93 | { | 93 | { |
94 | return NULL; | 94 | return NULL; |
95 | } | 95 | } |
@@ -119,7 +119,7 @@ static void free_game(game_state *state) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | static char *solve_game(const game_state *state, const game_state *currstate, | 121 | static char *solve_game(const game_state *state, const game_state *currstate, |
122 | const char *aux, char **error) | 122 | const char *aux, const char **error) |
123 | { | 123 | { |
124 | return NULL; | 124 | return NULL; |
125 | } | 125 | } |
diff --git a/apps/plugins/puzzles/src/osx.m b/apps/plugins/puzzles/src/osx.m index be29819b62..daa4af1f09 100644 --- a/apps/plugins/puzzles/src/osx.m +++ b/apps/plugins/puzzles/src/osx.m | |||
@@ -111,7 +111,7 @@ NSApplication *app; | |||
111 | * clearly defined subsystem. | 111 | * clearly defined subsystem. |
112 | */ | 112 | */ |
113 | 113 | ||
114 | void fatal(char *fmt, ...) | 114 | void fatal(const char *fmt, ...) |
115 | { | 115 | { |
116 | va_list ap; | 116 | va_list ap; |
117 | char errorbuf[2048]; | 117 | char errorbuf[2048]; |
@@ -152,7 +152,7 @@ void get_random_seed(void **randseed, int *randseedsize) | |||
152 | *randseedsize = sizeof(time_t); | 152 | *randseedsize = sizeof(time_t); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void savefile_write(void *wctx, void *buf, int len) | 155 | static void savefile_write(void *wctx, const void *buf, int len) |
156 | { | 156 | { |
157 | FILE *fp = (FILE *)wctx; | 157 | FILE *fp = (FILE *)wctx; |
158 | fwrite(buf, 1, len, fp); | 158 | fwrite(buf, 1, len, fp); |
@@ -275,7 +275,7 @@ id initnewitem(NSMenuItem *item, NSMenu *parent, const char *title, | |||
275 | return item; | 275 | return item; |
276 | } | 276 | } |
277 | 277 | ||
278 | NSMenuItem *newitem(NSMenu *parent, char *title, char *key, | 278 | NSMenuItem *newitem(NSMenu *parent, const char *title, const char *key, |
279 | id target, SEL action) | 279 | id target, SEL action) |
280 | { | 280 | { |
281 | return initnewitem([NSMenuItem allocWithZone:[NSMenu menuZone]], | 281 | return initnewitem([NSMenuItem allocWithZone:[NSMenu menuZone]], |
@@ -437,7 +437,7 @@ struct frontend { | |||
437 | - (void)keyDown:(NSEvent *)ev; | 437 | - (void)keyDown:(NSEvent *)ev; |
438 | - (void)activateTimer; | 438 | - (void)activateTimer; |
439 | - (void)deactivateTimer; | 439 | - (void)deactivateTimer; |
440 | - (void)setStatusLine:(char *)text; | 440 | - (void)setStatusLine:(const char *)text; |
441 | - (void)resizeForNewGameParams; | 441 | - (void)resizeForNewGameParams; |
442 | - (void)updateTypeMenuTick; | 442 | - (void)updateTypeMenuTick; |
443 | @end | 443 | @end |
@@ -726,7 +726,7 @@ struct frontend { | |||
726 | last_time = now; | 726 | last_time = now; |
727 | } | 727 | } |
728 | 728 | ||
729 | - (void)showError:(char *)message | 729 | - (void)showError:(const char *)message |
730 | { | 730 | { |
731 | NSAlert *alert; | 731 | NSAlert *alert; |
732 | 732 | ||
@@ -789,7 +789,7 @@ struct frontend { | |||
789 | const char *name = [[[op filenames] objectAtIndex:0] | 789 | const char *name = [[[op filenames] objectAtIndex:0] |
790 | cStringUsingEncoding: | 790 | cStringUsingEncoding: |
791 | [NSString defaultCStringEncoding]]; | 791 | [NSString defaultCStringEncoding]]; |
792 | char *err; | 792 | const char *err; |
793 | 793 | ||
794 | FILE *fp = fopen(name, "r"); | 794 | FILE *fp = fopen(name, "r"); |
795 | 795 | ||
@@ -836,7 +836,7 @@ struct frontend { | |||
836 | 836 | ||
837 | - (void)solveGame:(id)sender | 837 | - (void)solveGame:(id)sender |
838 | { | 838 | { |
839 | char *msg; | 839 | const char *msg; |
840 | 840 | ||
841 | msg = midend_solve(me); | 841 | msg = midend_solve(me); |
842 | 842 | ||
@@ -1103,7 +1103,8 @@ struct frontend { | |||
1103 | [tf setEditable:YES]; | 1103 | [tf setEditable:YES]; |
1104 | [tf setSelectable:YES]; | 1104 | [tf setSelectable:YES]; |
1105 | [tf setBordered:YES]; | 1105 | [tf setBordered:YES]; |
1106 | [[tf cell] setTitle:[NSString stringWithUTF8String:i->sval]]; | 1106 | [[tf cell] setTitle:[NSString |
1107 | stringWithUTF8String:i->u.string.sval]]; | ||
1107 | [tf sizeToFit]; | 1108 | [tf sizeToFit]; |
1108 | rect = [tf frame]; | 1109 | rect = [tf frame]; |
1109 | /* | 1110 | /* |
@@ -1132,7 +1133,7 @@ struct frontend { | |||
1132 | [b setButtonType:NSSwitchButton]; | 1133 | [b setButtonType:NSSwitchButton]; |
1133 | [b setTitle:[NSString stringWithUTF8String:i->name]]; | 1134 | [b setTitle:[NSString stringWithUTF8String:i->name]]; |
1134 | [b sizeToFit]; | 1135 | [b sizeToFit]; |
1135 | [b setState:(i->ival ? NSOnState : NSOffState)]; | 1136 | [b setState:(i->u.boolean.bval ? NSOnState : NSOffState)]; |
1136 | rect = [b frame]; | 1137 | rect = [b frame]; |
1137 | if (totalw < rect.size.width + 1) totalw = rect.size.width + 1; | 1138 | if (totalw < rect.size.width + 1) totalw = rect.size.width + 1; |
1138 | if (thish < rect.size.height + 1) thish = rect.size.height + 1; | 1139 | if (thish < rect.size.height + 1) thish = rect.size.height + 1; |
@@ -1161,12 +1162,14 @@ struct frontend { | |||
1161 | pb = [[NSPopUpButton alloc] initWithFrame:tmprect pullsDown:NO]; | 1162 | pb = [[NSPopUpButton alloc] initWithFrame:tmprect pullsDown:NO]; |
1162 | [pb setBezelStyle:NSRoundedBezelStyle]; | 1163 | [pb setBezelStyle:NSRoundedBezelStyle]; |
1163 | { | 1164 | { |
1164 | char c, *p; | 1165 | char c; |
1166 | const char *p; | ||
1165 | 1167 | ||
1166 | p = i->sval; | 1168 | p = i->u.choices.choicenames; |
1167 | c = *p++; | 1169 | c = *p++; |
1168 | while (*p) { | 1170 | while (*p) { |
1169 | char *q, *copy; | 1171 | const char *q; |
1172 | char *copy; | ||
1170 | 1173 | ||
1171 | q = p; | 1174 | q = p; |
1172 | while (*p && *p != c) p++; | 1175 | while (*p && *p != c) p++; |
@@ -1180,7 +1183,7 @@ struct frontend { | |||
1180 | if (*p) p++; | 1183 | if (*p) p++; |
1181 | } | 1184 | } |
1182 | } | 1185 | } |
1183 | [pb selectItemAtIndex:i->ival]; | 1186 | [pb selectItemAtIndex:i->u.choices.selected]; |
1184 | [pb sizeToFit]; | 1187 | [pb sizeToFit]; |
1185 | 1188 | ||
1186 | rect = [pb frame]; | 1189 | rect = [pb frame]; |
@@ -1297,23 +1300,24 @@ struct frontend { | |||
1297 | if (update) { | 1300 | if (update) { |
1298 | int k; | 1301 | int k; |
1299 | config_item *i; | 1302 | config_item *i; |
1300 | char *error; | 1303 | const char *error; |
1301 | 1304 | ||
1302 | k = 0; | 1305 | k = 0; |
1303 | for (i = cfg; i->type != C_END; i++) { | 1306 | for (i = cfg; i->type != C_END; i++) { |
1304 | switch (i->type) { | 1307 | switch (i->type) { |
1305 | case C_STRING: | 1308 | case C_STRING: |
1306 | sfree(i->sval); | 1309 | sfree(i->u.string.sval); |
1307 | i->sval = dupstr([[[(id)cfg_controls[k+1] cell] | 1310 | i->u.string.sval = dupstr([[[(id)cfg_controls[k+1] cell] |
1308 | title] UTF8String]); | 1311 | title] UTF8String]); |
1309 | k += 2; | 1312 | k += 2; |
1310 | break; | 1313 | break; |
1311 | case C_BOOLEAN: | 1314 | case C_BOOLEAN: |
1312 | i->ival = [(id)cfg_controls[k] state] == NSOnState; | 1315 | i->u.boolean.bval = [(id)cfg_controls[k] state] == NSOnState; |
1313 | k++; | 1316 | k++; |
1314 | break; | 1317 | break; |
1315 | case C_CHOICES: | 1318 | case C_CHOICES: |
1316 | i->ival = [(id)cfg_controls[k+1] indexOfSelectedItem]; | 1319 | i->u.choices.selected = |
1320 | [(id)cfg_controls[k+1] indexOfSelectedItem]; | ||
1317 | k += 2; | 1321 | k += 2; |
1318 | break; | 1322 | break; |
1319 | } | 1323 | } |
@@ -1344,7 +1348,7 @@ struct frontend { | |||
1344 | [self sheetEndWithStatus:NO]; | 1348 | [self sheetEndWithStatus:NO]; |
1345 | } | 1349 | } |
1346 | 1350 | ||
1347 | - (void)setStatusLine:(char *)text | 1351 | - (void)setStatusLine:(const char *)text |
1348 | { | 1352 | { |
1349 | [[status cell] setTitle:[NSString stringWithUTF8String:text]]; | 1353 | [[status cell] setTitle:[NSString stringWithUTF8String:text]]; |
1350 | } | 1354 | } |
@@ -1457,7 +1461,8 @@ static void osx_draw_rect(void *handle, int x, int y, int w, int h, int colour) | |||
1457 | NSRectFill(r); | 1461 | NSRectFill(r); |
1458 | } | 1462 | } |
1459 | static void osx_draw_text(void *handle, int x, int y, int fonttype, | 1463 | static void osx_draw_text(void *handle, int x, int y, int fonttype, |
1460 | int fontsize, int align, int colour, char *text) | 1464 | int fontsize, int align, int colour, |
1465 | const char *text) | ||
1461 | { | 1466 | { |
1462 | frontend *fe = (frontend *)handle; | 1467 | frontend *fe = (frontend *)handle; |
1463 | NSString *string = [NSString stringWithUTF8String:text]; | 1468 | NSString *string = [NSString stringWithUTF8String:text]; |
@@ -1608,7 +1613,7 @@ static void osx_end_draw(void *handle) | |||
1608 | frontend *fe = (frontend *)handle; | 1613 | frontend *fe = (frontend *)handle; |
1609 | [fe->image unlockFocus]; | 1614 | [fe->image unlockFocus]; |
1610 | } | 1615 | } |
1611 | static void osx_status_bar(void *handle, char *text) | 1616 | static void osx_status_bar(void *handle, const char *text) |
1612 | { | 1617 | { |
1613 | frontend *fe = (frontend *)handle; | 1618 | frontend *fe = (frontend *)handle; |
1614 | [fe->window setStatusLine:text]; | 1619 | [fe->window setStatusLine:text]; |
diff --git a/apps/plugins/puzzles/src/palisade.c b/apps/plugins/puzzles/src/palisade.c index b9d578d0f7..5227a1d56c 100644 --- a/apps/plugins/puzzles/src/palisade.c +++ b/apps/plugins/puzzles/src/palisade.c | |||
@@ -119,10 +119,20 @@ static config_item *game_configure(const game_params *params) | |||
119 | { | 119 | { |
120 | config_item *ret = snewn(4, config_item); | 120 | config_item *ret = snewn(4, config_item); |
121 | 121 | ||
122 | CONFIG(0, "Width", C_STRING, 0, string(20, "%d", params->w)); | 122 | ret[0].name = "Width"; |
123 | CONFIG(1, "Height", C_STRING, 0, string(20, "%d", params->h)); | 123 | ret[0].type = C_STRING; |
124 | CONFIG(2, "Region size", C_STRING, 0, string(20, "%d", params->k)); | 124 | ret[0].u.string.sval = string(20, "%d", params->w); |
125 | CONFIG(3, NULL, C_END, 0, NULL); | 125 | |
126 | ret[1].name = "Height"; | ||
127 | ret[1].type = C_STRING; | ||
128 | ret[1].u.string.sval = string(20, "%d", params->h); | ||
129 | |||
130 | ret[2].name = "Region size"; | ||
131 | ret[2].type = C_STRING; | ||
132 | ret[2].u.string.sval = string(20, "%d", params->k); | ||
133 | |||
134 | ret[3].name = NULL; | ||
135 | ret[3].type = C_END; | ||
126 | 136 | ||
127 | return ret; | 137 | return ret; |
128 | } | 138 | } |
@@ -131,9 +141,9 @@ static game_params *custom_params(const config_item *cfg) | |||
131 | { | 141 | { |
132 | game_params *params = snew(game_params); | 142 | game_params *params = snew(game_params); |
133 | 143 | ||
134 | params->w = atoi(cfg[0].sval); | 144 | params->w = atoi(cfg[0].u.string.sval); |
135 | params->h = atoi(cfg[1].sval); | 145 | params->h = atoi(cfg[1].u.string.sval); |
136 | params->k = atoi(cfg[2].sval); | 146 | params->k = atoi(cfg[2].u.string.sval); |
137 | 147 | ||
138 | return params; | 148 | return params; |
139 | } | 149 | } |
@@ -145,7 +155,7 @@ static game_params *custom_params(const config_item *cfg) | |||
145 | * +---+ the dominos is horizontal or vertical. +---+---+ | 155 | * +---+ the dominos is horizontal or vertical. +---+---+ |
146 | */ | 156 | */ |
147 | 157 | ||
148 | static char *validate_params(const game_params *params, int full) | 158 | static const char *validate_params(const game_params *params, int full) |
149 | { | 159 | { |
150 | int w = params->w, h = params->h, k = params->k, wh = w * h; | 160 | int w = params->w, h = params->h, k = params->k, wh = w * h; |
151 | 161 | ||
@@ -691,7 +701,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
691 | return sresize(numbers, p - numbers, clue); | 701 | return sresize(numbers, p - numbers, clue); |
692 | } | 702 | } |
693 | 703 | ||
694 | static char *validate_desc(const game_params *params, const char *desc) | 704 | static const char *validate_desc(const game_params *params, const char *desc) |
695 | { | 705 | { |
696 | 706 | ||
697 | int w = params->w, h = params->h, wh = w*h, squares = 0; | 707 | int w = params->w, h = params->h, wh = w*h, squares = 0; |
@@ -772,7 +782,7 @@ static void free_game(game_state *state) | |||
772 | } | 782 | } |
773 | 783 | ||
774 | static char *solve_game(const game_state *state, const game_state *currstate, | 784 | static char *solve_game(const game_state *state, const game_state *currstate, |
775 | const char *aux, char **error) | 785 | const char *aux, const char **error) |
776 | { | 786 | { |
777 | int w = state->shared->params.w, h = state->shared->params.h, wh = w*h; | 787 | int w = state->shared->params.w, h = state->shared->params.h, wh = w*h; |
778 | borderflag *move; | 788 | borderflag *move; |
@@ -986,7 +996,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
986 | ui->x, ui->y, flag, x, y, newflag); | 996 | ui->x, ui->y, flag, x, y, newflag); |
987 | } else { | 997 | } else { |
988 | move_cursor(button, &ui->x, &ui->y, w, h, FALSE); | 998 | move_cursor(button, &ui->x, &ui->y, w, h, FALSE); |
989 | return ""; | 999 | return UI_UPDATE; |
990 | } | 1000 | } |
991 | } | 1001 | } |
992 | 1002 | ||
diff --git a/apps/plugins/puzzles/src/pattern.c b/apps/plugins/puzzles/src/pattern.c index 270b558bda..e067f3ab0d 100644 --- a/apps/plugins/puzzles/src/pattern.c +++ b/apps/plugins/puzzles/src/pattern.c | |||
@@ -148,19 +148,15 @@ static config_item *game_configure(const game_params *params) | |||
148 | ret[0].name = "Width"; | 148 | ret[0].name = "Width"; |
149 | ret[0].type = C_STRING; | 149 | ret[0].type = C_STRING; |
150 | sprintf(buf, "%d", params->w); | 150 | sprintf(buf, "%d", params->w); |
151 | ret[0].sval = dupstr(buf); | 151 | ret[0].u.string.sval = dupstr(buf); |
152 | ret[0].ival = 0; | ||
153 | 152 | ||
154 | ret[1].name = "Height"; | 153 | ret[1].name = "Height"; |
155 | ret[1].type = C_STRING; | 154 | ret[1].type = C_STRING; |
156 | sprintf(buf, "%d", params->h); | 155 | sprintf(buf, "%d", params->h); |
157 | ret[1].sval = dupstr(buf); | 156 | ret[1].u.string.sval = dupstr(buf); |
158 | ret[1].ival = 0; | ||
159 | 157 | ||
160 | ret[2].name = NULL; | 158 | ret[2].name = NULL; |
161 | ret[2].type = C_END; | 159 | ret[2].type = C_END; |
162 | ret[2].sval = NULL; | ||
163 | ret[2].ival = 0; | ||
164 | 160 | ||
165 | return ret; | 161 | return ret; |
166 | } | 162 | } |
@@ -169,13 +165,13 @@ static game_params *custom_params(const config_item *cfg) | |||
169 | { | 165 | { |
170 | game_params *ret = snew(game_params); | 166 | game_params *ret = snew(game_params); |
171 | 167 | ||
172 | ret->w = atoi(cfg[0].sval); | 168 | ret->w = atoi(cfg[0].u.string.sval); |
173 | ret->h = atoi(cfg[1].sval); | 169 | ret->h = atoi(cfg[1].u.string.sval); |
174 | 170 | ||
175 | return ret; | 171 | return ret; |
176 | } | 172 | } |
177 | 173 | ||
178 | static char *validate_params(const game_params *params, int full) | 174 | static const char *validate_params(const game_params *params, int full) |
179 | { | 175 | { |
180 | if (params->w <= 0 || params->h <= 0) | 176 | if (params->w <= 0 || params->h <= 0) |
181 | return "Width and height must both be greater than zero"; | 177 | return "Width and height must both be greater than zero"; |
@@ -891,7 +887,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
891 | return desc; | 887 | return desc; |
892 | } | 888 | } |
893 | 889 | ||
894 | static char *validate_desc(const game_params *params, const char *desc) | 890 | static const char *validate_desc(const game_params *params, const char *desc) |
895 | { | 891 | { |
896 | int i, n, rowspace; | 892 | int i, n, rowspace; |
897 | const char *p; | 893 | const char *p; |
@@ -1051,7 +1047,7 @@ static void free_game(game_state *state) | |||
1051 | } | 1047 | } |
1052 | 1048 | ||
1053 | static char *solve_game(const game_state *state, const game_state *currstate, | 1049 | static char *solve_game(const game_state *state, const game_state *currstate, |
1054 | const char *ai, char **error) | 1050 | const char *ai, const char **error) |
1055 | { | 1051 | { |
1056 | unsigned char *matrix; | 1052 | unsigned char *matrix; |
1057 | int w = state->common->w, h = state->common->h; | 1053 | int w = state->common->w, h = state->common->h; |
@@ -1287,7 +1283,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1287 | ui->drag_start_y = ui->drag_end_y = y; | 1283 | ui->drag_start_y = ui->drag_end_y = y; |
1288 | ui->cur_visible = 0; | 1284 | ui->cur_visible = 0; |
1289 | 1285 | ||
1290 | return ""; /* UI activity occurred */ | 1286 | return UI_UPDATE; |
1291 | } | 1287 | } |
1292 | 1288 | ||
1293 | if (ui->dragging && button == ui->drag) { | 1289 | if (ui->dragging && button == ui->drag) { |
@@ -1316,7 +1312,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1316 | ui->drag_end_x = x; | 1312 | ui->drag_end_x = x; |
1317 | ui->drag_end_y = y; | 1313 | ui->drag_end_y = y; |
1318 | 1314 | ||
1319 | return ""; /* UI activity occurred */ | 1315 | return UI_UPDATE; |
1320 | } | 1316 | } |
1321 | 1317 | ||
1322 | if (ui->dragging && button == ui->release) { | 1318 | if (ui->dragging && button == ui->release) { |
@@ -1344,7 +1340,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1344 | x1, y1, x2-x1+1, y2-y1+1); | 1340 | x1, y1, x2-x1+1, y2-y1+1); |
1345 | return dupstr(buf); | 1341 | return dupstr(buf); |
1346 | } else | 1342 | } else |
1347 | return ""; /* UI activity occurred */ | 1343 | return UI_UPDATE; |
1348 | } | 1344 | } |
1349 | 1345 | ||
1350 | if (IS_CURSOR_MOVE(button)) { | 1346 | if (IS_CURSOR_MOVE(button)) { |
@@ -1352,12 +1348,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1352 | char buf[80]; | 1348 | char buf[80]; |
1353 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->common->w, state->common->h, 0); | 1349 | move_cursor(button, &ui->cur_x, &ui->cur_y, state->common->w, state->common->h, 0); |
1354 | ui->cur_visible = 1; | 1350 | ui->cur_visible = 1; |
1355 | if (!control && !shift) return ""; | 1351 | if (!control && !shift) return UI_UPDATE; |
1356 | 1352 | ||
1357 | newstate = control ? shift ? GRID_UNKNOWN : GRID_FULL : GRID_EMPTY; | 1353 | newstate = control ? shift ? GRID_UNKNOWN : GRID_FULL : GRID_EMPTY; |
1358 | if (state->grid[y * state->common->w + x] == newstate && | 1354 | if (state->grid[y * state->common->w + x] == newstate && |
1359 | state->grid[ui->cur_y * state->common->w + ui->cur_x] == newstate) | 1355 | state->grid[ui->cur_y * state->common->w + ui->cur_x] == newstate) |
1360 | return ""; | 1356 | return UI_UPDATE; |
1361 | 1357 | ||
1362 | sprintf(buf, "%c%d,%d,%d,%d", control ? shift ? 'U' : 'F' : 'E', | 1358 | sprintf(buf, "%c%d,%d,%d,%d", control ? shift ? 'U' : 'F' : 'E', |
1363 | min(x, ui->cur_x), min(y, ui->cur_y), | 1359 | min(x, ui->cur_x), min(y, ui->cur_y), |
@@ -1372,7 +1368,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1372 | 1368 | ||
1373 | if (!ui->cur_visible) { | 1369 | if (!ui->cur_visible) { |
1374 | ui->cur_visible = 1; | 1370 | ui->cur_visible = 1; |
1375 | return ""; | 1371 | return UI_UPDATE; |
1376 | } | 1372 | } |
1377 | 1373 | ||
1378 | if (button == CURSOR_SELECT2) | 1374 | if (button == CURSOR_SELECT2) |
@@ -2027,7 +2023,8 @@ int main(int argc, char **argv) | |||
2027 | { | 2023 | { |
2028 | game_params *p; | 2024 | game_params *p; |
2029 | game_state *s; | 2025 | game_state *s; |
2030 | char *id = NULL, *desc, *err; | 2026 | char *id = NULL, *desc; |
2027 | const char *err; | ||
2031 | 2028 | ||
2032 | while (--argc > 0) { | 2029 | while (--argc > 0) { |
2033 | char *p = *++argv; | 2030 | char *p = *++argv; |
diff --git a/apps/plugins/puzzles/src/pearl.c b/apps/plugins/puzzles/src/pearl.c index c6c305f3f2..4f3be50275 100644 --- a/apps/plugins/puzzles/src/pearl.c +++ b/apps/plugins/puzzles/src/pearl.c | |||
@@ -234,29 +234,24 @@ static config_item *game_configure(const game_params *params) | |||
234 | ret[0].name = "Width"; | 234 | ret[0].name = "Width"; |
235 | ret[0].type = C_STRING; | 235 | ret[0].type = C_STRING; |
236 | sprintf(buf, "%d", params->w); | 236 | sprintf(buf, "%d", params->w); |
237 | ret[0].sval = dupstr(buf); | 237 | ret[0].u.string.sval = dupstr(buf); |
238 | ret[0].ival = 0; | ||
239 | 238 | ||
240 | ret[1].name = "Height"; | 239 | ret[1].name = "Height"; |
241 | ret[1].type = C_STRING; | 240 | ret[1].type = C_STRING; |
242 | sprintf(buf, "%d", params->h); | 241 | sprintf(buf, "%d", params->h); |
243 | ret[1].sval = dupstr(buf); | 242 | ret[1].u.string.sval = dupstr(buf); |
244 | ret[1].ival = 0; | ||
245 | 243 | ||
246 | ret[2].name = "Difficulty"; | 244 | ret[2].name = "Difficulty"; |
247 | ret[2].type = C_CHOICES; | 245 | ret[2].type = C_CHOICES; |
248 | ret[2].sval = DIFFCONFIG; | 246 | ret[2].u.choices.choicenames = DIFFCONFIG; |
249 | ret[2].ival = params->difficulty; | 247 | ret[2].u.choices.selected = params->difficulty; |
250 | 248 | ||
251 | ret[3].name = "Allow unsoluble"; | 249 | ret[3].name = "Allow unsoluble"; |
252 | ret[3].type = C_BOOLEAN; | 250 | ret[3].type = C_BOOLEAN; |
253 | ret[3].sval = NULL; | 251 | ret[3].u.boolean.bval = params->nosolve; |
254 | ret[3].ival = params->nosolve; | ||
255 | 252 | ||
256 | ret[4].name = NULL; | 253 | ret[4].name = NULL; |
257 | ret[4].type = C_END; | 254 | ret[4].type = C_END; |
258 | ret[4].sval = NULL; | ||
259 | ret[4].ival = 0; | ||
260 | 255 | ||
261 | return ret; | 256 | return ret; |
262 | } | 257 | } |
@@ -265,15 +260,15 @@ static game_params *custom_params(const config_item *cfg) | |||
265 | { | 260 | { |
266 | game_params *ret = snew(game_params); | 261 | game_params *ret = snew(game_params); |
267 | 262 | ||
268 | ret->w = atoi(cfg[0].sval); | 263 | ret->w = atoi(cfg[0].u.string.sval); |
269 | ret->h = atoi(cfg[1].sval); | 264 | ret->h = atoi(cfg[1].u.string.sval); |
270 | ret->difficulty = cfg[2].ival; | 265 | ret->difficulty = cfg[2].u.choices.selected; |
271 | ret->nosolve = cfg[3].ival; | 266 | ret->nosolve = cfg[3].u.boolean.bval; |
272 | 267 | ||
273 | return ret; | 268 | return ret; |
274 | } | 269 | } |
275 | 270 | ||
276 | static char *validate_params(const game_params *params, int full) | 271 | static const char *validate_params(const game_params *params, int full) |
277 | { | 272 | { |
278 | if (params->w < 5) return "Width must be at least five"; | 273 | if (params->w < 5) return "Width must be at least five"; |
279 | if (params->h < 5) return "Height must be at least five"; | 274 | if (params->h < 5) return "Height must be at least five"; |
@@ -1392,7 +1387,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1392 | return desc; | 1387 | return desc; |
1393 | } | 1388 | } |
1394 | 1389 | ||
1395 | static char *validate_desc(const game_params *params, const char *desc) | 1390 | static const char *validate_desc(const game_params *params, const char *desc) |
1396 | { | 1391 | { |
1397 | int i, sizesofar; | 1392 | int i, sizesofar; |
1398 | const int totalsize = params->w * params->h; | 1393 | const int totalsize = params->w * params->h; |
@@ -1726,7 +1721,7 @@ static char *solve_for_diff(game_state *state, char *old_lines, char *new_lines) | |||
1726 | } | 1721 | } |
1727 | 1722 | ||
1728 | static char *solve_game(const game_state *state, const game_state *currstate, | 1723 | static char *solve_game(const game_state *state, const game_state *currstate, |
1729 | const char *aux, char **error) | 1724 | const char *aux, const char **error) |
1730 | { | 1725 | { |
1731 | game_state *solved = dup_game(state); | 1726 | game_state *solved = dup_game(state); |
1732 | int i, ret, sz = state->shared->sz; | 1727 | int i, ret, sz = state->shared->sz; |
@@ -2022,11 +2017,11 @@ static char *mark_in_direction(const game_state *state, int x, int y, int dir, | |||
2022 | 2017 | ||
2023 | char ch = primary ? 'F' : 'M', *other; | 2018 | char ch = primary ? 'F' : 'M', *other; |
2024 | 2019 | ||
2025 | if (!INGRID(state, x, y) || !INGRID(state, x2, y2)) return ""; | 2020 | if (!INGRID(state, x, y) || !INGRID(state, x2, y2)) return UI_UPDATE; |
2026 | 2021 | ||
2027 | /* disallow laying a mark over a line, or vice versa. */ | 2022 | /* disallow laying a mark over a line, or vice versa. */ |
2028 | other = primary ? state->marks : state->lines; | 2023 | other = primary ? state->marks : state->lines; |
2029 | if (other[y*w+x] & dir || other[y2*w+x2] & dir2) return ""; | 2024 | if (other[y*w+x] & dir || other[y2*w+x2] & dir2) return UI_UPDATE; |
2030 | 2025 | ||
2031 | sprintf(buf, "%c%d,%d,%d;%c%d,%d,%d", ch, dir, x, y, ch, dir2, x2, y2); | 2026 | sprintf(buf, "%c%d,%d,%d;%c%d,%d,%d", ch, dir, x, y, ch, dir2, x2, y2); |
2032 | return dupstr(buf); | 2027 | return dupstr(buf); |
@@ -2060,12 +2055,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2060 | ui->dragcoords[0] = gy * w + gx; | 2055 | ui->dragcoords[0] = gy * w + gx; |
2061 | ui->ndragcoords = 0; /* will be 1 once drag is confirmed */ | 2056 | ui->ndragcoords = 0; /* will be 1 once drag is confirmed */ |
2062 | 2057 | ||
2063 | return ""; | 2058 | return UI_UPDATE; |
2064 | } | 2059 | } |
2065 | 2060 | ||
2066 | if (button == LEFT_DRAG && ui->ndragcoords >= 0) { | 2061 | if (button == LEFT_DRAG && ui->ndragcoords >= 0) { |
2067 | update_ui_drag(state, ui, gx, gy); | 2062 | update_ui_drag(state, ui, gx, gy); |
2068 | return ""; | 2063 | return UI_UPDATE; |
2069 | } | 2064 | } |
2070 | 2065 | ||
2071 | if (IS_MOUSE_RELEASE(button)) release = TRUE; | 2066 | if (IS_MOUSE_RELEASE(button)) release = TRUE; |
@@ -2087,30 +2082,30 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2087 | if (ui->ndragcoords >= 0) | 2082 | if (ui->ndragcoords >= 0) |
2088 | update_ui_drag(state, ui, ui->curx, ui->cury); | 2083 | update_ui_drag(state, ui, ui->curx, ui->cury); |
2089 | } | 2084 | } |
2090 | return ""; | 2085 | return UI_UPDATE; |
2091 | } | 2086 | } |
2092 | 2087 | ||
2093 | if (IS_CURSOR_SELECT(button)) { | 2088 | if (IS_CURSOR_SELECT(button)) { |
2094 | if (!ui->cursor_active) { | 2089 | if (!ui->cursor_active) { |
2095 | ui->cursor_active = TRUE; | 2090 | ui->cursor_active = TRUE; |
2096 | return ""; | 2091 | return UI_UPDATE; |
2097 | } else if (button == CURSOR_SELECT) { | 2092 | } else if (button == CURSOR_SELECT) { |
2098 | if (ui->ndragcoords == -1) { | 2093 | if (ui->ndragcoords == -1) { |
2099 | ui->ndragcoords = 0; | 2094 | ui->ndragcoords = 0; |
2100 | ui->dragcoords[0] = ui->cury * w + ui->curx; | 2095 | ui->dragcoords[0] = ui->cury * w + ui->curx; |
2101 | ui->clickx = CENTERED_COORD(ui->curx); | 2096 | ui->clickx = CENTERED_COORD(ui->curx); |
2102 | ui->clicky = CENTERED_COORD(ui->cury); | 2097 | ui->clicky = CENTERED_COORD(ui->cury); |
2103 | return ""; | 2098 | return UI_UPDATE; |
2104 | } else release = TRUE; | 2099 | } else release = TRUE; |
2105 | } else if (button == CURSOR_SELECT2 && ui->ndragcoords >= 0) { | 2100 | } else if (button == CURSOR_SELECT2 && ui->ndragcoords >= 0) { |
2106 | ui->ndragcoords = -1; | 2101 | ui->ndragcoords = -1; |
2107 | return ""; | 2102 | return UI_UPDATE; |
2108 | } | 2103 | } |
2109 | } | 2104 | } |
2110 | 2105 | ||
2111 | if (button == 27 || button == '\b') { | 2106 | if (button == 27 || button == '\b') { |
2112 | ui->ndragcoords = -1; | 2107 | ui->ndragcoords = -1; |
2113 | return ""; | 2108 | return UI_UPDATE; |
2114 | } | 2109 | } |
2115 | 2110 | ||
2116 | if (release) { | 2111 | if (release) { |
@@ -2142,7 +2137,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2142 | 2137 | ||
2143 | ui->ndragcoords = -1; | 2138 | ui->ndragcoords = -1; |
2144 | 2139 | ||
2145 | return buf ? buf : ""; | 2140 | return buf ? buf : UI_UPDATE; |
2146 | } else if (ui->ndragcoords == 0) { | 2141 | } else if (ui->ndragcoords == 0) { |
2147 | /* Click (or tiny drag). Work out which edge we were | 2142 | /* Click (or tiny drag). Work out which edge we were |
2148 | * closest to. */ | 2143 | * closest to. */ |
@@ -2163,12 +2158,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2163 | cx = CENTERED_COORD(gx); | 2158 | cx = CENTERED_COORD(gx); |
2164 | cy = CENTERED_COORD(gy); | 2159 | cy = CENTERED_COORD(gy); |
2165 | 2160 | ||
2166 | if (!INGRID(state, gx, gy)) return ""; | 2161 | if (!INGRID(state, gx, gy)) return UI_UPDATE; |
2167 | 2162 | ||
2168 | if (max(abs(x-cx),abs(y-cy)) < TILE_SIZE/4) { | 2163 | if (max(abs(x-cx),abs(y-cy)) < TILE_SIZE/4) { |
2169 | /* TODO closer to centre of grid: process as a cell click not an edge click. */ | 2164 | /* TODO closer to centre of grid: process as a cell click not an edge click. */ |
2170 | 2165 | ||
2171 | return ""; | 2166 | return UI_UPDATE; |
2172 | } else { | 2167 | } else { |
2173 | int direction; | 2168 | int direction; |
2174 | if (abs(x-cx) < abs(y-cy)) { | 2169 | if (abs(x-cx) < abs(y-cy)) { |
@@ -2712,7 +2707,8 @@ int main(int argc, const char *argv[]) | |||
2712 | game_params *p = NULL; | 2707 | game_params *p = NULL; |
2713 | random_state *rs = NULL; | 2708 | random_state *rs = NULL; |
2714 | time_t seed = time(NULL); | 2709 | time_t seed = time(NULL); |
2715 | char *id = NULL, *err; | 2710 | char *id = NULL; |
2711 | const char *err; | ||
2716 | 2712 | ||
2717 | setvbuf(stdout, NULL, _IONBF, 0); | 2713 | setvbuf(stdout, NULL, _IONBF, 0); |
2718 | 2714 | ||
diff --git a/apps/plugins/puzzles/src/pegs.c b/apps/plugins/puzzles/src/pegs.c index 8286851954..565ba9417f 100644 --- a/apps/plugins/puzzles/src/pegs.c +++ b/apps/plugins/puzzles/src/pegs.c | |||
@@ -149,24 +149,20 @@ static config_item *game_configure(const game_params *params) | |||
149 | ret[0].name = "Width"; | 149 | ret[0].name = "Width"; |
150 | ret[0].type = C_STRING; | 150 | ret[0].type = C_STRING; |
151 | sprintf(buf, "%d", params->w); | 151 | sprintf(buf, "%d", params->w); |
152 | ret[0].sval = dupstr(buf); | 152 | ret[0].u.string.sval = dupstr(buf); |
153 | ret[0].ival = 0; | ||
154 | 153 | ||
155 | ret[1].name = "Height"; | 154 | ret[1].name = "Height"; |
156 | ret[1].type = C_STRING; | 155 | ret[1].type = C_STRING; |
157 | sprintf(buf, "%d", params->h); | 156 | sprintf(buf, "%d", params->h); |
158 | ret[1].sval = dupstr(buf); | 157 | ret[1].u.string.sval = dupstr(buf); |
159 | ret[1].ival = 0; | ||
160 | 158 | ||
161 | ret[2].name = "Board type"; | 159 | ret[2].name = "Board type"; |
162 | ret[2].type = C_CHOICES; | 160 | ret[2].type = C_CHOICES; |
163 | ret[2].sval = TYPECONFIG; | 161 | ret[2].u.choices.choicenames = TYPECONFIG; |
164 | ret[2].ival = params->type; | 162 | ret[2].u.choices.selected = params->type; |
165 | 163 | ||
166 | ret[3].name = NULL; | 164 | ret[3].name = NULL; |
167 | ret[3].type = C_END; | 165 | ret[3].type = C_END; |
168 | ret[3].sval = NULL; | ||
169 | ret[3].ival = 0; | ||
170 | 166 | ||
171 | return ret; | 167 | return ret; |
172 | } | 168 | } |
@@ -175,14 +171,14 @@ static game_params *custom_params(const config_item *cfg) | |||
175 | { | 171 | { |
176 | game_params *ret = snew(game_params); | 172 | game_params *ret = snew(game_params); |
177 | 173 | ||
178 | ret->w = atoi(cfg[0].sval); | 174 | ret->w = atoi(cfg[0].u.string.sval); |
179 | ret->h = atoi(cfg[1].sval); | 175 | ret->h = atoi(cfg[1].u.string.sval); |
180 | ret->type = cfg[2].ival; | 176 | ret->type = cfg[2].u.choices.selected; |
181 | 177 | ||
182 | return ret; | 178 | return ret; |
183 | } | 179 | } |
184 | 180 | ||
185 | static char *validate_params(const game_params *params, int full) | 181 | static const char *validate_params(const game_params *params, int full) |
186 | { | 182 | { |
187 | if (full && (params->w <= 3 || params->h <= 3)) | 183 | if (full && (params->w <= 3 || params->h <= 3)) |
188 | return "Width and height must both be greater than three"; | 184 | return "Width and height must both be greater than three"; |
@@ -660,7 +656,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
660 | return ret; | 656 | return ret; |
661 | } | 657 | } |
662 | 658 | ||
663 | static char *validate_desc(const game_params *params, const char *desc) | 659 | static const char *validate_desc(const game_params *params, const char *desc) |
664 | { | 660 | { |
665 | int len = params->w * params->h; | 661 | int len = params->w * params->h; |
666 | 662 | ||
@@ -711,7 +707,7 @@ static void free_game(game_state *state) | |||
711 | } | 707 | } |
712 | 708 | ||
713 | static char *solve_game(const game_state *state, const game_state *currstate, | 709 | static char *solve_game(const game_state *state, const game_state *currstate, |
714 | const char *aux, char **error) | 710 | const char *aux, const char **error) |
715 | { | 711 | { |
716 | return NULL; | 712 | return NULL; |
717 | } | 713 | } |
@@ -848,7 +844,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
848 | ui->dx = x; | 844 | ui->dx = x; |
849 | ui->dy = y; | 845 | ui->dy = y; |
850 | ui->cur_visible = ui->cur_jumping = 0; | 846 | ui->cur_visible = ui->cur_jumping = 0; |
851 | return ""; /* ui modified */ | 847 | return UI_UPDATE; |
852 | } | 848 | } |
853 | } else if (button == LEFT_DRAG && ui->dragging) { | 849 | } else if (button == LEFT_DRAG && ui->dragging) { |
854 | /* | 850 | /* |
@@ -856,7 +852,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
856 | */ | 852 | */ |
857 | ui->dx = x; | 853 | ui->dx = x; |
858 | ui->dy = y; | 854 | ui->dy = y; |
859 | return ""; /* ui modified */ | 855 | return UI_UPDATE; |
860 | } else if (button == LEFT_RELEASE && ui->dragging) { | 856 | } else if (button == LEFT_RELEASE && ui->dragging) { |
861 | int tx, ty, dx, dy; | 857 | int tx, ty, dx, dy; |
862 | 858 | ||
@@ -868,18 +864,18 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
868 | tx = FROMCOORD(x); | 864 | tx = FROMCOORD(x); |
869 | ty = FROMCOORD(y); | 865 | ty = FROMCOORD(y); |
870 | if (tx < 0 || tx >= w || ty < 0 || ty >= h) | 866 | if (tx < 0 || tx >= w || ty < 0 || ty >= h) |
871 | return ""; /* target out of range */ | 867 | return UI_UPDATE; /* target out of range */ |
872 | dx = tx - ui->sx; | 868 | dx = tx - ui->sx; |
873 | dy = ty - ui->sy; | 869 | dy = ty - ui->sy; |
874 | if (max(abs(dx),abs(dy)) != 2 || min(abs(dx),abs(dy)) != 0) | 870 | if (max(abs(dx),abs(dy)) != 2 || min(abs(dx),abs(dy)) != 0) |
875 | return ""; /* move length was wrong */ | 871 | return UI_UPDATE; /* move length was wrong */ |
876 | dx /= 2; | 872 | dx /= 2; |
877 | dy /= 2; | 873 | dy /= 2; |
878 | 874 | ||
879 | if (state->grid[ty*w+tx] != GRID_HOLE || | 875 | if (state->grid[ty*w+tx] != GRID_HOLE || |
880 | state->grid[(ty-dy)*w+(tx-dx)] != GRID_PEG || | 876 | state->grid[(ty-dy)*w+(tx-dx)] != GRID_PEG || |
881 | state->grid[ui->sy*w+ui->sx] != GRID_PEG) | 877 | state->grid[ui->sy*w+ui->sx] != GRID_PEG) |
882 | return ""; /* grid contents were invalid */ | 878 | return UI_UPDATE; /* grid contents were invalid */ |
883 | 879 | ||
884 | /* | 880 | /* |
885 | * We have a valid move. Encode it simply as source and | 881 | * We have a valid move. Encode it simply as source and |
@@ -899,7 +895,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
899 | ui->cur_x = cx; | 895 | ui->cur_x = cx; |
900 | ui->cur_y = cy; | 896 | ui->cur_y = cy; |
901 | } | 897 | } |
902 | return ""; | 898 | return UI_UPDATE; |
903 | } else { | 899 | } else { |
904 | int dx, dy, mx, my, jx, jy; | 900 | int dx, dy, mx, my, jx, jy; |
905 | 901 | ||
@@ -922,21 +918,21 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
922 | ui->cur_x = jx; ui->cur_y = jy; | 918 | ui->cur_x = jx; ui->cur_y = jy; |
923 | return dupstr(buf); | 919 | return dupstr(buf); |
924 | } | 920 | } |
925 | return ""; | 921 | return UI_UPDATE; |
926 | } | 922 | } |
927 | } else if (IS_CURSOR_SELECT(button)) { | 923 | } else if (IS_CURSOR_SELECT(button)) { |
928 | if (!ui->cur_visible) { | 924 | if (!ui->cur_visible) { |
929 | ui->cur_visible = 1; | 925 | ui->cur_visible = 1; |
930 | return ""; | 926 | return UI_UPDATE; |
931 | } | 927 | } |
932 | if (ui->cur_jumping) { | 928 | if (ui->cur_jumping) { |
933 | ui->cur_jumping = 0; | 929 | ui->cur_jumping = 0; |
934 | return ""; | 930 | return UI_UPDATE; |
935 | } | 931 | } |
936 | if (state->grid[ui->cur_y*w+ui->cur_x] == GRID_PEG) { | 932 | if (state->grid[ui->cur_y*w+ui->cur_x] == GRID_PEG) { |
937 | /* cursor is on peg: next arrow-move wil jump. */ | 933 | /* cursor is on peg: next arrow-move wil jump. */ |
938 | ui->cur_jumping = 1; | 934 | ui->cur_jumping = 1; |
939 | return ""; | 935 | return UI_UPDATE; |
940 | } | 936 | } |
941 | return NULL; | 937 | return NULL; |
942 | } | 938 | } |
diff --git a/apps/plugins/puzzles/src/ps.c b/apps/plugins/puzzles/src/ps.c index 2394cc5e8e..ac021aa80a 100644 --- a/apps/plugins/puzzles/src/ps.c +++ b/apps/plugins/puzzles/src/ps.c | |||
@@ -21,7 +21,7 @@ struct psdata { | |||
21 | drawing *drawing; | 21 | drawing *drawing; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | static void ps_printf(psdata *ps, char *fmt, ...) | 24 | static void ps_printf(psdata *ps, const char *fmt, ...) |
25 | { | 25 | { |
26 | va_list ap; | 26 | va_list ap; |
27 | 27 | ||
@@ -73,7 +73,7 @@ static void ps_fill(psdata *ps, int colour) | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | 75 | ||
76 | static void ps_setcolour_internal(psdata *ps, int colour, char *suffix) | 76 | static void ps_setcolour_internal(psdata *ps, int colour, const char *suffix) |
77 | { | 77 | { |
78 | int hatch; | 78 | int hatch; |
79 | float r, g, b; | 79 | float r, g, b; |
@@ -102,7 +102,8 @@ static void ps_stroke(psdata *ps, int colour) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static void ps_draw_text(void *handle, int x, int y, int fonttype, | 104 | static void ps_draw_text(void *handle, int x, int y, int fonttype, |
105 | int fontsize, int align, int colour, char *text) | 105 | int fontsize, int align, int colour, |
106 | const char *text) | ||
106 | { | 107 | { |
107 | psdata *ps = (psdata *)handle; | 108 | psdata *ps = (psdata *)handle; |
108 | 109 | ||
diff --git a/apps/plugins/puzzles/src/puzzles.h b/apps/plugins/puzzles/src/puzzles.h index 73b31ea7f9..47f4b7edd5 100644 --- a/apps/plugins/puzzles/src/puzzles.h +++ b/apps/plugins/puzzles/src/puzzles.h | |||
@@ -137,30 +137,36 @@ typedef struct psdata psdata; | |||
137 | */ | 137 | */ |
138 | enum { C_STRING, C_CHOICES, C_BOOLEAN, C_END }; | 138 | enum { C_STRING, C_CHOICES, C_BOOLEAN, C_END }; |
139 | struct config_item { | 139 | struct config_item { |
140 | /* | 140 | /* Not dynamically allocated */ |
141 | * `name' is never dynamically allocated. | 141 | const char *name; |
142 | */ | 142 | /* Value from the above C_* enum */ |
143 | char *name; | ||
144 | /* | ||
145 | * `type' contains one of the above values. | ||
146 | */ | ||
147 | int type; | 143 | int type; |
148 | /* | 144 | union { |
149 | * For C_STRING, `sval' is always dynamically allocated and | 145 | struct { /* if type == C_STRING */ |
150 | * non-NULL. For C_BOOLEAN and C_END, `sval' is always NULL. | 146 | /* Always dynamically allocated and non-NULL */ |
151 | * For C_CHOICES, `sval' is non-NULL, _not_ dynamically | 147 | char *sval; |
152 | * allocated, and contains a set of option strings separated by | 148 | } string; |
153 | * a delimiter. The delimeter is also the first character in | 149 | struct { /* if type == C_CHOICES */ |
154 | * the string, so for example ":Foo:Bar:Baz" gives three | 150 | /* |
155 | * options `Foo', `Bar' and `Baz'. | 151 | * choicenames is non-NULL, not dynamically allocated, and |
156 | */ | 152 | * contains a set of option strings separated by a |
157 | char *sval; | 153 | * delimiter. The delimiter is also the first character in |
158 | /* | 154 | * the string, so for example ":Foo:Bar:Baz" gives three |
159 | * For C_BOOLEAN, this is TRUE or FALSE. For C_CHOICES, it | 155 | * options `Foo', `Bar' and `Baz'. |
160 | * indicates the chosen index from the `sval' list. In the | 156 | */ |
161 | * above example, 0==Foo, 1==Bar and 2==Baz. | 157 | const char *choicenames; |
162 | */ | 158 | /* |
163 | int ival; | 159 | * Indicates the chosen index from the options in |
160 | * choicenames. In the above example, 0==Foo, 1==Bar and | ||
161 | * 2==Baz. | ||
162 | */ | ||
163 | int selected; | ||
164 | } choices; | ||
165 | struct { | ||
166 | /* just TRUE or FALSE */ | ||
167 | int bval; | ||
168 | } boolean; | ||
169 | } u; | ||
164 | }; | 170 | }; |
165 | 171 | ||
166 | /* | 172 | /* |
@@ -218,12 +224,12 @@ game_params *preset_menu_lookup_by_id(struct preset_menu *menu, int id); | |||
218 | /* We can't use #ifdef DEBUG, because Cygwin defines it by default. */ | 224 | /* We can't use #ifdef DEBUG, because Cygwin defines it by default. */ |
219 | #ifdef DEBUGGING | 225 | #ifdef DEBUGGING |
220 | #define debug(x) (debug_printf x) | 226 | #define debug(x) (debug_printf x) |
221 | void debug_printf(char *fmt, ...); | 227 | void debug_printf(const char *fmt, ...); |
222 | #else | 228 | #else |
223 | #define debug(x) | 229 | #define debug(x) |
224 | #endif | 230 | #endif |
225 | 231 | ||
226 | void fatal(char *fmt, ...); | 232 | void fatal(const char *fmt, ...); |
227 | void frontend_default_colour(frontend *fe, float *output); | 233 | void frontend_default_colour(frontend *fe, float *output); |
228 | void deactivate_timer(frontend *fe); | 234 | void deactivate_timer(frontend *fe); |
229 | void activate_timer(frontend *fe); | 235 | void activate_timer(frontend *fe); |
@@ -235,7 +241,7 @@ void get_random_seed(void **randseed, int *randseedsize); | |||
235 | drawing *drawing_new(const drawing_api *api, midend *me, void *handle); | 241 | drawing *drawing_new(const drawing_api *api, midend *me, void *handle); |
236 | void drawing_free(drawing *dr); | 242 | void drawing_free(drawing *dr); |
237 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, | 243 | void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize, |
238 | int align, int colour, char *text); | 244 | int align, int colour, const char *text); |
239 | void draw_rect(drawing *dr, int x, int y, int w, int h, int colour); | 245 | void draw_rect(drawing *dr, int x, int y, int w, int h, int colour); |
240 | void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour); | 246 | void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour); |
241 | void draw_polygon(drawing *dr, int *coords, int npoints, | 247 | void draw_polygon(drawing *dr, int *coords, int npoints, |
@@ -250,7 +256,7 @@ void start_draw(drawing *dr); | |||
250 | void draw_update(drawing *dr, int x, int y, int w, int h); | 256 | void draw_update(drawing *dr, int x, int y, int w, int h); |
251 | void end_draw(drawing *dr); | 257 | void end_draw(drawing *dr); |
252 | char *text_fallback(drawing *dr, const char *const *strings, int nstrings); | 258 | char *text_fallback(drawing *dr, const char *const *strings, int nstrings); |
253 | void status_bar(drawing *dr, char *text); | 259 | void status_bar(drawing *dr, const char *text); |
254 | blitter *blitter_new(drawing *dr, int w, int h); | 260 | blitter *blitter_new(drawing *dr, int w, int h); |
255 | void blitter_free(drawing *dr, blitter *bl); | 261 | void blitter_free(drawing *dr, blitter *bl); |
256 | /* save puts the portion of the current display with top-left corner | 262 | /* save puts the portion of the current display with top-left corner |
@@ -305,29 +311,31 @@ int midend_which_preset(midend *me); | |||
305 | int midend_wants_statusbar(midend *me); | 311 | int midend_wants_statusbar(midend *me); |
306 | enum { CFG_SETTINGS, CFG_SEED, CFG_DESC, CFG_FRONTEND_SPECIFIC }; | 312 | enum { CFG_SETTINGS, CFG_SEED, CFG_DESC, CFG_FRONTEND_SPECIFIC }; |
307 | config_item *midend_get_config(midend *me, int which, char **wintitle); | 313 | config_item *midend_get_config(midend *me, int which, char **wintitle); |
308 | char *midend_set_config(midend *me, int which, config_item *cfg); | 314 | const char *midend_set_config(midend *me, int which, config_item *cfg); |
309 | char *midend_game_id(midend *me, char *id); | 315 | const char *midend_game_id(midend *me, const char *id); |
310 | char *midend_get_game_id(midend *me); | 316 | char *midend_get_game_id(midend *me); |
311 | char *midend_get_random_seed(midend *me); | 317 | char *midend_get_random_seed(midend *me); |
312 | int midend_can_format_as_text_now(midend *me); | 318 | int midend_can_format_as_text_now(midend *me); |
313 | char *midend_text_format(midend *me); | 319 | char *midend_text_format(midend *me); |
314 | char *midend_solve(midend *me); | 320 | const char *midend_solve(midend *me); |
315 | int midend_status(midend *me); | 321 | int midend_status(midend *me); |
316 | int midend_can_undo(midend *me); | 322 | int midend_can_undo(midend *me); |
317 | int midend_can_redo(midend *me); | 323 | int midend_can_redo(midend *me); |
318 | void midend_supersede_game_desc(midend *me, char *desc, char *privdesc); | 324 | void midend_supersede_game_desc(midend *me, const char *desc, |
319 | char *midend_rewrite_statusbar(midend *me, char *text); | 325 | const char *privdesc); |
326 | char *midend_rewrite_statusbar(midend *me, const char *text); | ||
320 | void midend_serialise(midend *me, | 327 | void midend_serialise(midend *me, |
321 | void (*write)(void *ctx, void *buf, int len), | 328 | void (*write)(void *ctx, const void *buf, int len), |
322 | void *wctx); | 329 | void *wctx); |
323 | char *midend_deserialise(midend *me, | 330 | const char *midend_deserialise(midend *me, |
324 | int (*read)(void *ctx, void *buf, int len), | 331 | int (*read)(void *ctx, void *buf, int len), |
325 | void *rctx); | 332 | void *rctx); |
326 | char *identify_game(char **name, int (*read)(void *ctx, void *buf, int len), | 333 | const char *identify_game(char **name, |
327 | void *rctx); | 334 | int (*read)(void *ctx, void *buf, int len), |
335 | void *rctx); | ||
328 | void midend_request_id_changes(midend *me, void (*notify)(void *), void *ctx); | 336 | void midend_request_id_changes(midend *me, void (*notify)(void *), void *ctx); |
329 | /* Printing functions supplied by the mid-end */ | 337 | /* Printing functions supplied by the mid-end */ |
330 | char *midend_print_puzzle(midend *me, document *doc, int with_soln); | 338 | const char *midend_print_puzzle(midend *me, document *doc, int with_soln); |
331 | int midend_tilesize(midend *me); | 339 | int midend_tilesize(midend *me); |
332 | 340 | ||
333 | /* | 341 | /* |
@@ -385,7 +393,7 @@ void pos2c(int w, int h, int pos, int *cx, int *cy); | |||
385 | * by one pixel; useful for highlighting. Outline is omitted if -1. */ | 393 | * by one pixel; useful for highlighting. Outline is omitted if -1. */ |
386 | void draw_text_outline(drawing *dr, int x, int y, int fonttype, | 394 | void draw_text_outline(drawing *dr, int x, int y, int fonttype, |
387 | int fontsize, int align, | 395 | int fontsize, int align, |
388 | int text_colour, int outline_colour, char *text); | 396 | int text_colour, int outline_colour, const char *text); |
389 | 397 | ||
390 | /* Copies text left-justified with spaces. Length of string must be | 398 | /* Copies text left-justified with spaces. Length of string must be |
391 | * less than buffer size. */ | 399 | * less than buffer size. */ |
@@ -587,17 +595,17 @@ struct game { | |||
587 | int can_configure; | 595 | int can_configure; |
588 | config_item *(*configure)(const game_params *params); | 596 | config_item *(*configure)(const game_params *params); |
589 | game_params *(*custom_params)(const config_item *cfg); | 597 | game_params *(*custom_params)(const config_item *cfg); |
590 | char *(*validate_params)(const game_params *params, int full); | 598 | const char *(*validate_params)(const game_params *params, int full); |
591 | char *(*new_desc)(const game_params *params, random_state *rs, | 599 | char *(*new_desc)(const game_params *params, random_state *rs, |
592 | char **aux, int interactive); | 600 | char **aux, int interactive); |
593 | char *(*validate_desc)(const game_params *params, const char *desc); | 601 | const char *(*validate_desc)(const game_params *params, const char *desc); |
594 | game_state *(*new_game)(midend *me, const game_params *params, | 602 | game_state *(*new_game)(midend *me, const game_params *params, |
595 | const char *desc); | 603 | const char *desc); |
596 | game_state *(*dup_game)(const game_state *state); | 604 | game_state *(*dup_game)(const game_state *state); |
597 | void (*free_game)(game_state *state); | 605 | void (*free_game)(game_state *state); |
598 | int can_solve; | 606 | int can_solve; |
599 | char *(*solve)(const game_state *orig, const game_state *curr, | 607 | char *(*solve)(const game_state *orig, const game_state *curr, |
600 | const char *aux, char **error); | 608 | const char *aux, const char **error); |
601 | int can_format_as_text_ever; | 609 | int can_format_as_text_ever; |
602 | int (*can_format_as_text_now)(const game_params *params); | 610 | int (*can_format_as_text_now)(const game_params *params); |
603 | char *(*text_format)(const game_state *state); | 611 | char *(*text_format)(const game_state *state); |
@@ -642,7 +650,7 @@ struct game { | |||
642 | */ | 650 | */ |
643 | struct drawing_api { | 651 | struct drawing_api { |
644 | void (*draw_text)(void *handle, int x, int y, int fonttype, int fontsize, | 652 | void (*draw_text)(void *handle, int x, int y, int fonttype, int fontsize, |
645 | int align, int colour, char *text); | 653 | int align, int colour, const char *text); |
646 | void (*draw_rect)(void *handle, int x, int y, int w, int h, int colour); | 654 | void (*draw_rect)(void *handle, int x, int y, int w, int h, int colour); |
647 | void (*draw_line)(void *handle, int x1, int y1, int x2, int y2, | 655 | void (*draw_line)(void *handle, int x1, int y1, int x2, int y2, |
648 | int colour); | 656 | int colour); |
@@ -655,7 +663,7 @@ struct drawing_api { | |||
655 | void (*unclip)(void *handle); | 663 | void (*unclip)(void *handle); |
656 | void (*start_draw)(void *handle); | 664 | void (*start_draw)(void *handle); |
657 | void (*end_draw)(void *handle); | 665 | void (*end_draw)(void *handle); |
658 | void (*status_bar)(void *handle, char *text); | 666 | void (*status_bar)(void *handle, const char *text); |
659 | blitter *(*blitter_new)(void *handle, int w, int h); | 667 | blitter *(*blitter_new)(void *handle, int w, int h); |
660 | void (*blitter_free)(void *handle, blitter *bl); | 668 | void (*blitter_free)(void *handle, blitter *bl); |
661 | void (*blitter_save)(void *handle, blitter *bl, int x, int y); | 669 | void (*blitter_save)(void *handle, blitter *bl, int x, int y); |
@@ -688,6 +696,14 @@ extern const int gamecount; | |||
688 | extern const game thegame; | 696 | extern const game thegame; |
689 | #endif | 697 | #endif |
690 | 698 | ||
699 | /* | ||
700 | * Special string value to return from interpret_move in the case | ||
701 | * where the game UI has been updated but no actual move is being | ||
702 | * appended to the undo chain. Must be declared as a non-const char, | ||
703 | * but should never actually be modified by anyone. | ||
704 | */ | ||
705 | extern char UI_UPDATE[]; | ||
706 | |||
691 | /* A little bit of help to lazy developers */ | 707 | /* A little bit of help to lazy developers */ |
692 | #define DEFAULT_STATUSBAR_TEXT "Use status_bar() to fill this in." | 708 | #define DEFAULT_STATUSBAR_TEXT "Use status_bar() to fill this in." |
693 | 709 | ||
diff --git a/apps/plugins/puzzles/src/range.c b/apps/plugins/puzzles/src/range.c index 4dd39b97cd..41c6a352d3 100644 --- a/apps/plugins/puzzles/src/range.c +++ b/apps/plugins/puzzles/src/range.c | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | #define setmember(obj, field) ( (obj) . field = field ) | 67 | #define setmember(obj, field) ( (obj) . field = field ) |
68 | 68 | ||
69 | static char *nfmtstr(int n, char *fmt, ...) { | 69 | static char *nfmtstr(int n, const char *fmt, ...) { |
70 | va_list va; | 70 | va_list va; |
71 | char *ret = snewn(n+1, char); | 71 | char *ret = snewn(n+1, char); |
72 | va_start(va, fmt); | 72 | va_start(va, fmt); |
@@ -170,18 +170,14 @@ static config_item *game_configure(const game_params *params) | |||
170 | 170 | ||
171 | ret[0].name = "Width"; | 171 | ret[0].name = "Width"; |
172 | ret[0].type = C_STRING; | 172 | ret[0].type = C_STRING; |
173 | ret[0].sval = nfmtstr(10, "%d", params->w); | 173 | ret[0].u.string.sval = nfmtstr(10, "%d", params->w); |
174 | ret[0].ival = 0; | ||
175 | 174 | ||
176 | ret[1].name = "Height"; | 175 | ret[1].name = "Height"; |
177 | ret[1].type = C_STRING; | 176 | ret[1].type = C_STRING; |
178 | ret[1].sval = nfmtstr(10, "%d", params->h); | 177 | ret[1].u.string.sval = nfmtstr(10, "%d", params->h); |
179 | ret[1].ival = 0; | ||
180 | 178 | ||
181 | ret[2].name = NULL; | 179 | ret[2].name = NULL; |
182 | ret[2].type = C_END; | 180 | ret[2].type = C_END; |
183 | ret[2].sval = NULL; | ||
184 | ret[2].ival = 0; | ||
185 | 181 | ||
186 | return ret; | 182 | return ret; |
187 | } | 183 | } |
@@ -189,8 +185,8 @@ static config_item *game_configure(const game_params *params) | |||
189 | static game_params *custom_params(const config_item *configuration) | 185 | static game_params *custom_params(const config_item *configuration) |
190 | { | 186 | { |
191 | game_params *ret = snew(game_params); | 187 | game_params *ret = snew(game_params); |
192 | ret->w = atoi(configuration[0].sval); | 188 | ret->w = atoi(configuration[0].u.string.sval); |
193 | ret->h = atoi(configuration[1].sval); | 189 | ret->h = atoi(configuration[1].u.string.sval); |
194 | return ret; | 190 | return ret; |
195 | } | 191 | } |
196 | 192 | ||
@@ -312,7 +308,7 @@ enum { | |||
312 | static move *solve_internal(const game_state *state, move *base, int diff); | 308 | static move *solve_internal(const game_state *state, move *base, int diff); |
313 | 309 | ||
314 | static char *solve_game(const game_state *orig, const game_state *curpos, | 310 | static char *solve_game(const game_state *orig, const game_state *curpos, |
315 | const char *aux, char **error) | 311 | const char *aux, const char **error) |
316 | { | 312 | { |
317 | int const n = orig->params.w * orig->params.h; | 313 | int const n = orig->params.w * orig->params.h; |
318 | move *const base = snewn(n, move); | 314 | move *const base = snewn(n, move); |
@@ -910,7 +906,7 @@ static int dfs_count_white(game_state *state, int cell) | |||
910 | return k; | 906 | return k; |
911 | } | 907 | } |
912 | 908 | ||
913 | static char *validate_params(const game_params *params, int full) | 909 | static const char *validate_params(const game_params *params, int full) |
914 | { | 910 | { |
915 | int const w = params->w, h = params->h; | 911 | int const w = params->w, h = params->h; |
916 | if (w < 1) return "Error: width is less than 1"; | 912 | if (w < 1) return "Error: width is less than 1"; |
@@ -1077,7 +1073,7 @@ static char *newdesc_encode_game_description(int area, puzzle_size *grid) | |||
1077 | return desc; | 1073 | return desc; |
1078 | } | 1074 | } |
1079 | 1075 | ||
1080 | static char *validate_desc(const game_params *params, const char *desc) | 1076 | static const char *validate_desc(const game_params *params, const char *desc) |
1081 | { | 1077 | { |
1082 | int const n = params->w * params->h; | 1078 | int const n = params->w * params->h; |
1083 | int squares = 0; | 1079 | int squares = 0; |
@@ -1360,14 +1356,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1360 | else if (do_post) | 1356 | else if (do_post) |
1361 | return nfmtstr(40, "W,%d,%d", ui->r, ui->c); | 1357 | return nfmtstr(40, "W,%d,%d", ui->r, ui->c); |
1362 | else | 1358 | else |
1363 | return ""; | 1359 | return UI_UPDATE; |
1364 | 1360 | ||
1365 | } else if (!out_of_bounds(ui->r + dr[i], ui->c + dc[i], w, h)) { | 1361 | } else if (!out_of_bounds(ui->r + dr[i], ui->c + dc[i], w, h)) { |
1366 | ui->r += dr[i]; | 1362 | ui->r += dr[i]; |
1367 | ui->c += dc[i]; | 1363 | ui->c += dc[i]; |
1368 | } | 1364 | } |
1369 | } else ui->cursor_show = TRUE; | 1365 | } else ui->cursor_show = TRUE; |
1370 | return ""; | 1366 | return UI_UPDATE; |
1371 | } | 1367 | } |
1372 | 1368 | ||
1373 | if (action == hint) { | 1369 | if (action == hint) { |
diff --git a/apps/plugins/puzzles/src/rect.c b/apps/plugins/puzzles/src/rect.c index 247138cedb..c9923ad196 100644 --- a/apps/plugins/puzzles/src/rect.c +++ b/apps/plugins/puzzles/src/rect.c | |||
@@ -183,30 +183,24 @@ static config_item *game_configure(const game_params *params) | |||
183 | ret[0].name = "Width"; | 183 | ret[0].name = "Width"; |
184 | ret[0].type = C_STRING; | 184 | ret[0].type = C_STRING; |
185 | sprintf(buf, "%d", params->w); | 185 | sprintf(buf, "%d", params->w); |
186 | ret[0].sval = dupstr(buf); | 186 | ret[0].u.string.sval = dupstr(buf); |
187 | ret[0].ival = 0; | ||
188 | 187 | ||
189 | ret[1].name = "Height"; | 188 | ret[1].name = "Height"; |
190 | ret[1].type = C_STRING; | 189 | ret[1].type = C_STRING; |
191 | sprintf(buf, "%d", params->h); | 190 | sprintf(buf, "%d", params->h); |
192 | ret[1].sval = dupstr(buf); | 191 | ret[1].u.string.sval = dupstr(buf); |
193 | ret[1].ival = 0; | ||
194 | 192 | ||
195 | ret[2].name = "Expansion factor"; | 193 | ret[2].name = "Expansion factor"; |
196 | ret[2].type = C_STRING; | 194 | ret[2].type = C_STRING; |
197 | ftoa(buf, params->expandfactor); | 195 | ftoa(buf, params->expandfactor); |
198 | ret[2].sval = dupstr(buf); | 196 | ret[2].u.string.sval = dupstr(buf); |
199 | ret[2].ival = 0; | ||
200 | 197 | ||
201 | ret[3].name = "Ensure unique solution"; | 198 | ret[3].name = "Ensure unique solution"; |
202 | ret[3].type = C_BOOLEAN; | 199 | ret[3].type = C_BOOLEAN; |
203 | ret[3].sval = NULL; | 200 | ret[3].u.boolean.bval = params->unique; |
204 | ret[3].ival = params->unique; | ||
205 | 201 | ||
206 | ret[4].name = NULL; | 202 | ret[4].name = NULL; |
207 | ret[4].type = C_END; | 203 | ret[4].type = C_END; |
208 | ret[4].sval = NULL; | ||
209 | ret[4].ival = 0; | ||
210 | 204 | ||
211 | return ret; | 205 | return ret; |
212 | } | 206 | } |
@@ -215,15 +209,15 @@ static game_params *custom_params(const config_item *cfg) | |||
215 | { | 209 | { |
216 | game_params *ret = snew(game_params); | 210 | game_params *ret = snew(game_params); |
217 | 211 | ||
218 | ret->w = atoi(cfg[0].sval); | 212 | ret->w = atoi(cfg[0].u.string.sval); |
219 | ret->h = atoi(cfg[1].sval); | 213 | ret->h = atoi(cfg[1].u.string.sval); |
220 | ret->expandfactor = (float)atof(cfg[2].sval); | 214 | ret->expandfactor = (float)atof(cfg[2].u.string.sval); |
221 | ret->unique = cfg[3].ival; | 215 | ret->unique = cfg[3].u.boolean.bval; |
222 | 216 | ||
223 | return ret; | 217 | return ret; |
224 | } | 218 | } |
225 | 219 | ||
226 | static char *validate_params(const game_params *params, int full) | 220 | static const char *validate_params(const game_params *params, int full) |
227 | { | 221 | { |
228 | if (params->w <= 0 || params->h <= 0) | 222 | if (params->w <= 0 || params->h <= 0) |
229 | return "Width and height must both be greater than zero"; | 223 | return "Width and height must both be greater than zero"; |
@@ -1782,7 +1776,7 @@ static char *new_game_desc(const game_params *params_in, random_state *rs, | |||
1782 | return desc; | 1776 | return desc; |
1783 | } | 1777 | } |
1784 | 1778 | ||
1785 | static char *validate_desc(const game_params *params, const char *desc) | 1779 | static const char *validate_desc(const game_params *params, const char *desc) |
1786 | { | 1780 | { |
1787 | int area = params->w * params->h; | 1781 | int area = params->w * params->h; |
1788 | int squares = 0; | 1782 | int squares = 0; |
@@ -1983,7 +1977,7 @@ static void free_game(game_state *state) | |||
1983 | } | 1977 | } |
1984 | 1978 | ||
1985 | static char *solve_game(const game_state *state, const game_state *currstate, | 1979 | static char *solve_game(const game_state *state, const game_state *currstate, |
1986 | const char *ai, char **error) | 1980 | const char *ai, const char **error) |
1987 | { | 1981 | { |
1988 | unsigned char *vedge, *hedge; | 1982 | unsigned char *vedge, *hedge; |
1989 | int x, y, len; | 1983 | int x, y, len; |
@@ -2410,7 +2404,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2410 | move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, 0); | 2404 | move_cursor(button, &ui->cur_x, &ui->cur_y, from->w, from->h, 0); |
2411 | ui->cur_visible = TRUE; | 2405 | ui->cur_visible = TRUE; |
2412 | active = TRUE; | 2406 | active = TRUE; |
2413 | if (!ui->cur_dragging) return ""; | 2407 | if (!ui->cur_dragging) return UI_UPDATE; |
2414 | coord_round((float)ui->cur_x + 0.5F, (float)ui->cur_y + 0.5F, &xc, &yc); | 2408 | coord_round((float)ui->cur_x + 0.5F, (float)ui->cur_y + 0.5F, &xc, &yc); |
2415 | } else if (IS_CURSOR_SELECT(button)) { | 2409 | } else if (IS_CURSOR_SELECT(button)) { |
2416 | if (ui->drag_start_x >= 0 && !ui->cur_dragging) { | 2410 | if (ui->drag_start_x >= 0 && !ui->cur_dragging) { |
@@ -2423,7 +2417,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2423 | if (!ui->cur_visible) { | 2417 | if (!ui->cur_visible) { |
2424 | assert(!ui->cur_dragging); | 2418 | assert(!ui->cur_dragging); |
2425 | ui->cur_visible = TRUE; | 2419 | ui->cur_visible = TRUE; |
2426 | return ""; | 2420 | return UI_UPDATE; |
2427 | } | 2421 | } |
2428 | coord_round((float)ui->cur_x + 0.5F, (float)ui->cur_y + 0.5F, &xc, &yc); | 2422 | coord_round((float)ui->cur_x + 0.5F, (float)ui->cur_y + 0.5F, &xc, &yc); |
2429 | erasing = (button == CURSOR_SELECT2); | 2423 | erasing = (button == CURSOR_SELECT2); |
@@ -2444,7 +2438,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2444 | reset_ui(ui); /* cancel keyboard dragging */ | 2438 | reset_ui(ui); /* cancel keyboard dragging */ |
2445 | ui->cur_dragging = FALSE; | 2439 | ui->cur_dragging = FALSE; |
2446 | } | 2440 | } |
2447 | return ""; | 2441 | return UI_UPDATE; |
2448 | } else if (button != LEFT_DRAG && button != RIGHT_DRAG) { | 2442 | } else if (button != LEFT_DRAG && button != RIGHT_DRAG) { |
2449 | return NULL; | 2443 | return NULL; |
2450 | } | 2444 | } |
@@ -2528,7 +2522,7 @@ static char *interpret_move(const game_state *from, game_ui *ui, | |||
2528 | if (ret) | 2522 | if (ret) |
2529 | return ret; /* a move has been made */ | 2523 | return ret; /* a move has been made */ |
2530 | else if (active) | 2524 | else if (active) |
2531 | return ""; /* UI activity has occurred */ | 2525 | return UI_UPDATE; |
2532 | else | 2526 | else |
2533 | return NULL; | 2527 | return NULL; |
2534 | } | 2528 | } |
diff --git a/apps/plugins/puzzles/src/samegame.c b/apps/plugins/puzzles/src/samegame.c index 88edad32b1..d7d06764bf 100644 --- a/apps/plugins/puzzles/src/samegame.c +++ b/apps/plugins/puzzles/src/samegame.c | |||
@@ -241,35 +241,29 @@ static config_item *game_configure(const game_params *params) | |||
241 | ret[0].name = "Width"; | 241 | ret[0].name = "Width"; |
242 | ret[0].type = C_STRING; | 242 | ret[0].type = C_STRING; |
243 | sprintf(buf, "%d", params->w); | 243 | sprintf(buf, "%d", params->w); |
244 | ret[0].sval = dupstr(buf); | 244 | ret[0].u.string.sval = dupstr(buf); |
245 | ret[0].ival = 0; | ||
246 | 245 | ||
247 | ret[1].name = "Height"; | 246 | ret[1].name = "Height"; |
248 | ret[1].type = C_STRING; | 247 | ret[1].type = C_STRING; |
249 | sprintf(buf, "%d", params->h); | 248 | sprintf(buf, "%d", params->h); |
250 | ret[1].sval = dupstr(buf); | 249 | ret[1].u.string.sval = dupstr(buf); |
251 | ret[1].ival = 0; | ||
252 | 250 | ||
253 | ret[2].name = "No. of colours"; | 251 | ret[2].name = "No. of colours"; |
254 | ret[2].type = C_STRING; | 252 | ret[2].type = C_STRING; |
255 | sprintf(buf, "%d", params->ncols); | 253 | sprintf(buf, "%d", params->ncols); |
256 | ret[2].sval = dupstr(buf); | 254 | ret[2].u.string.sval = dupstr(buf); |
257 | ret[2].ival = 0; | ||
258 | 255 | ||
259 | ret[3].name = "Scoring system"; | 256 | ret[3].name = "Scoring system"; |
260 | ret[3].type = C_CHOICES; | 257 | ret[3].type = C_CHOICES; |
261 | ret[3].sval = ":(n-1)^2:(n-2)^2"; | 258 | ret[3].u.choices.choicenames = ":(n-1)^2:(n-2)^2"; |
262 | ret[3].ival = params->scoresub-1; | 259 | ret[3].u.choices.selected = params->scoresub-1; |
263 | 260 | ||
264 | ret[4].name = "Ensure solubility"; | 261 | ret[4].name = "Ensure solubility"; |
265 | ret[4].type = C_BOOLEAN; | 262 | ret[4].type = C_BOOLEAN; |
266 | ret[4].sval = NULL; | 263 | ret[4].u.boolean.bval = params->soluble; |
267 | ret[4].ival = params->soluble; | ||
268 | 264 | ||
269 | ret[5].name = NULL; | 265 | ret[5].name = NULL; |
270 | ret[5].type = C_END; | 266 | ret[5].type = C_END; |
271 | ret[5].sval = NULL; | ||
272 | ret[5].ival = 0; | ||
273 | 267 | ||
274 | return ret; | 268 | return ret; |
275 | } | 269 | } |
@@ -278,16 +272,16 @@ static game_params *custom_params(const config_item *cfg) | |||
278 | { | 272 | { |
279 | game_params *ret = snew(game_params); | 273 | game_params *ret = snew(game_params); |
280 | 274 | ||
281 | ret->w = atoi(cfg[0].sval); | 275 | ret->w = atoi(cfg[0].u.string.sval); |
282 | ret->h = atoi(cfg[1].sval); | 276 | ret->h = atoi(cfg[1].u.string.sval); |
283 | ret->ncols = atoi(cfg[2].sval); | 277 | ret->ncols = atoi(cfg[2].u.string.sval); |
284 | ret->scoresub = cfg[3].ival + 1; | 278 | ret->scoresub = cfg[3].u.choices.selected + 1; |
285 | ret->soluble = cfg[4].ival; | 279 | ret->soluble = cfg[4].u.boolean.bval; |
286 | 280 | ||
287 | return ret; | 281 | return ret; |
288 | } | 282 | } |
289 | 283 | ||
290 | static char *validate_params(const game_params *params, int full) | 284 | static const char *validate_params(const game_params *params, int full) |
291 | { | 285 | { |
292 | if (params->w < 1 || params->h < 1) | 286 | if (params->w < 1 || params->h < 1) |
293 | return "Width and height must both be positive"; | 287 | return "Width and height must both be positive"; |
@@ -948,7 +942,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
948 | return ret; | 942 | return ret; |
949 | } | 943 | } |
950 | 944 | ||
951 | static char *validate_desc(const game_params *params, const char *desc) | 945 | static const char *validate_desc(const game_params *params, const char *desc) |
952 | { | 946 | { |
953 | int area = params->w * params->h, i; | 947 | int area = params->w * params->h, i; |
954 | const char *p = desc; | 948 | const char *p = desc; |
@@ -1018,7 +1012,7 @@ static void free_game(game_state *state) | |||
1018 | } | 1012 | } |
1019 | 1013 | ||
1020 | static char *solve_game(const game_state *state, const game_state *currstate, | 1014 | static char *solve_game(const game_state *state, const game_state *currstate, |
1021 | const char *aux, char **error) | 1015 | const char *aux, const char **error) |
1022 | { | 1016 | { |
1023 | return NULL; | 1017 | return NULL; |
1024 | } | 1018 | } |
@@ -1114,7 +1108,8 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate, | |||
1114 | static char *sel_movedesc(game_ui *ui, const game_state *state) | 1108 | static char *sel_movedesc(game_ui *ui, const game_state *state) |
1115 | { | 1109 | { |
1116 | int i; | 1110 | int i; |
1117 | char *ret, *sep, buf[80]; | 1111 | char *ret, buf[80]; |
1112 | const char *sep; | ||
1118 | int retlen, retsize; | 1113 | int retlen, retsize; |
1119 | 1114 | ||
1120 | retsize = 256; | 1115 | retsize = 256; |
@@ -1273,7 +1268,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1273 | int x, int y, int button) | 1268 | int x, int y, int button) |
1274 | { | 1269 | { |
1275 | int tx, ty; | 1270 | int tx, ty; |
1276 | char *ret = ""; | 1271 | char *ret = UI_UPDATE; |
1277 | 1272 | ||
1278 | ui->displaysel = 0; | 1273 | ui->displaysel = 0; |
1279 | 1274 | ||
diff --git a/apps/plugins/puzzles/src/signpost.c b/apps/plugins/puzzles/src/signpost.c index a61ec8b536..edcf63a823 100644 --- a/apps/plugins/puzzles/src/signpost.c +++ b/apps/plugins/puzzles/src/signpost.c | |||
@@ -387,24 +387,19 @@ static config_item *game_configure(const game_params *params) | |||
387 | ret[0].name = "Width"; | 387 | ret[0].name = "Width"; |
388 | ret[0].type = C_STRING; | 388 | ret[0].type = C_STRING; |
389 | sprintf(buf, "%d", params->w); | 389 | sprintf(buf, "%d", params->w); |
390 | ret[0].sval = dupstr(buf); | 390 | ret[0].u.string.sval = dupstr(buf); |
391 | ret[0].ival = 0; | ||
392 | 391 | ||
393 | ret[1].name = "Height"; | 392 | ret[1].name = "Height"; |
394 | ret[1].type = C_STRING; | 393 | ret[1].type = C_STRING; |
395 | sprintf(buf, "%d", params->h); | 394 | sprintf(buf, "%d", params->h); |
396 | ret[1].sval = dupstr(buf); | 395 | ret[1].u.string.sval = dupstr(buf); |
397 | ret[1].ival = 0; | ||
398 | 396 | ||
399 | ret[2].name = "Start and end in corners"; | 397 | ret[2].name = "Start and end in corners"; |
400 | ret[2].type = C_BOOLEAN; | 398 | ret[2].type = C_BOOLEAN; |
401 | ret[2].sval = NULL; | 399 | ret[2].u.boolean.bval = params->force_corner_start; |
402 | ret[2].ival = params->force_corner_start; | ||
403 | 400 | ||
404 | ret[3].name = NULL; | 401 | ret[3].name = NULL; |
405 | ret[3].type = C_END; | 402 | ret[3].type = C_END; |
406 | ret[3].sval = NULL; | ||
407 | ret[3].ival = 0; | ||
408 | 403 | ||
409 | return ret; | 404 | return ret; |
410 | } | 405 | } |
@@ -413,14 +408,14 @@ static game_params *custom_params(const config_item *cfg) | |||
413 | { | 408 | { |
414 | game_params *ret = snew(game_params); | 409 | game_params *ret = snew(game_params); |
415 | 410 | ||
416 | ret->w = atoi(cfg[0].sval); | 411 | ret->w = atoi(cfg[0].u.string.sval); |
417 | ret->h = atoi(cfg[1].sval); | 412 | ret->h = atoi(cfg[1].u.string.sval); |
418 | ret->force_corner_start = cfg[2].ival; | 413 | ret->force_corner_start = cfg[2].u.boolean.bval; |
419 | 414 | ||
420 | return ret; | 415 | return ret; |
421 | } | 416 | } |
422 | 417 | ||
423 | static char *validate_params(const game_params *params, int full) | 418 | static const char *validate_params(const game_params *params, int full) |
424 | { | 419 | { |
425 | if (params->w < 1) return "Width must be at least one"; | 420 | if (params->w < 1) return "Width must be at least one"; |
426 | if (params->h < 1) return "Height must be at least one"; | 421 | if (params->h < 1) return "Height must be at least one"; |
@@ -502,10 +497,11 @@ static void free_game(game_state *state) | |||
502 | } | 497 | } |
503 | 498 | ||
504 | static void unpick_desc(const game_params *params, const char *desc, | 499 | static void unpick_desc(const game_params *params, const char *desc, |
505 | game_state **sout, char **mout) | 500 | game_state **sout, const char **mout) |
506 | { | 501 | { |
507 | game_state *state = blank_game(params->w, params->h); | 502 | game_state *state = blank_game(params->w, params->h); |
508 | char *msg = NULL, c; | 503 | const char *msg = NULL; |
504 | char c; | ||
509 | int num = 0, i = 0; | 505 | int num = 0, i = 0; |
510 | 506 | ||
511 | while (*desc) { | 507 | while (*desc) { |
@@ -848,9 +844,9 @@ generate: | |||
848 | return ret; | 844 | return ret; |
849 | } | 845 | } |
850 | 846 | ||
851 | static char *validate_desc(const game_params *params, const char *desc) | 847 | static const char *validate_desc(const game_params *params, const char *desc) |
852 | { | 848 | { |
853 | char *ret = NULL; | 849 | const char *ret = NULL; |
854 | 850 | ||
855 | unpick_desc(params, desc, NULL, &ret); | 851 | unpick_desc(params, desc, NULL, &ret); |
856 | return ret; | 852 | return ret; |
@@ -1342,7 +1338,7 @@ static int solve_state(game_state *state) | |||
1342 | } | 1338 | } |
1343 | 1339 | ||
1344 | static char *solve_game(const game_state *state, const game_state *currstate, | 1340 | static char *solve_game(const game_state *state, const game_state *currstate, |
1345 | const char *aux, char **error) | 1341 | const char *aux, const char **error) |
1346 | { | 1342 | { |
1347 | game_state *tosolve; | 1343 | game_state *tosolve; |
1348 | char *ret = NULL; | 1344 | char *ret = NULL; |
@@ -1441,18 +1437,20 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1441 | ui->dx = COORD(ui->cx) + TILE_SIZE/2; | 1437 | ui->dx = COORD(ui->cx) + TILE_SIZE/2; |
1442 | ui->dy = COORD(ui->cy) + TILE_SIZE/2; | 1438 | ui->dy = COORD(ui->cy) + TILE_SIZE/2; |
1443 | } | 1439 | } |
1444 | return ""; | 1440 | return UI_UPDATE; |
1445 | } else if (IS_CURSOR_SELECT(button)) { | 1441 | } else if (IS_CURSOR_SELECT(button)) { |
1446 | if (!ui->cshow) | 1442 | if (!ui->cshow) |
1447 | ui->cshow = 1; | 1443 | ui->cshow = 1; |
1448 | else if (ui->dragging) { | 1444 | else if (ui->dragging) { |
1449 | ui->dragging = FALSE; | 1445 | ui->dragging = FALSE; |
1450 | if (ui->sx == ui->cx && ui->sy == ui->cy) return ""; | 1446 | if (ui->sx == ui->cx && ui->sy == ui->cy) return UI_UPDATE; |
1451 | if (ui->drag_is_from) { | 1447 | if (ui->drag_is_from) { |
1452 | if (!isvalidmove(state, 0, ui->sx, ui->sy, ui->cx, ui->cy)) return ""; | 1448 | if (!isvalidmove(state, 0, ui->sx, ui->sy, ui->cx, ui->cy)) |
1449 | return UI_UPDATE; | ||
1453 | sprintf(buf, "L%d,%d-%d,%d", ui->sx, ui->sy, ui->cx, ui->cy); | 1450 | sprintf(buf, "L%d,%d-%d,%d", ui->sx, ui->sy, ui->cx, ui->cy); |
1454 | } else { | 1451 | } else { |
1455 | if (!isvalidmove(state, 0, ui->cx, ui->cy, ui->sx, ui->sy)) return ""; | 1452 | if (!isvalidmove(state, 0, ui->cx, ui->cy, ui->sx, ui->sy)) |
1453 | return UI_UPDATE; | ||
1456 | sprintf(buf, "L%d,%d-%d,%d", ui->cx, ui->cy, ui->sx, ui->sy); | 1454 | sprintf(buf, "L%d,%d-%d,%d", ui->cx, ui->cy, ui->sx, ui->sy); |
1457 | } | 1455 | } |
1458 | return dupstr(buf); | 1456 | return dupstr(buf); |
@@ -1464,7 +1462,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1464 | ui->dy = COORD(ui->cy) + TILE_SIZE/2; | 1462 | ui->dy = COORD(ui->cy) + TILE_SIZE/2; |
1465 | ui->drag_is_from = (button == CURSOR_SELECT) ? 1 : 0; | 1463 | ui->drag_is_from = (button == CURSOR_SELECT) ? 1 : 0; |
1466 | } | 1464 | } |
1467 | return ""; | 1465 | return UI_UPDATE; |
1468 | } | 1466 | } |
1469 | if (IS_MOUSE_DOWN(button)) { | 1467 | if (IS_MOUSE_DOWN(button)) { |
1470 | if (ui->cshow) { | 1468 | if (ui->cshow) { |
@@ -1492,29 +1490,31 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1492 | ui->dx = mx; | 1490 | ui->dx = mx; |
1493 | ui->dy = my; | 1491 | ui->dy = my; |
1494 | ui->cshow = 0; | 1492 | ui->cshow = 0; |
1495 | return ""; | 1493 | return UI_UPDATE; |
1496 | } else if (IS_MOUSE_DRAG(button) && ui->dragging) { | 1494 | } else if (IS_MOUSE_DRAG(button) && ui->dragging) { |
1497 | ui->dx = mx; | 1495 | ui->dx = mx; |
1498 | ui->dy = my; | 1496 | ui->dy = my; |
1499 | return ""; | 1497 | return UI_UPDATE; |
1500 | } else if (IS_MOUSE_RELEASE(button) && ui->dragging) { | 1498 | } else if (IS_MOUSE_RELEASE(button) && ui->dragging) { |
1501 | ui->dragging = FALSE; | 1499 | ui->dragging = FALSE; |
1502 | if (ui->sx == x && ui->sy == y) return ""; /* single click */ | 1500 | if (ui->sx == x && ui->sy == y) return UI_UPDATE; /* single click */ |
1503 | 1501 | ||
1504 | if (!INGRID(state, x, y)) { | 1502 | if (!INGRID(state, x, y)) { |
1505 | int si = ui->sy*w+ui->sx; | 1503 | int si = ui->sy*w+ui->sx; |
1506 | if (state->prev[si] == -1 && state->next[si] == -1) | 1504 | if (state->prev[si] == -1 && state->next[si] == -1) |
1507 | return ""; | 1505 | return UI_UPDATE; |
1508 | sprintf(buf, "%c%d,%d", | 1506 | sprintf(buf, "%c%d,%d", |
1509 | (int)(ui->drag_is_from ? 'C' : 'X'), ui->sx, ui->sy); | 1507 | (int)(ui->drag_is_from ? 'C' : 'X'), ui->sx, ui->sy); |
1510 | return dupstr(buf); | 1508 | return dupstr(buf); |
1511 | } | 1509 | } |
1512 | 1510 | ||
1513 | if (ui->drag_is_from) { | 1511 | if (ui->drag_is_from) { |
1514 | if (!isvalidmove(state, 0, ui->sx, ui->sy, x, y)) return ""; | 1512 | if (!isvalidmove(state, 0, ui->sx, ui->sy, x, y)) |
1513 | return UI_UPDATE; | ||
1515 | sprintf(buf, "L%d,%d-%d,%d", ui->sx, ui->sy, x, y); | 1514 | sprintf(buf, "L%d,%d-%d,%d", ui->sx, ui->sy, x, y); |
1516 | } else { | 1515 | } else { |
1517 | if (!isvalidmove(state, 0, x, y, ui->sx, ui->sy)) return ""; | 1516 | if (!isvalidmove(state, 0, x, y, ui->sx, ui->sy)) |
1517 | return UI_UPDATE; | ||
1518 | sprintf(buf, "L%d,%d-%d,%d", x, y, ui->sx, ui->sy); | 1518 | sprintf(buf, "L%d,%d-%d,%d", x, y, ui->sx, ui->sy); |
1519 | } | 1519 | } |
1520 | return dupstr(buf); | 1520 | return dupstr(buf); |
@@ -1523,7 +1523,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1523 | else if ((button == 'x' || button == 'X') && ui->cshow) { | 1523 | else if ((button == 'x' || button == 'X') && ui->cshow) { |
1524 | int si = ui->cy*w + ui->cx; | 1524 | int si = ui->cy*w + ui->cx; |
1525 | if (state->prev[si] == -1 && state->next[si] == -1) | 1525 | if (state->prev[si] == -1 && state->next[si] == -1) |
1526 | return ""; | 1526 | return UI_UPDATE; |
1527 | sprintf(buf, "%c%d,%d", | 1527 | sprintf(buf, "%c%d,%d", |
1528 | (int)((button == 'x') ? 'C' : 'X'), ui->cx, ui->cy); | 1528 | (int)((button == 'x') ? 'C' : 'X'), ui->cx, ui->cy); |
1529 | return dupstr(buf); | 1529 | return dupstr(buf); |
@@ -1560,7 +1560,7 @@ static game_state *execute_move(const game_state *state, const char *move) | |||
1560 | if (move[0] == 'S') { | 1560 | if (move[0] == 'S') { |
1561 | game_params p; | 1561 | game_params p; |
1562 | game_state *tmp; | 1562 | game_state *tmp; |
1563 | char *valid; | 1563 | const char *valid; |
1564 | int i; | 1564 | int i; |
1565 | 1565 | ||
1566 | p.w = state->w; p.h = state->h; | 1566 | p.w = state->w; p.h = state->h; |
@@ -2330,7 +2330,8 @@ static void start_soak(game_params *p, char *seedstr) | |||
2330 | 2330 | ||
2331 | static void process_desc(char *id) | 2331 | static void process_desc(char *id) |
2332 | { | 2332 | { |
2333 | char *desc, *err, *solvestr; | 2333 | char *desc, *solvestr; |
2334 | const char *err; | ||
2334 | game_params *p; | 2335 | game_params *p; |
2335 | game_state *s; | 2336 | game_state *s; |
2336 | 2337 | ||
@@ -2374,7 +2375,8 @@ static void process_desc(char *id) | |||
2374 | 2375 | ||
2375 | int main(int argc, const char *argv[]) | 2376 | int main(int argc, const char *argv[]) |
2376 | { | 2377 | { |
2377 | char *id = NULL, *desc, *err, *aux = NULL; | 2378 | char *id = NULL, *desc, *aux = NULL; |
2379 | const char *err; | ||
2378 | int soak = 0, verbose = 0, stdin_desc = 0, n = 1, i; | 2380 | int soak = 0, verbose = 0, stdin_desc = 0, n = 1, i; |
2379 | char *seedstr = NULL, newseed[16]; | 2381 | char *seedstr = NULL, newseed[16]; |
2380 | 2382 | ||
diff --git a/apps/plugins/puzzles/src/singles.c b/apps/plugins/puzzles/src/singles.c index 5fe054c663..5929d82932 100644 --- a/apps/plugins/puzzles/src/singles.c +++ b/apps/plugins/puzzles/src/singles.c | |||
@@ -222,24 +222,20 @@ static config_item *game_configure(const game_params *params) | |||
222 | ret[0].name = "Width"; | 222 | ret[0].name = "Width"; |
223 | ret[0].type = C_STRING; | 223 | ret[0].type = C_STRING; |
224 | sprintf(buf, "%d", params->w); | 224 | sprintf(buf, "%d", params->w); |
225 | ret[0].sval = dupstr(buf); | 225 | ret[0].u.string.sval = dupstr(buf); |
226 | ret[0].ival = 0; | ||
227 | 226 | ||
228 | ret[1].name = "Height"; | 227 | ret[1].name = "Height"; |
229 | ret[1].type = C_STRING; | 228 | ret[1].type = C_STRING; |
230 | sprintf(buf, "%d", params->h); | 229 | sprintf(buf, "%d", params->h); |
231 | ret[1].sval = dupstr(buf); | 230 | ret[1].u.string.sval = dupstr(buf); |
232 | ret[1].ival = 0; | ||
233 | 231 | ||
234 | ret[2].name = "Difficulty"; | 232 | ret[2].name = "Difficulty"; |
235 | ret[2].type = C_CHOICES; | 233 | ret[2].type = C_CHOICES; |
236 | ret[2].sval = DIFFCONFIG; | 234 | ret[2].u.choices.choicenames = DIFFCONFIG; |
237 | ret[2].ival = params->diff; | 235 | ret[2].u.choices.selected = params->diff; |
238 | 236 | ||
239 | ret[3].name = NULL; | 237 | ret[3].name = NULL; |
240 | ret[3].type = C_END; | 238 | ret[3].type = C_END; |
241 | ret[3].sval = NULL; | ||
242 | ret[3].ival = 0; | ||
243 | 239 | ||
244 | return ret; | 240 | return ret; |
245 | } | 241 | } |
@@ -248,14 +244,14 @@ static game_params *custom_params(const config_item *cfg) | |||
248 | { | 244 | { |
249 | game_params *ret = snew(game_params); | 245 | game_params *ret = snew(game_params); |
250 | 246 | ||
251 | ret->w = atoi(cfg[0].sval); | 247 | ret->w = atoi(cfg[0].u.string.sval); |
252 | ret->h = atoi(cfg[1].sval); | 248 | ret->h = atoi(cfg[1].u.string.sval); |
253 | ret->diff = cfg[2].ival; | 249 | ret->diff = cfg[2].u.choices.selected; |
254 | 250 | ||
255 | return ret; | 251 | return ret; |
256 | } | 252 | } |
257 | 253 | ||
258 | static char *validate_params(const game_params *params, int full) | 254 | static const char *validate_params(const game_params *params, int full) |
259 | { | 255 | { |
260 | if (params->w < 2 || params->h < 2) | 256 | if (params->w < 2 || params->h < 2) |
261 | return "Width and neight must be at least two"; | 257 | return "Width and neight must be at least two"; |
@@ -334,10 +330,10 @@ static int c2n(char c) { | |||
334 | } | 330 | } |
335 | 331 | ||
336 | static void unpick_desc(const game_params *params, const char *desc, | 332 | static void unpick_desc(const game_params *params, const char *desc, |
337 | game_state **sout, char **mout) | 333 | game_state **sout, const char **mout) |
338 | { | 334 | { |
339 | game_state *state = blank_game(params->w, params->h); | 335 | game_state *state = blank_game(params->w, params->h); |
340 | char *msg = NULL; | 336 | const char *msg = NULL; |
341 | int num = 0, i = 0; | 337 | int num = 0, i = 0; |
342 | 338 | ||
343 | if (strlen(desc) != state->n) { | 339 | if (strlen(desc) != state->n) { |
@@ -1185,7 +1181,7 @@ static int solve_specific(game_state *state, int diff, int sneaky) | |||
1185 | } | 1181 | } |
1186 | 1182 | ||
1187 | static char *solve_game(const game_state *state, const game_state *currstate, | 1183 | static char *solve_game(const game_state *state, const game_state *currstate, |
1188 | const char *aux, char **error) | 1184 | const char *aux, const char **error) |
1189 | { | 1185 | { |
1190 | game_state *solved = dup_game(currstate); | 1186 | game_state *solved = dup_game(currstate); |
1191 | char *move = NULL; | 1187 | char *move = NULL; |
@@ -1414,9 +1410,9 @@ randomise: | |||
1414 | return ret; | 1410 | return ret; |
1415 | } | 1411 | } |
1416 | 1412 | ||
1417 | static char *validate_desc(const game_params *params, const char *desc) | 1413 | static const char *validate_desc(const game_params *params, const char *desc) |
1418 | { | 1414 | { |
1419 | char *ret = NULL; | 1415 | const char *ret = NULL; |
1420 | 1416 | ||
1421 | unpick_desc(params, desc, NULL, &ret); | 1417 | unpick_desc(params, desc, NULL, &ret); |
1422 | return ret; | 1418 | return ret; |
@@ -1522,7 +1518,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1522 | action = TOGGLE_CIRCLE; | 1518 | action = TOGGLE_CIRCLE; |
1523 | } | 1519 | } |
1524 | } | 1520 | } |
1525 | if (action == UI) return ""; | 1521 | if (action == UI) return UI_UPDATE; |
1526 | 1522 | ||
1527 | if (action == TOGGLE_BLACK || action == TOGGLE_CIRCLE) { | 1523 | if (action == TOGGLE_BLACK || action == TOGGLE_CIRCLE) { |
1528 | i = y * state->w + x; | 1524 | i = y * state->w + x; |
@@ -1910,7 +1906,8 @@ static void start_soak(game_params *p, random_state *rs) | |||
1910 | 1906 | ||
1911 | int main(int argc, char **argv) | 1907 | int main(int argc, char **argv) |
1912 | { | 1908 | { |
1913 | char *id = NULL, *desc, *desc_gen = NULL, *tgame, *err, *aux; | 1909 | char *id = NULL, *desc, *desc_gen = NULL, *tgame, *aux; |
1910 | const char *err; | ||
1914 | game_state *s = NULL; | 1911 | game_state *s = NULL; |
1915 | game_params *p = NULL; | 1912 | game_params *p = NULL; |
1916 | int soln, soak = 0, ret = 1; | 1913 | int soln, soak = 0, ret = 1; |
diff --git a/apps/plugins/puzzles/src/sixteen.c b/apps/plugins/puzzles/src/sixteen.c index aaf524a0d6..9fa7032f02 100644 --- a/apps/plugins/puzzles/src/sixteen.c +++ b/apps/plugins/puzzles/src/sixteen.c | |||
@@ -140,25 +140,20 @@ static config_item *game_configure(const game_params *params) | |||
140 | ret[0].name = "Width"; | 140 | ret[0].name = "Width"; |
141 | ret[0].type = C_STRING; | 141 | ret[0].type = C_STRING; |
142 | sprintf(buf, "%d", params->w); | 142 | sprintf(buf, "%d", params->w); |
143 | ret[0].sval = dupstr(buf); | 143 | ret[0].u.string.sval = dupstr(buf); |
144 | ret[0].ival = 0; | ||
145 | 144 | ||
146 | ret[1].name = "Height"; | 145 | ret[1].name = "Height"; |
147 | ret[1].type = C_STRING; | 146 | ret[1].type = C_STRING; |
148 | sprintf(buf, "%d", params->h); | 147 | sprintf(buf, "%d", params->h); |
149 | ret[1].sval = dupstr(buf); | 148 | ret[1].u.string.sval = dupstr(buf); |
150 | ret[1].ival = 0; | ||
151 | 149 | ||
152 | ret[2].name = "Number of shuffling moves"; | 150 | ret[2].name = "Number of shuffling moves"; |
153 | ret[2].type = C_STRING; | 151 | ret[2].type = C_STRING; |
154 | sprintf(buf, "%d", params->movetarget); | 152 | sprintf(buf, "%d", params->movetarget); |
155 | ret[2].sval = dupstr(buf); | 153 | ret[2].u.string.sval = dupstr(buf); |
156 | ret[2].ival = 0; | ||
157 | 154 | ||
158 | ret[3].name = NULL; | 155 | ret[3].name = NULL; |
159 | ret[3].type = C_END; | 156 | ret[3].type = C_END; |
160 | ret[3].sval = NULL; | ||
161 | ret[3].ival = 0; | ||
162 | 157 | ||
163 | return ret; | 158 | return ret; |
164 | } | 159 | } |
@@ -167,14 +162,14 @@ static game_params *custom_params(const config_item *cfg) | |||
167 | { | 162 | { |
168 | game_params *ret = snew(game_params); | 163 | game_params *ret = snew(game_params); |
169 | 164 | ||
170 | ret->w = atoi(cfg[0].sval); | 165 | ret->w = atoi(cfg[0].u.string.sval); |
171 | ret->h = atoi(cfg[1].sval); | 166 | ret->h = atoi(cfg[1].u.string.sval); |
172 | ret->movetarget = atoi(cfg[2].sval); | 167 | ret->movetarget = atoi(cfg[2].u.string.sval); |
173 | 168 | ||
174 | return ret; | 169 | return ret; |
175 | } | 170 | } |
176 | 171 | ||
177 | static char *validate_params(const game_params *params, int full) | 172 | static const char *validate_params(const game_params *params, int full) |
178 | { | 173 | { |
179 | if (params->w < 2 || params->h < 2) | 174 | if (params->w < 2 || params->h < 2) |
180 | return "Width and height must both be at least two"; | 175 | return "Width and height must both be at least two"; |
@@ -402,10 +397,9 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
402 | } | 397 | } |
403 | 398 | ||
404 | 399 | ||
405 | static char *validate_desc(const game_params *params, const char *desc) | 400 | static const char *validate_desc(const game_params *params, const char *desc) |
406 | { | 401 | { |
407 | const char *p; | 402 | const char *p, *err; |
408 | char *err; | ||
409 | int i, area; | 403 | int i, area; |
410 | int *used; | 404 | int *used; |
411 | 405 | ||
@@ -510,7 +504,7 @@ static void free_game(game_state *state) | |||
510 | } | 504 | } |
511 | 505 | ||
512 | static char *solve_game(const game_state *state, const game_state *currstate, | 506 | static char *solve_game(const game_state *state, const game_state *currstate, |
513 | const char *aux, char **error) | 507 | const char *aux, const char **error) |
514 | { | 508 | { |
515 | return dupstr("S"); | 509 | return dupstr("S"); |
516 | } | 510 | } |
@@ -619,7 +613,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
619 | if (IS_CURSOR_MOVE(button) || pad) { | 613 | if (IS_CURSOR_MOVE(button) || pad) { |
620 | if (!ui->cur_visible) { | 614 | if (!ui->cur_visible) { |
621 | ui->cur_visible = 1; | 615 | ui->cur_visible = 1; |
622 | return ""; | 616 | return UI_UPDATE; |
623 | } | 617 | } |
624 | 618 | ||
625 | if (control || shift || ui->cur_mode) { | 619 | if (control || shift || ui->cur_mode) { |
@@ -674,7 +668,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
674 | } | 668 | } |
675 | 669 | ||
676 | ui->cur_visible = 1; | 670 | ui->cur_visible = 1; |
677 | return ""; | 671 | return UI_UPDATE; |
678 | } | 672 | } |
679 | } | 673 | } |
680 | 674 | ||
@@ -692,11 +686,11 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
692 | const enum cursor_mode m = (button == CURSOR_SELECT2 ? | 686 | const enum cursor_mode m = (button == CURSOR_SELECT2 ? |
693 | lock_position : lock_tile); | 687 | lock_position : lock_tile); |
694 | ui->cur_mode = (ui->cur_mode == m ? unlocked : m); | 688 | ui->cur_mode = (ui->cur_mode == m ? unlocked : m); |
695 | return ""; | 689 | return UI_UPDATE; |
696 | } | 690 | } |
697 | } else { | 691 | } else { |
698 | ui->cur_visible = 1; | 692 | ui->cur_visible = 1; |
699 | return ""; | 693 | return UI_UPDATE; |
700 | } | 694 | } |
701 | } else { | 695 | } else { |
702 | return NULL; | 696 | return NULL; |
@@ -711,7 +705,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
711 | else if (cy == state->h && cx >= 0 && cx < state->w) | 705 | else if (cy == state->h && cx >= 0 && cx < state->w) |
712 | dy = +1, dx = 0; | 706 | dy = +1, dx = 0; |
713 | else | 707 | else |
714 | return ""; /* invalid click location */ | 708 | return UI_UPDATE; /* invalid click location */ |
715 | 709 | ||
716 | /* reverse direction if right hand button is pressed */ | 710 | /* reverse direction if right hand button is pressed */ |
717 | if (button == RIGHT_BUTTON || button == CURSOR_SELECT2) { | 711 | if (button == RIGHT_BUTTON || button == CURSOR_SELECT2) { |
diff --git a/apps/plugins/puzzles/src/slant.c b/apps/plugins/puzzles/src/slant.c index 5f9f4f6fed..3fd66115b1 100644 --- a/apps/plugins/puzzles/src/slant.c +++ b/apps/plugins/puzzles/src/slant.c | |||
@@ -184,24 +184,20 @@ static config_item *game_configure(const game_params *params) | |||
184 | ret[0].name = "Width"; | 184 | ret[0].name = "Width"; |
185 | ret[0].type = C_STRING; | 185 | ret[0].type = C_STRING; |
186 | sprintf(buf, "%d", params->w); | 186 | sprintf(buf, "%d", params->w); |
187 | ret[0].sval = dupstr(buf); | 187 | ret[0].u.string.sval = dupstr(buf); |
188 | ret[0].ival = 0; | ||
189 | 188 | ||
190 | ret[1].name = "Height"; | 189 | ret[1].name = "Height"; |
191 | ret[1].type = C_STRING; | 190 | ret[1].type = C_STRING; |
192 | sprintf(buf, "%d", params->h); | 191 | sprintf(buf, "%d", params->h); |
193 | ret[1].sval = dupstr(buf); | 192 | ret[1].u.string.sval = dupstr(buf); |
194 | ret[1].ival = 0; | ||
195 | 193 | ||
196 | ret[2].name = "Difficulty"; | 194 | ret[2].name = "Difficulty"; |
197 | ret[2].type = C_CHOICES; | 195 | ret[2].type = C_CHOICES; |
198 | ret[2].sval = DIFFCONFIG; | 196 | ret[2].u.choices.choicenames = DIFFCONFIG; |
199 | ret[2].ival = params->diff; | 197 | ret[2].u.choices.selected = params->diff; |
200 | 198 | ||
201 | ret[3].name = NULL; | 199 | ret[3].name = NULL; |
202 | ret[3].type = C_END; | 200 | ret[3].type = C_END; |
203 | ret[3].sval = NULL; | ||
204 | ret[3].ival = 0; | ||
205 | 201 | ||
206 | return ret; | 202 | return ret; |
207 | } | 203 | } |
@@ -210,14 +206,14 @@ static game_params *custom_params(const config_item *cfg) | |||
210 | { | 206 | { |
211 | game_params *ret = snew(game_params); | 207 | game_params *ret = snew(game_params); |
212 | 208 | ||
213 | ret->w = atoi(cfg[0].sval); | 209 | ret->w = atoi(cfg[0].u.string.sval); |
214 | ret->h = atoi(cfg[1].sval); | 210 | ret->h = atoi(cfg[1].u.string.sval); |
215 | ret->diff = cfg[2].ival; | 211 | ret->diff = cfg[2].u.choices.selected; |
216 | 212 | ||
217 | return ret; | 213 | return ret; |
218 | } | 214 | } |
219 | 215 | ||
220 | static char *validate_params(const game_params *params, int full) | 216 | static const char *validate_params(const game_params *params, int full) |
221 | { | 217 | { |
222 | /* | 218 | /* |
223 | * (At least at the time of writing this comment) The grid | 219 | * (At least at the time of writing this comment) The grid |
@@ -417,7 +413,7 @@ static void fill_square(int w, int h, int x, int y, int v, | |||
417 | } | 413 | } |
418 | 414 | ||
419 | static int vbitmap_clear(int w, int h, struct solver_scratch *sc, | 415 | static int vbitmap_clear(int w, int h, struct solver_scratch *sc, |
420 | int x, int y, int vbits, char *reason, ...) | 416 | int x, int y, int vbits, const char *reason, ...) |
421 | { | 417 | { |
422 | int done_something = FALSE; | 418 | int done_something = FALSE; |
423 | int vbit; | 419 | int vbit; |
@@ -738,7 +734,7 @@ static int slant_solve(int w, int h, const signed char *clues, | |||
738 | int fs, bs, v; | 734 | int fs, bs, v; |
739 | int c1, c2; | 735 | int c1, c2; |
740 | #ifdef SOLVER_DIAGNOSTICS | 736 | #ifdef SOLVER_DIAGNOSTICS |
741 | char *reason = "<internal error>"; | 737 | const char *reason = "<internal error>"; |
742 | #endif | 738 | #endif |
743 | 739 | ||
744 | if (soln[y*w+x]) | 740 | if (soln[y*w+x]) |
@@ -1216,7 +1212,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
1216 | return desc; | 1212 | return desc; |
1217 | } | 1213 | } |
1218 | 1214 | ||
1219 | static char *validate_desc(const game_params *params, const char *desc) | 1215 | static const char *validate_desc(const game_params *params, const char *desc) |
1220 | { | 1216 | { |
1221 | int w = params->w, h = params->h, W = w+1, H = h+1; | 1217 | int w = params->w, h = params->h, W = w+1, H = h+1; |
1222 | int area = W*H; | 1218 | int area = W*H; |
@@ -1460,7 +1456,7 @@ static int check_completion(game_state *state) | |||
1460 | } | 1456 | } |
1461 | 1457 | ||
1462 | static char *solve_game(const game_state *state, const game_state *currstate, | 1458 | static char *solve_game(const game_state *state, const game_state *currstate, |
1463 | const char *aux, char **error) | 1459 | const char *aux, const char **error) |
1464 | { | 1460 | { |
1465 | int w = state->p.w, h = state->p.h; | 1461 | int w = state->p.w, h = state->p.h; |
1466 | signed char *soln; | 1462 | signed char *soln; |
@@ -1683,7 +1679,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1683 | } else if (IS_CURSOR_SELECT(button)) { | 1679 | } else if (IS_CURSOR_SELECT(button)) { |
1684 | if (!ui->cur_visible) { | 1680 | if (!ui->cur_visible) { |
1685 | ui->cur_visible = 1; | 1681 | ui->cur_visible = 1; |
1686 | return ""; | 1682 | return UI_UPDATE; |
1687 | } | 1683 | } |
1688 | x = ui->cur_x; | 1684 | x = ui->cur_x; |
1689 | y = ui->cur_y; | 1685 | y = ui->cur_y; |
@@ -1692,7 +1688,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1692 | } else if (IS_CURSOR_MOVE(button)) { | 1688 | } else if (IS_CURSOR_MOVE(button)) { |
1693 | move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0); | 1689 | move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0); |
1694 | ui->cur_visible = 1; | 1690 | ui->cur_visible = 1; |
1695 | return ""; | 1691 | return UI_UPDATE; |
1696 | } else if (button == '\\' || button == '\b' || button == '/') { | 1692 | } else if (button == '\\' || button == '\b' || button == '/') { |
1697 | int x = ui->cur_x, y = ui->cur_y; | 1693 | int x = ui->cur_x, y = ui->cur_y; |
1698 | if (button == ("\\" "\b" "/")[state->soln[y*w + x] + 1]) return NULL; | 1694 | if (button == ("\\" "\b" "/")[state->soln[y*w + x] + 1]) return NULL; |
@@ -2193,7 +2189,8 @@ int main(int argc, char **argv) | |||
2193 | { | 2189 | { |
2194 | game_params *p; | 2190 | game_params *p; |
2195 | game_state *s; | 2191 | game_state *s; |
2196 | char *id = NULL, *desc, *err; | 2192 | char *id = NULL, *desc; |
2193 | const char *err; | ||
2197 | int grade = FALSE; | 2194 | int grade = FALSE; |
2198 | int ret, diff, really_verbose = FALSE; | 2195 | int ret, diff, really_verbose = FALSE; |
2199 | struct solver_scratch *sc; | 2196 | struct solver_scratch *sc; |
diff --git a/apps/plugins/puzzles/src/solo.c b/apps/plugins/puzzles/src/solo.c index 0d383c39aa..ef2852f1d9 100644 --- a/apps/plugins/puzzles/src/solo.c +++ b/apps/plugins/puzzles/src/solo.c | |||
@@ -299,9 +299,9 @@ static game_params *dup_params(const game_params *params) | |||
299 | static int game_fetch_preset(int i, char **name, game_params **params) | 299 | static int game_fetch_preset(int i, char **name, game_params **params) |
300 | { | 300 | { |
301 | static struct { | 301 | static struct { |
302 | char *title; | 302 | const char *title; |
303 | game_params params; | 303 | game_params params; |
304 | } presets[] = { | 304 | } const presets[] = { |
305 | { "2x2 Trivial", { 2, 2, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } }, | 305 | { "2x2 Trivial", { 2, 2, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } }, |
306 | { "2x3 Basic", { 2, 3, SYMM_ROT2, DIFF_SIMPLE, DIFF_KMINMAX, FALSE, FALSE } }, | 306 | { "2x3 Basic", { 2, 3, SYMM_ROT2, DIFF_SIMPLE, DIFF_KMINMAX, FALSE, FALSE } }, |
307 | { "3x3 Trivial", { 3, 3, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } }, | 307 | { "3x3 Trivial", { 3, 3, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } }, |
@@ -445,46 +445,39 @@ static config_item *game_configure(const game_params *params) | |||
445 | ret[0].name = "Columns of sub-blocks"; | 445 | ret[0].name = "Columns of sub-blocks"; |
446 | ret[0].type = C_STRING; | 446 | ret[0].type = C_STRING; |
447 | sprintf(buf, "%d", params->c); | 447 | sprintf(buf, "%d", params->c); |
448 | ret[0].sval = dupstr(buf); | 448 | ret[0].u.string.sval = dupstr(buf); |
449 | ret[0].ival = 0; | ||
450 | 449 | ||
451 | ret[1].name = "Rows of sub-blocks"; | 450 | ret[1].name = "Rows of sub-blocks"; |
452 | ret[1].type = C_STRING; | 451 | ret[1].type = C_STRING; |
453 | sprintf(buf, "%d", params->r); | 452 | sprintf(buf, "%d", params->r); |
454 | ret[1].sval = dupstr(buf); | 453 | ret[1].u.string.sval = dupstr(buf); |
455 | ret[1].ival = 0; | ||
456 | 454 | ||
457 | ret[2].name = "\"X\" (require every number in each main diagonal)"; | 455 | ret[2].name = "\"X\" (require every number in each main diagonal)"; |
458 | ret[2].type = C_BOOLEAN; | 456 | ret[2].type = C_BOOLEAN; |
459 | ret[2].sval = NULL; | 457 | ret[2].u.boolean.bval = params->xtype; |
460 | ret[2].ival = params->xtype; | ||
461 | 458 | ||
462 | ret[3].name = "Jigsaw (irregularly shaped sub-blocks)"; | 459 | ret[3].name = "Jigsaw (irregularly shaped sub-blocks)"; |
463 | ret[3].type = C_BOOLEAN; | 460 | ret[3].type = C_BOOLEAN; |
464 | ret[3].sval = NULL; | 461 | ret[3].u.boolean.bval = (params->r == 1); |
465 | ret[3].ival = (params->r == 1); | ||
466 | 462 | ||
467 | ret[4].name = "Killer (digit sums)"; | 463 | ret[4].name = "Killer (digit sums)"; |
468 | ret[4].type = C_BOOLEAN; | 464 | ret[4].type = C_BOOLEAN; |
469 | ret[4].sval = NULL; | 465 | ret[4].u.boolean.bval = params->killer; |
470 | ret[4].ival = params->killer; | ||
471 | 466 | ||
472 | ret[5].name = "Symmetry"; | 467 | ret[5].name = "Symmetry"; |
473 | ret[5].type = C_CHOICES; | 468 | ret[5].type = C_CHOICES; |
474 | ret[5].sval = ":None:2-way rotation:4-way rotation:2-way mirror:" | 469 | ret[5].u.choices.choicenames = ":None:2-way rotation:4-way rotation:2-way mirror:" |
475 | "2-way diagonal mirror:4-way mirror:4-way diagonal mirror:" | 470 | "2-way diagonal mirror:4-way mirror:4-way diagonal mirror:" |
476 | "8-way mirror"; | 471 | "8-way mirror"; |
477 | ret[5].ival = params->symm; | 472 | ret[5].u.choices.selected = params->symm; |
478 | 473 | ||
479 | ret[6].name = "Difficulty"; | 474 | ret[6].name = "Difficulty"; |
480 | ret[6].type = C_CHOICES; | 475 | ret[6].type = C_CHOICES; |
481 | ret[6].sval = ":Trivial:Basic:Intermediate:Advanced:Extreme:Unreasonable"; | 476 | ret[6].u.choices.choicenames = ":Trivial:Basic:Intermediate:Advanced:Extreme:Unreasonable"; |
482 | ret[6].ival = params->diff; | 477 | ret[6].u.choices.selected = params->diff; |
483 | 478 | ||
484 | ret[7].name = NULL; | 479 | ret[7].name = NULL; |
485 | ret[7].type = C_END; | 480 | ret[7].type = C_END; |
486 | ret[7].sval = NULL; | ||
487 | ret[7].ival = 0; | ||
488 | 481 | ||
489 | return ret; | 482 | return ret; |
490 | } | 483 | } |
@@ -493,22 +486,22 @@ static game_params *custom_params(const config_item *cfg) | |||
493 | { | 486 | { |
494 | game_params *ret = snew(game_params); | 487 | game_params *ret = snew(game_params); |
495 | 488 | ||
496 | ret->c = atoi(cfg[0].sval); | 489 | ret->c = atoi(cfg[0].u.string.sval); |
497 | ret->r = atoi(cfg[1].sval); | 490 | ret->r = atoi(cfg[1].u.string.sval); |
498 | ret->xtype = cfg[2].ival; | 491 | ret->xtype = cfg[2].u.boolean.bval; |
499 | if (cfg[3].ival) { | 492 | if (cfg[3].u.boolean.bval) { |
500 | ret->c *= ret->r; | 493 | ret->c *= ret->r; |
501 | ret->r = 1; | 494 | ret->r = 1; |
502 | } | 495 | } |
503 | ret->killer = cfg[4].ival; | 496 | ret->killer = cfg[4].u.boolean.bval; |
504 | ret->symm = cfg[5].ival; | 497 | ret->symm = cfg[5].u.choices.selected; |
505 | ret->diff = cfg[6].ival; | 498 | ret->diff = cfg[6].u.choices.selected; |
506 | ret->kdiff = DIFF_KINTERSECT; | 499 | ret->kdiff = DIFF_KINTERSECT; |
507 | 500 | ||
508 | return ret; | 501 | return ret; |
509 | } | 502 | } |
510 | 503 | ||
511 | static char *validate_params(const game_params *params, int full) | 504 | static const char *validate_params(const game_params *params, int full) |
512 | { | 505 | { |
513 | if (params->c < 2) | 506 | if (params->c < 2) |
514 | return "Both dimensions must be at least 2"; | 507 | return "Both dimensions must be at least 2"; |
@@ -838,19 +831,20 @@ static void solver_place(struct solver_usage *usage, int x, int y, int n) | |||
838 | */ | 831 | */ |
839 | struct solver_scratch; | 832 | struct solver_scratch; |
840 | static int solver_elim(struct solver_usage *usage, int *indices, | 833 | static int solver_elim(struct solver_usage *usage, int *indices, |
841 | char *fmt, ...) __attribute__((format(printf,3,4))); | 834 | const char *fmt, ...) |
835 | __attribute__((format(printf,3,4))); | ||
842 | static int solver_intersect(struct solver_usage *usage, | 836 | static int solver_intersect(struct solver_usage *usage, |
843 | int *indices1, int *indices2, char *fmt, ...) | 837 | int *indices1, int *indices2, const char *fmt, ...) |
844 | __attribute__((format(printf,4,5))); | 838 | __attribute__((format(printf,4,5))); |
845 | static int solver_set(struct solver_usage *usage, | 839 | static int solver_set(struct solver_usage *usage, |
846 | struct solver_scratch *scratch, | 840 | struct solver_scratch *scratch, |
847 | int *indices, char *fmt, ...) | 841 | int *indices, const char *fmt, ...) |
848 | __attribute__((format(printf,4,5))); | 842 | __attribute__((format(printf,4,5))); |
849 | #endif | 843 | #endif |
850 | 844 | ||
851 | static int solver_elim(struct solver_usage *usage, int *indices | 845 | static int solver_elim(struct solver_usage *usage, int *indices |
852 | #ifdef STANDALONE_SOLVER | 846 | #ifdef STANDALONE_SOLVER |
853 | , char *fmt, ... | 847 | , const char *fmt, ... |
854 | #endif | 848 | #endif |
855 | ) | 849 | ) |
856 | { | 850 | { |
@@ -914,7 +908,7 @@ static int solver_elim(struct solver_usage *usage, int *indices | |||
914 | static int solver_intersect(struct solver_usage *usage, | 908 | static int solver_intersect(struct solver_usage *usage, |
915 | int *indices1, int *indices2 | 909 | int *indices1, int *indices2 |
916 | #ifdef STANDALONE_SOLVER | 910 | #ifdef STANDALONE_SOLVER |
917 | , char *fmt, ... | 911 | , const char *fmt, ... |
918 | #endif | 912 | #endif |
919 | ) | 913 | ) |
920 | { | 914 | { |
@@ -992,7 +986,7 @@ static int solver_set(struct solver_usage *usage, | |||
992 | struct solver_scratch *scratch, | 986 | struct solver_scratch *scratch, |
993 | int *indices | 987 | int *indices |
994 | #ifdef STANDALONE_SOLVER | 988 | #ifdef STANDALONE_SOLVER |
995 | , char *fmt, ... | 989 | , const char *fmt, ... |
996 | #endif | 990 | #endif |
997 | ) | 991 | ) |
998 | { | 992 | { |
@@ -1358,7 +1352,7 @@ static int solver_forcing(struct solver_usage *usage, | |||
1358 | (ondiag1(yt*cr+xt) && ondiag1(y*cr+x)))))) { | 1352 | (ondiag1(yt*cr+xt) && ondiag1(y*cr+x)))))) { |
1359 | #ifdef STANDALONE_SOLVER | 1353 | #ifdef STANDALONE_SOLVER |
1360 | if (solver_show_working) { | 1354 | if (solver_show_working) { |
1361 | char *sep = ""; | 1355 | const char *sep = ""; |
1362 | int xl, yl; | 1356 | int xl, yl; |
1363 | printf("%*sforcing chain, %d at ends of ", | 1357 | printf("%*sforcing chain, %d at ends of ", |
1364 | solver_recurse_depth*4, "", orign); | 1358 | solver_recurse_depth*4, "", orign); |
@@ -2523,7 +2517,7 @@ static void solver(int cr, struct block_structure *blocks, | |||
2523 | 2517 | ||
2524 | #ifdef STANDALONE_SOLVER | 2518 | #ifdef STANDALONE_SOLVER |
2525 | if (solver_show_working) { | 2519 | if (solver_show_working) { |
2526 | char *sep = ""; | 2520 | const char *sep = ""; |
2527 | printf("%*srecursing on (%d,%d) [", | 2521 | printf("%*srecursing on (%d,%d) [", |
2528 | solver_recurse_depth*4, "", x + 1, y + 1); | 2522 | solver_recurse_depth*4, "", x + 1, y + 1); |
2529 | for (i = 0; i < j; i++) { | 2523 | for (i = 0; i < j; i++) { |
@@ -3161,7 +3155,8 @@ static int symmetries(const game_params *params, int x, int y, | |||
3161 | static char *encode_solve_move(int cr, digit *grid) | 3155 | static char *encode_solve_move(int cr, digit *grid) |
3162 | { | 3156 | { |
3163 | int i, len; | 3157 | int i, len; |
3164 | char *ret, *p, *sep; | 3158 | char *ret, *p; |
3159 | const char *sep; | ||
3165 | 3160 | ||
3166 | /* | 3161 | /* |
3167 | * It's surprisingly easy to work out _exactly_ how long this | 3162 | * It's surprisingly easy to work out _exactly_ how long this |
@@ -3861,7 +3856,8 @@ static const char *spec_to_grid(const char *desc, digit *grid, int area) | |||
3861 | * end of the block spec, and return an error string or NULL if everything | 3856 | * end of the block spec, and return an error string or NULL if everything |
3862 | * is OK. The DSF is stored in *PDSF. | 3857 | * is OK. The DSF is stored in *PDSF. |
3863 | */ | 3858 | */ |
3864 | static char *spec_to_dsf(const char **pdesc, int **pdsf, int cr, int area) | 3859 | static const char *spec_to_dsf(const char **pdesc, int **pdsf, |
3860 | int cr, int area) | ||
3865 | { | 3861 | { |
3866 | const char *desc = *pdesc; | 3862 | const char *desc = *pdesc; |
3867 | int pos = 0; | 3863 | int pos = 0; |
@@ -3929,7 +3925,7 @@ static char *spec_to_dsf(const char **pdesc, int **pdsf, int cr, int area) | |||
3929 | return NULL; | 3925 | return NULL; |
3930 | } | 3926 | } |
3931 | 3927 | ||
3932 | static char *validate_grid_desc(const char **pdesc, int range, int area) | 3928 | static const char *validate_grid_desc(const char **pdesc, int range, int area) |
3933 | { | 3929 | { |
3934 | const char *desc = *pdesc; | 3930 | const char *desc = *pdesc; |
3935 | int squares = 0; | 3931 | int squares = 0; |
@@ -3959,11 +3955,11 @@ static char *validate_grid_desc(const char **pdesc, int range, int area) | |||
3959 | return NULL; | 3955 | return NULL; |
3960 | } | 3956 | } |
3961 | 3957 | ||
3962 | static char *validate_block_desc(const char **pdesc, int cr, int area, | 3958 | static const char *validate_block_desc(const char **pdesc, int cr, int area, |
3963 | int min_nr_blocks, int max_nr_blocks, | 3959 | int min_nr_blocks, int max_nr_blocks, |
3964 | int min_nr_squares, int max_nr_squares) | 3960 | int min_nr_squares, int max_nr_squares) |
3965 | { | 3961 | { |
3966 | char *err; | 3962 | const char *err; |
3967 | int *dsf; | 3963 | int *dsf; |
3968 | 3964 | ||
3969 | err = spec_to_dsf(pdesc, &dsf, cr, area); | 3965 | err = spec_to_dsf(pdesc, &dsf, cr, area); |
@@ -4036,10 +4032,10 @@ static char *validate_block_desc(const char **pdesc, int cr, int area, | |||
4036 | return NULL; | 4032 | return NULL; |
4037 | } | 4033 | } |
4038 | 4034 | ||
4039 | static char *validate_desc(const game_params *params, const char *desc) | 4035 | static const char *validate_desc(const game_params *params, const char *desc) |
4040 | { | 4036 | { |
4041 | int cr = params->c * params->r, area = cr*cr; | 4037 | int cr = params->c * params->r, area = cr*cr; |
4042 | char *err; | 4038 | const char *err; |
4043 | 4039 | ||
4044 | err = validate_grid_desc(&desc, cr, area); | 4040 | err = validate_grid_desc(&desc, cr, area); |
4045 | if (err) | 4041 | if (err) |
@@ -4116,7 +4112,7 @@ static game_state *new_game(midend *me, const game_params *params, | |||
4116 | state->immutable[i] = TRUE; | 4112 | state->immutable[i] = TRUE; |
4117 | 4113 | ||
4118 | if (r == 1) { | 4114 | if (r == 1) { |
4119 | char *err; | 4115 | const char *err; |
4120 | int *dsf; | 4116 | int *dsf; |
4121 | assert(*desc == ','); | 4117 | assert(*desc == ','); |
4122 | desc++; | 4118 | desc++; |
@@ -4134,7 +4130,7 @@ static game_state *new_game(midend *me, const game_params *params, | |||
4134 | make_blocks_from_whichblock(state->blocks); | 4130 | make_blocks_from_whichblock(state->blocks); |
4135 | 4131 | ||
4136 | if (params->killer) { | 4132 | if (params->killer) { |
4137 | char *err; | 4133 | const char *err; |
4138 | int *dsf; | 4134 | int *dsf; |
4139 | assert(*desc == ','); | 4135 | assert(*desc == ','); |
4140 | desc++; | 4136 | desc++; |
@@ -4234,7 +4230,7 @@ static void free_game(game_state *state) | |||
4234 | } | 4230 | } |
4235 | 4231 | ||
4236 | static char *solve_game(const game_state *state, const game_state *currstate, | 4232 | static char *solve_game(const game_state *state, const game_state *currstate, |
4237 | const char *ai, char **error) | 4233 | const char *ai, const char **error) |
4238 | { | 4234 | { |
4239 | int cr = state->cr; | 4235 | int cr = state->cr; |
4240 | char *ret; | 4236 | char *ret; |
@@ -4586,7 +4582,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
4586 | ui->hpencil = 0; | 4582 | ui->hpencil = 0; |
4587 | } | 4583 | } |
4588 | ui->hcursor = 0; | 4584 | ui->hcursor = 0; |
4589 | return ""; /* UI activity occurred */ | 4585 | return UI_UPDATE; |
4590 | } | 4586 | } |
4591 | if (button == RIGHT_BUTTON) { | 4587 | if (button == RIGHT_BUTTON) { |
4592 | /* | 4588 | /* |
@@ -4606,19 +4602,19 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
4606 | ui->hshow = 0; | 4602 | ui->hshow = 0; |
4607 | } | 4603 | } |
4608 | ui->hcursor = 0; | 4604 | ui->hcursor = 0; |
4609 | return ""; /* UI activity occurred */ | 4605 | return UI_UPDATE; |
4610 | } | 4606 | } |
4611 | } | 4607 | } |
4612 | if (IS_CURSOR_MOVE(button)) { | 4608 | if (IS_CURSOR_MOVE(button)) { |
4613 | move_cursor(button, &ui->hx, &ui->hy, cr, cr, 0); | 4609 | move_cursor(button, &ui->hx, &ui->hy, cr, cr, 0); |
4614 | ui->hshow = ui->hcursor = 1; | 4610 | ui->hshow = ui->hcursor = 1; |
4615 | return ""; | 4611 | return UI_UPDATE; |
4616 | } | 4612 | } |
4617 | if (ui->hshow && | 4613 | if (ui->hshow && |
4618 | (button == CURSOR_SELECT)) { | 4614 | (button == CURSOR_SELECT)) { |
4619 | ui->hpencil = 1 - ui->hpencil; | 4615 | ui->hpencil = 1 - ui->hpencil; |
4620 | ui->hcursor = 1; | 4616 | ui->hcursor = 1; |
4621 | return ""; | 4617 | return UI_UPDATE; |
4622 | } | 4618 | } |
4623 | 4619 | ||
4624 | if (ui->hshow && | 4620 | if (ui->hshow && |
@@ -5584,7 +5580,8 @@ int main(int argc, char **argv) | |||
5584 | { | 5580 | { |
5585 | game_params *p; | 5581 | game_params *p; |
5586 | game_state *s; | 5582 | game_state *s; |
5587 | char *id = NULL, *desc, *err; | 5583 | char *id = NULL, *desc; |
5584 | const char *err; | ||
5588 | int grade = FALSE; | 5585 | int grade = FALSE; |
5589 | struct difficulty dlev; | 5586 | struct difficulty dlev; |
5590 | 5587 | ||
diff --git a/apps/plugins/puzzles/src/tents.c b/apps/plugins/puzzles/src/tents.c index 4ffeb7be64..48d420e5b7 100644 --- a/apps/plugins/puzzles/src/tents.c +++ b/apps/plugins/puzzles/src/tents.c | |||
@@ -371,24 +371,20 @@ static config_item *game_configure(const game_params *params) | |||
371 | ret[0].name = "Width"; | 371 | ret[0].name = "Width"; |
372 | ret[0].type = C_STRING; | 372 | ret[0].type = C_STRING; |
373 | sprintf(buf, "%d", params->w); | 373 | sprintf(buf, "%d", params->w); |
374 | ret[0].sval = dupstr(buf); | 374 | ret[0].u.string.sval = dupstr(buf); |
375 | ret[0].ival = 0; | ||
376 | 375 | ||
377 | ret[1].name = "Height"; | 376 | ret[1].name = "Height"; |
378 | ret[1].type = C_STRING; | 377 | ret[1].type = C_STRING; |
379 | sprintf(buf, "%d", params->h); | 378 | sprintf(buf, "%d", params->h); |
380 | ret[1].sval = dupstr(buf); | 379 | ret[1].u.string.sval = dupstr(buf); |
381 | ret[1].ival = 0; | ||
382 | 380 | ||
383 | ret[2].name = "Difficulty"; | 381 | ret[2].name = "Difficulty"; |
384 | ret[2].type = C_CHOICES; | 382 | ret[2].type = C_CHOICES; |
385 | ret[2].sval = DIFFCONFIG; | 383 | ret[2].u.choices.choicenames = DIFFCONFIG; |
386 | ret[2].ival = params->diff; | 384 | ret[2].u.choices.selected = params->diff; |
387 | 385 | ||
388 | ret[3].name = NULL; | 386 | ret[3].name = NULL; |
389 | ret[3].type = C_END; | 387 | ret[3].type = C_END; |
390 | ret[3].sval = NULL; | ||
391 | ret[3].ival = 0; | ||
392 | 388 | ||
393 | return ret; | 389 | return ret; |
394 | } | 390 | } |
@@ -397,14 +393,14 @@ static game_params *custom_params(const config_item *cfg) | |||
397 | { | 393 | { |
398 | game_params *ret = snew(game_params); | 394 | game_params *ret = snew(game_params); |
399 | 395 | ||
400 | ret->w = atoi(cfg[0].sval); | 396 | ret->w = atoi(cfg[0].u.string.sval); |
401 | ret->h = atoi(cfg[1].sval); | 397 | ret->h = atoi(cfg[1].u.string.sval); |
402 | ret->diff = cfg[2].ival; | 398 | ret->diff = cfg[2].u.choices.selected; |
403 | 399 | ||
404 | return ret; | 400 | return ret; |
405 | } | 401 | } |
406 | 402 | ||
407 | static char *validate_params(const game_params *params, int full) | 403 | static const char *validate_params(const game_params *params, int full) |
408 | { | 404 | { |
409 | /* | 405 | /* |
410 | * Generating anything under 4x4 runs into trouble of one kind | 406 | * Generating anything under 4x4 runs into trouble of one kind |
@@ -1190,7 +1186,7 @@ static char *new_game_desc(const game_params *params_in, random_state *rs, | |||
1190 | return ret; | 1186 | return ret; |
1191 | } | 1187 | } |
1192 | 1188 | ||
1193 | static char *validate_desc(const game_params *params, const char *desc) | 1189 | static const char *validate_desc(const game_params *params, const char *desc) |
1194 | { | 1190 | { |
1195 | int w = params->w, h = params->h; | 1191 | int w = params->w, h = params->h; |
1196 | int area, i; | 1192 | int area, i; |
@@ -1316,7 +1312,7 @@ static void free_game(game_state *state) | |||
1316 | } | 1312 | } |
1317 | 1313 | ||
1318 | static char *solve_game(const game_state *state, const game_state *currstate, | 1314 | static char *solve_game(const game_state *state, const game_state *currstate, |
1319 | const char *aux, char **error) | 1315 | const char *aux, const char **error) |
1320 | { | 1316 | { |
1321 | int w = state->p.w, h = state->p.h; | 1317 | int w = state->p.w, h = state->p.h; |
1322 | 1318 | ||
@@ -1559,13 +1555,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1559 | ui->dsy = ui->dey = y; | 1555 | ui->dsy = ui->dey = y; |
1560 | ui->drag_ok = TRUE; | 1556 | ui->drag_ok = TRUE; |
1561 | ui->cdisp = 0; | 1557 | ui->cdisp = 0; |
1562 | return ""; /* ui updated */ | 1558 | return UI_UPDATE; |
1563 | } | 1559 | } |
1564 | 1560 | ||
1565 | if ((IS_MOUSE_DRAG(button) || IS_MOUSE_RELEASE(button)) && | 1561 | if ((IS_MOUSE_DRAG(button) || IS_MOUSE_RELEASE(button)) && |
1566 | ui->drag_button > 0) { | 1562 | ui->drag_button > 0) { |
1567 | int xmin, ymin, xmax, ymax; | 1563 | int xmin, ymin, xmax, ymax; |
1568 | char *buf, *sep; | 1564 | char *buf; |
1565 | const char *sep; | ||
1569 | int buflen, bufsize, tmplen; | 1566 | int buflen, bufsize, tmplen; |
1570 | 1567 | ||
1571 | x = FROMCOORD(x); | 1568 | x = FROMCOORD(x); |
@@ -1590,14 +1587,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1590 | } | 1587 | } |
1591 | 1588 | ||
1592 | if (IS_MOUSE_DRAG(button)) | 1589 | if (IS_MOUSE_DRAG(button)) |
1593 | return ""; /* ui updated */ | 1590 | return UI_UPDATE; |
1594 | 1591 | ||
1595 | /* | 1592 | /* |
1596 | * The drag has been released. Enact it. | 1593 | * The drag has been released. Enact it. |
1597 | */ | 1594 | */ |
1598 | if (!ui->drag_ok) { | 1595 | if (!ui->drag_ok) { |
1599 | ui->drag_button = -1; | 1596 | ui->drag_button = -1; |
1600 | return ""; /* drag was just cancelled */ | 1597 | return UI_UPDATE; /* drag was just cancelled */ |
1601 | } | 1598 | } |
1602 | 1599 | ||
1603 | xmin = min(ui->dsx, ui->dex); | 1600 | xmin = min(ui->dsx, ui->dex); |
@@ -1635,7 +1632,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1635 | 1632 | ||
1636 | if (buflen == 0) { | 1633 | if (buflen == 0) { |
1637 | sfree(buf); | 1634 | sfree(buf); |
1638 | return ""; /* ui updated (drag was terminated) */ | 1635 | return UI_UPDATE; /* drag was terminated */ |
1639 | } else { | 1636 | } else { |
1640 | buf[buflen] = '\0'; | 1637 | buf[buflen] = '\0'; |
1641 | return buf; | 1638 | return buf; |
@@ -1663,7 +1660,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1663 | if (len) return dupstr(tmpbuf); | 1660 | if (len) return dupstr(tmpbuf); |
1664 | } else | 1661 | } else |
1665 | move_cursor(button, &ui->cx, &ui->cy, w, h, 0); | 1662 | move_cursor(button, &ui->cx, &ui->cy, w, h, 0); |
1666 | return ""; | 1663 | return UI_UPDATE; |
1667 | } | 1664 | } |
1668 | if (ui->cdisp) { | 1665 | if (ui->cdisp) { |
1669 | char rep = 0; | 1666 | char rep = 0; |
@@ -1690,7 +1687,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1690 | } | 1687 | } |
1691 | } else if (IS_CURSOR_SELECT(button)) { | 1688 | } else if (IS_CURSOR_SELECT(button)) { |
1692 | ui->cdisp = 1; | 1689 | ui->cdisp = 1; |
1693 | return ""; | 1690 | return UI_UPDATE; |
1694 | } | 1691 | } |
1695 | 1692 | ||
1696 | return NULL; | 1693 | return NULL; |
@@ -2654,7 +2651,8 @@ int main(int argc, char **argv) | |||
2654 | { | 2651 | { |
2655 | game_params *p; | 2652 | game_params *p; |
2656 | game_state *s, *s2; | 2653 | game_state *s, *s2; |
2657 | char *id = NULL, *desc, *err; | 2654 | char *id = NULL, *desc; |
2655 | const char *err; | ||
2658 | int grade = FALSE; | 2656 | int grade = FALSE; |
2659 | int ret, diff, really_verbose = FALSE; | 2657 | int ret, diff, really_verbose = FALSE; |
2660 | struct solver_scratch *sc; | 2658 | struct solver_scratch *sc; |
diff --git a/apps/plugins/puzzles/src/towers.c b/apps/plugins/puzzles/src/towers.c index a3a7e55a45..9ccc6ae185 100644 --- a/apps/plugins/puzzles/src/towers.c +++ b/apps/plugins/puzzles/src/towers.c | |||
@@ -212,18 +212,15 @@ static config_item *game_configure(const game_params *params) | |||
212 | ret[0].name = "Grid size"; | 212 | ret[0].name = "Grid size"; |
213 | ret[0].type = C_STRING; | 213 | ret[0].type = C_STRING; |
214 | sprintf(buf, "%d", params->w); | 214 | sprintf(buf, "%d", params->w); |
215 | ret[0].sval = dupstr(buf); | 215 | ret[0].u.string.sval = dupstr(buf); |
216 | ret[0].ival = 0; | ||
217 | 216 | ||
218 | ret[1].name = "Difficulty"; | 217 | ret[1].name = "Difficulty"; |
219 | ret[1].type = C_CHOICES; | 218 | ret[1].type = C_CHOICES; |
220 | ret[1].sval = DIFFCONFIG; | 219 | ret[1].u.choices.choicenames = DIFFCONFIG; |
221 | ret[1].ival = params->diff; | 220 | ret[1].u.choices.selected = params->diff; |
222 | 221 | ||
223 | ret[2].name = NULL; | 222 | ret[2].name = NULL; |
224 | ret[2].type = C_END; | 223 | ret[2].type = C_END; |
225 | ret[2].sval = NULL; | ||
226 | ret[2].ival = 0; | ||
227 | 224 | ||
228 | return ret; | 225 | return ret; |
229 | } | 226 | } |
@@ -232,13 +229,13 @@ static game_params *custom_params(const config_item *cfg) | |||
232 | { | 229 | { |
233 | game_params *ret = snew(game_params); | 230 | game_params *ret = snew(game_params); |
234 | 231 | ||
235 | ret->w = atoi(cfg[0].sval); | 232 | ret->w = atoi(cfg[0].u.string.sval); |
236 | ret->diff = cfg[1].ival; | 233 | ret->diff = cfg[1].u.choices.selected; |
237 | 234 | ||
238 | return ret; | 235 | return ret; |
239 | } | 236 | } |
240 | 237 | ||
241 | static char *validate_params(const game_params *params, int full) | 238 | static const char *validate_params(const game_params *params, int full) |
242 | { | 239 | { |
243 | if (params->w < 3 || params->w > 9) | 240 | if (params->w < 3 || params->w > 9) |
244 | return "Grid size must be between 3 and 9"; | 241 | return "Grid size must be between 3 and 9"; |
@@ -802,7 +799,7 @@ done | |||
802 | * Gameplay. | 799 | * Gameplay. |
803 | */ | 800 | */ |
804 | 801 | ||
805 | static char *validate_desc(const game_params *params, const char *desc) | 802 | static const char *validate_desc(const game_params *params, const char *desc) |
806 | { | 803 | { |
807 | int w = params->w, a = w*w; | 804 | int w = params->w, a = w*w; |
808 | const char *p = desc; | 805 | const char *p = desc; |
@@ -970,7 +967,7 @@ static void free_game(game_state *state) | |||
970 | } | 967 | } |
971 | 968 | ||
972 | static char *solve_game(const game_state *state, const game_state *currstate, | 969 | static char *solve_game(const game_state *state, const game_state *currstate, |
973 | const char *aux, char **error) | 970 | const char *aux, const char **error) |
974 | { | 971 | { |
975 | int w = state->par.w, a = w*w; | 972 | int w = state->par.w, a = w*w; |
976 | int i, ret; | 973 | int i, ret; |
@@ -1349,7 +1346,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1349 | ui->hpencil = 0; | 1346 | ui->hpencil = 0; |
1350 | } | 1347 | } |
1351 | ui->hcursor = 0; | 1348 | ui->hcursor = 0; |
1352 | return ""; /* UI activity occurred */ | 1349 | return UI_UPDATE; |
1353 | } | 1350 | } |
1354 | if (button == RIGHT_BUTTON) { | 1351 | if (button == RIGHT_BUTTON) { |
1355 | /* | 1352 | /* |
@@ -1369,7 +1366,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1369 | ui->hshow = 0; | 1366 | ui->hshow = 0; |
1370 | } | 1367 | } |
1371 | ui->hcursor = 0; | 1368 | ui->hcursor = 0; |
1372 | return ""; /* UI activity occurred */ | 1369 | return UI_UPDATE; |
1373 | } | 1370 | } |
1374 | } else if (button == LEFT_BUTTON) { | 1371 | } else if (button == LEFT_BUTTON) { |
1375 | if (is_clue(state, tx, ty)) { | 1372 | if (is_clue(state, tx, ty)) { |
@@ -1394,13 +1391,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1394 | } | 1391 | } |
1395 | move_cursor(button, &ui->hx, &ui->hy, w, w, 0); | 1392 | move_cursor(button, &ui->hx, &ui->hy, w, w, 0); |
1396 | ui->hshow = ui->hcursor = 1; | 1393 | ui->hshow = ui->hcursor = 1; |
1397 | return ""; | 1394 | return UI_UPDATE; |
1398 | } | 1395 | } |
1399 | if (ui->hshow && | 1396 | if (ui->hshow && |
1400 | (button == CURSOR_SELECT)) { | 1397 | (button == CURSOR_SELECT)) { |
1401 | ui->hpencil = 1 - ui->hpencil; | 1398 | ui->hpencil = 1 - ui->hpencil; |
1402 | ui->hcursor = 1; | 1399 | ui->hcursor = 1; |
1403 | return ""; | 1400 | return UI_UPDATE; |
1404 | } | 1401 | } |
1405 | 1402 | ||
1406 | if (ui->hshow && | 1403 | if (ui->hshow && |
@@ -2021,7 +2018,8 @@ int main(int argc, char **argv) | |||
2021 | { | 2018 | { |
2022 | game_params *p; | 2019 | game_params *p; |
2023 | game_state *s; | 2020 | game_state *s; |
2024 | char *id = NULL, *desc, *err; | 2021 | char *id = NULL, *desc; |
2022 | const char *err; | ||
2025 | int grade = FALSE; | 2023 | int grade = FALSE; |
2026 | int ret, diff, really_show_working = FALSE; | 2024 | int ret, diff, really_show_working = FALSE; |
2027 | 2025 | ||
diff --git a/apps/plugins/puzzles/src/tracks.c b/apps/plugins/puzzles/src/tracks.c index 578813b1a3..3899007c94 100644 --- a/apps/plugins/puzzles/src/tracks.c +++ b/apps/plugins/puzzles/src/tracks.c | |||
@@ -148,28 +148,24 @@ static config_item *game_configure(const game_params *params) | |||
148 | ret[0].name = "Width"; | 148 | ret[0].name = "Width"; |
149 | ret[0].type = C_STRING; | 149 | ret[0].type = C_STRING; |
150 | sprintf(buf, "%d", params->w); | 150 | sprintf(buf, "%d", params->w); |
151 | ret[0].sval = dupstr(buf); | 151 | ret[0].u.string.sval = dupstr(buf); |
152 | ret[0].ival = 0; | ||
153 | 152 | ||
154 | ret[1].name = "Height"; | 153 | ret[1].name = "Height"; |
155 | ret[1].type = C_STRING; | 154 | ret[1].type = C_STRING; |
156 | sprintf(buf, "%d", params->h); | 155 | sprintf(buf, "%d", params->h); |
157 | ret[1].sval = dupstr(buf); | 156 | ret[1].u.string.sval = dupstr(buf); |
158 | ret[1].ival = 0; | ||
159 | 157 | ||
160 | ret[2].name = "Difficulty"; | 158 | ret[2].name = "Difficulty"; |
161 | ret[2].type = C_CHOICES; | 159 | ret[2].type = C_CHOICES; |
162 | ret[2].sval = DIFFCONFIG; | 160 | ret[2].u.choices.choicenames = DIFFCONFIG; |
163 | ret[2].ival = params->diff; | 161 | ret[2].u.choices.selected = params->diff; |
164 | 162 | ||
165 | ret[3].name = "Disallow consecutive 1 clues"; | 163 | ret[3].name = "Disallow consecutive 1 clues"; |
166 | ret[3].type = C_BOOLEAN; | 164 | ret[3].type = C_BOOLEAN; |
167 | ret[3].ival = params->single_ones; | 165 | ret[3].u.boolean.bval = params->single_ones; |
168 | 166 | ||
169 | ret[4].name = NULL; | 167 | ret[4].name = NULL; |
170 | ret[4].type = C_END; | 168 | ret[4].type = C_END; |
171 | ret[4].sval = NULL; | ||
172 | ret[4].ival = 0; | ||
173 | 169 | ||
174 | return ret; | 170 | return ret; |
175 | } | 171 | } |
@@ -178,15 +174,15 @@ static game_params *custom_params(const config_item *cfg) | |||
178 | { | 174 | { |
179 | game_params *ret = snew(game_params); | 175 | game_params *ret = snew(game_params); |
180 | 176 | ||
181 | ret->w = atoi(cfg[0].sval); | 177 | ret->w = atoi(cfg[0].u.string.sval); |
182 | ret->h = atoi(cfg[1].sval); | 178 | ret->h = atoi(cfg[1].u.string.sval); |
183 | ret->diff = cfg[2].ival; | 179 | ret->diff = cfg[2].u.choices.selected; |
184 | ret->single_ones = cfg[3].ival; | 180 | ret->single_ones = cfg[3].u.boolean.bval; |
185 | 181 | ||
186 | return ret; | 182 | return ret; |
187 | } | 183 | } |
188 | 184 | ||
189 | static char *validate_params(const game_params *params, int full) | 185 | static const char *validate_params(const game_params *params, int full) |
190 | { | 186 | { |
191 | /* | 187 | /* |
192 | * Generating anything under 4x4 runs into trouble of one kind | 188 | * Generating anything under 4x4 runs into trouble of one kind |
@@ -786,7 +782,7 @@ newpath: | |||
786 | return desc; | 782 | return desc; |
787 | } | 783 | } |
788 | 784 | ||
789 | static char *validate_desc(const game_params *params, const char *desc) | 785 | static const char *validate_desc(const game_params *params, const char *desc) |
790 | { | 786 | { |
791 | int i = 0, w = params->w, h = params->h, in = 0, out = 0; | 787 | int i = 0, w = params->w, h = params->h, in = 0, out = 0; |
792 | 788 | ||
@@ -1368,7 +1364,7 @@ static char *move_string_diff(const game_state *before, const game_state *after, | |||
1368 | } | 1364 | } |
1369 | 1365 | ||
1370 | static char *solve_game(const game_state *state, const game_state *currstate, | 1366 | static char *solve_game(const game_state *state, const game_state *currstate, |
1371 | const char *aux, char **error) | 1367 | const char *aux, const char **error) |
1372 | { | 1368 | { |
1373 | game_state *solved; | 1369 | game_state *solved; |
1374 | int ret; | 1370 | int ret; |
@@ -1922,13 +1918,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1922 | ui->drag_sx = ui->drag_ex = gx; | 1918 | ui->drag_sx = ui->drag_ex = gx; |
1923 | ui->drag_sy = ui->drag_ey = gy; | 1919 | ui->drag_sy = ui->drag_ey = gy; |
1924 | 1920 | ||
1925 | return ""; | 1921 | return UI_UPDATE; |
1926 | } | 1922 | } |
1927 | 1923 | ||
1928 | if (IS_MOUSE_DRAG(button)) { | 1924 | if (IS_MOUSE_DRAG(button)) { |
1929 | ui->cursor_active = FALSE; | 1925 | ui->cursor_active = FALSE; |
1930 | update_ui_drag(state, ui, gx, gy); | 1926 | update_ui_drag(state, ui, gx, gy); |
1931 | return ""; | 1927 | return UI_UPDATE; |
1932 | } | 1928 | } |
1933 | 1929 | ||
1934 | if (IS_MOUSE_RELEASE(button)) { | 1930 | if (IS_MOUSE_RELEASE(button)) { |
@@ -1965,12 +1961,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1965 | cy = CENTERED_COORD(gy); | 1961 | cy = CENTERED_COORD(gy); |
1966 | 1962 | ||
1967 | if (!INGRID(state, gx, gy) || FROMCOORD(x) != gx || FROMCOORD(y) != gy) | 1963 | if (!INGRID(state, gx, gy) || FROMCOORD(x) != gx || FROMCOORD(y) != gy) |
1968 | return ""; | 1964 | return UI_UPDATE; |
1969 | 1965 | ||
1970 | if (max(abs(x-cx),abs(y-cy)) < TILE_SIZE/4) { | 1966 | if (max(abs(x-cx),abs(y-cy)) < TILE_SIZE/4) { |
1971 | if (ui_can_flip_square(state, gx, gy, button == RIGHT_RELEASE)) | 1967 | if (ui_can_flip_square(state, gx, gy, button == RIGHT_RELEASE)) |
1972 | return square_flip_str(state, gx, gy, button == RIGHT_RELEASE, tmpbuf); | 1968 | return square_flip_str(state, gx, gy, button == RIGHT_RELEASE, tmpbuf); |
1973 | return ""; | 1969 | return UI_UPDATE; |
1974 | } else { | 1970 | } else { |
1975 | if (abs(x-cx) < abs(y-cy)) { | 1971 | if (abs(x-cx) < abs(y-cy)) { |
1976 | /* Closest to top/bottom edge. */ | 1972 | /* Closest to top/bottom edge. */ |
@@ -1984,7 +1980,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1984 | return edge_flip_str(state, gx, gy, direction, | 1980 | return edge_flip_str(state, gx, gy, direction, |
1985 | button == RIGHT_RELEASE, tmpbuf); | 1981 | button == RIGHT_RELEASE, tmpbuf); |
1986 | else | 1982 | else |
1987 | return ""; | 1983 | return UI_UPDATE; |
1988 | } | 1984 | } |
1989 | } | 1985 | } |
1990 | } | 1986 | } |
@@ -1997,7 +1993,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1997 | 1993 | ||
1998 | if (!ui->cursor_active) { | 1994 | if (!ui->cursor_active) { |
1999 | ui->cursor_active = TRUE; | 1995 | ui->cursor_active = TRUE; |
2000 | return ""; | 1996 | return UI_UPDATE; |
2001 | } | 1997 | } |
2002 | 1998 | ||
2003 | ui->curx = ui->curx + dx; | 1999 | ui->curx = ui->curx + dx; |
@@ -2008,17 +2004,17 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2008 | } | 2004 | } |
2009 | ui->curx = min(max(ui->curx, 1), 2*w-1); | 2005 | ui->curx = min(max(ui->curx, 1), 2*w-1); |
2010 | ui->cury = min(max(ui->cury, 1), 2*h-1); | 2006 | ui->cury = min(max(ui->cury, 1), 2*h-1); |
2011 | return ""; | 2007 | return UI_UPDATE; |
2012 | } | 2008 | } |
2013 | 2009 | ||
2014 | if (IS_CURSOR_SELECT(button)) { | 2010 | if (IS_CURSOR_SELECT(button)) { |
2015 | if (!ui->cursor_active) { | 2011 | if (!ui->cursor_active) { |
2016 | ui->cursor_active = TRUE; | 2012 | ui->cursor_active = TRUE; |
2017 | return ""; | 2013 | return UI_UPDATE; |
2018 | } | 2014 | } |
2019 | /* click on square corner does nothing (shouldn't get here) */ | 2015 | /* click on square corner does nothing (shouldn't get here) */ |
2020 | if ((ui->curx % 2) == 0 && (ui->cury % 2 == 0)) | 2016 | if ((ui->curx % 2) == 0 && (ui->cury % 2 == 0)) |
2021 | return ""; | 2017 | return UI_UPDATE; |
2022 | 2018 | ||
2023 | gx = ui->curx / 2; | 2019 | gx = ui->curx / 2; |
2024 | gy = ui->cury / 2; | 2020 | gy = ui->cury / 2; |
@@ -2030,7 +2026,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
2030 | else if (!direction && | 2026 | else if (!direction && |
2031 | ui_can_flip_square(state, gx, gy, button == CURSOR_SELECT2)) | 2027 | ui_can_flip_square(state, gx, gy, button == CURSOR_SELECT2)) |
2032 | return square_flip_str(state, gx, gy, button == CURSOR_SELECT2, tmpbuf); | 2028 | return square_flip_str(state, gx, gy, button == CURSOR_SELECT2, tmpbuf); |
2033 | return ""; | 2029 | return UI_UPDATE; |
2034 | } | 2030 | } |
2035 | 2031 | ||
2036 | #if 0 | 2032 | #if 0 |
@@ -2140,7 +2136,7 @@ enum { | |||
2140 | COL_GRID, COL_CLUE, COL_CURSOR, | 2136 | COL_GRID, COL_CLUE, COL_CURSOR, |
2141 | COL_TRACK, COL_TRACK_CLUE, COL_SLEEPER, | 2137 | COL_TRACK, COL_TRACK_CLUE, COL_SLEEPER, |
2142 | COL_DRAGON, COL_DRAGOFF, | 2138 | COL_DRAGON, COL_DRAGOFF, |
2143 | COL_ERROR, COL_FLASH, | 2139 | COL_ERROR, COL_FLASH, COL_ERROR_BACKGROUND, |
2144 | NCOLOURS | 2140 | NCOLOURS |
2145 | }; | 2141 | }; |
2146 | 2142 | ||
@@ -2152,11 +2148,12 @@ static float *game_colours(frontend *fe, int *ncolours) | |||
2152 | game_mkhighlight(fe, ret, COL_BACKGROUND, COL_HIGHLIGHT, COL_LOWLIGHT); | 2148 | game_mkhighlight(fe, ret, COL_BACKGROUND, COL_HIGHLIGHT, COL_LOWLIGHT); |
2153 | 2149 | ||
2154 | for (i = 0; i < 3; i++) { | 2150 | for (i = 0; i < 3; i++) { |
2155 | ret[COL_TRACK_CLUE * 3 + i] = 0.0F; | 2151 | ret[COL_TRACK_CLUE * 3 + i] = 0.0F; |
2156 | ret[COL_TRACK * 3 + i] = 0.5F; | 2152 | ret[COL_TRACK * 3 + i] = 0.5F; |
2157 | ret[COL_CLUE * 3 + i] = 0.0F; | 2153 | ret[COL_CLUE * 3 + i] = 0.0F; |
2158 | ret[COL_GRID * 3 + i] = 0.75F; | 2154 | ret[COL_GRID * 3 + i] = 0.75F; |
2159 | ret[COL_CURSOR * 3 + i] = 0.6F; | 2155 | ret[COL_CURSOR * 3 + i] = 0.6F; |
2156 | ret[COL_ERROR_BACKGROUND * 3 + i] = 1.0F; | ||
2160 | } | 2157 | } |
2161 | 2158 | ||
2162 | ret[COL_SLEEPER * 3 + 0] = 0.5F; | 2159 | ret[COL_SLEEPER * 3 + 0] = 0.5F; |
@@ -2417,7 +2414,7 @@ static void draw_square(drawing *dr, game_drawstate *ds, | |||
2417 | draw_update(dr, ox, oy, TILE_SIZE, TILE_SIZE); | 2414 | draw_update(dr, ox, oy, TILE_SIZE, TILE_SIZE); |
2418 | } | 2415 | } |
2419 | 2416 | ||
2420 | static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, int col) | 2417 | static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, int col, int bg) |
2421 | { | 2418 | { |
2422 | int cx, cy, tsz = TILE_SIZE/2; | 2419 | int cx, cy, tsz = TILE_SIZE/2; |
2423 | char buf[20]; | 2420 | char buf[20]; |
@@ -2432,7 +2429,7 @@ static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, i | |||
2432 | 2429 | ||
2433 | draw_rect(dr, cx - tsz + GRID_LINE_TL, cy - tsz + GRID_LINE_TL, | 2430 | draw_rect(dr, cx - tsz + GRID_LINE_TL, cy - tsz + GRID_LINE_TL, |
2434 | TILE_SIZE - GRID_LINE_ALL, TILE_SIZE - GRID_LINE_ALL, | 2431 | TILE_SIZE - GRID_LINE_ALL, TILE_SIZE - GRID_LINE_ALL, |
2435 | COL_BACKGROUND); | 2432 | bg); |
2436 | sprintf(buf, "%d", clue); | 2433 | sprintf(buf, "%d", clue); |
2437 | draw_text(dr, cx, cy, FONT_VARIABLE, tsz, ALIGN_VCENTRE|ALIGN_HCENTRE, | 2434 | draw_text(dr, cx, cy, FONT_VARIABLE, tsz, ALIGN_VCENTRE|ALIGN_HCENTRE, |
2438 | col, buf); | 2435 | col, buf); |
@@ -2518,7 +2515,8 @@ static void game_redraw(drawing *dr, game_drawstate *ds, const game_state *oldst | |||
2518 | if (force || (state->num_errors[i] != ds->num_errors[i])) { | 2515 | if (force || (state->num_errors[i] != ds->num_errors[i])) { |
2519 | ds->num_errors[i] = state->num_errors[i]; | 2516 | ds->num_errors[i] = state->num_errors[i]; |
2520 | draw_clue(dr, ds, w, state->numbers->numbers[i], i, | 2517 | draw_clue(dr, ds, w, state->numbers->numbers[i], i, |
2521 | ds->num_errors[i] ? COL_ERROR : COL_CLUE); | 2518 | ds->num_errors[i] ? COL_ERROR : COL_CLUE, |
2519 | ds->num_errors[i] ? COL_ERROR_BACKGROUND : COL_BACKGROUND); | ||
2522 | } | 2520 | } |
2523 | } | 2521 | } |
2524 | 2522 | ||
@@ -2608,7 +2606,8 @@ static void game_print(drawing *dr, const game_state *state, int tilesize) | |||
2608 | 2606 | ||
2609 | /* clue numbers, and loop ends */ | 2607 | /* clue numbers, and loop ends */ |
2610 | for (i = 0; i < w+h; i++) | 2608 | for (i = 0; i < w+h; i++) |
2611 | draw_clue(dr, ds, w, state->numbers->numbers[i], i, black); | 2609 | draw_clue(dr, ds, w, state->numbers->numbers[i], i, |
2610 | black, COL_BACKGROUND); | ||
2612 | draw_loop_ends(dr, ds, state, black); | 2611 | draw_loop_ends(dr, ds, state, black); |
2613 | 2612 | ||
2614 | /* clue tracks / solution */ | 2613 | /* clue tracks / solution */ |
diff --git a/apps/plugins/puzzles/src/twiddle.c b/apps/plugins/puzzles/src/twiddle.c index 224c0418f1..cbf6f761ef 100644 --- a/apps/plugins/puzzles/src/twiddle.c +++ b/apps/plugins/puzzles/src/twiddle.c | |||
@@ -80,9 +80,9 @@ static game_params *dup_params(const game_params *params) | |||
80 | static int game_fetch_preset(int i, char **name, game_params **params) | 80 | static int game_fetch_preset(int i, char **name, game_params **params) |
81 | { | 81 | { |
82 | static struct { | 82 | static struct { |
83 | char *title; | 83 | const char *title; |
84 | game_params params; | 84 | game_params params; |
85 | } presets[] = { | 85 | } const presets[] = { |
86 | { "3x3 rows only", { 3, 3, 2, TRUE, FALSE } }, | 86 | { "3x3 rows only", { 3, 3, 2, TRUE, FALSE } }, |
87 | { "3x3 normal", { 3, 3, 2, FALSE, FALSE } }, | 87 | { "3x3 normal", { 3, 3, 2, FALSE, FALSE } }, |
88 | { "3x3 orientable", { 3, 3, 2, FALSE, TRUE } }, | 88 | { "3x3 orientable", { 3, 3, 2, FALSE, TRUE } }, |
@@ -156,41 +156,33 @@ static config_item *game_configure(const game_params *params) | |||
156 | ret[0].name = "Width"; | 156 | ret[0].name = "Width"; |
157 | ret[0].type = C_STRING; | 157 | ret[0].type = C_STRING; |
158 | sprintf(buf, "%d", params->w); | 158 | sprintf(buf, "%d", params->w); |
159 | ret[0].sval = dupstr(buf); | 159 | ret[0].u.string.sval = dupstr(buf); |
160 | ret[0].ival = 0; | ||
161 | 160 | ||
162 | ret[1].name = "Height"; | 161 | ret[1].name = "Height"; |
163 | ret[1].type = C_STRING; | 162 | ret[1].type = C_STRING; |
164 | sprintf(buf, "%d", params->h); | 163 | sprintf(buf, "%d", params->h); |
165 | ret[1].sval = dupstr(buf); | 164 | ret[1].u.string.sval = dupstr(buf); |
166 | ret[1].ival = 0; | ||
167 | 165 | ||
168 | ret[2].name = "Rotating block size"; | 166 | ret[2].name = "Rotating block size"; |
169 | ret[2].type = C_STRING; | 167 | ret[2].type = C_STRING; |
170 | sprintf(buf, "%d", params->n); | 168 | sprintf(buf, "%d", params->n); |
171 | ret[2].sval = dupstr(buf); | 169 | ret[2].u.string.sval = dupstr(buf); |
172 | ret[2].ival = 0; | ||
173 | 170 | ||
174 | ret[3].name = "One number per row"; | 171 | ret[3].name = "One number per row"; |
175 | ret[3].type = C_BOOLEAN; | 172 | ret[3].type = C_BOOLEAN; |
176 | ret[3].sval = NULL; | 173 | ret[3].u.boolean.bval = params->rowsonly; |
177 | ret[3].ival = params->rowsonly; | ||
178 | 174 | ||
179 | ret[4].name = "Orientation matters"; | 175 | ret[4].name = "Orientation matters"; |
180 | ret[4].type = C_BOOLEAN; | 176 | ret[4].type = C_BOOLEAN; |
181 | ret[4].sval = NULL; | 177 | ret[4].u.boolean.bval = params->orientable; |
182 | ret[4].ival = params->orientable; | ||
183 | 178 | ||
184 | ret[5].name = "Number of shuffling moves"; | 179 | ret[5].name = "Number of shuffling moves"; |
185 | ret[5].type = C_STRING; | 180 | ret[5].type = C_STRING; |
186 | sprintf(buf, "%d", params->movetarget); | 181 | sprintf(buf, "%d", params->movetarget); |
187 | ret[5].sval = dupstr(buf); | 182 | ret[5].u.string.sval = dupstr(buf); |
188 | ret[5].ival = 0; | ||
189 | 183 | ||
190 | ret[6].name = NULL; | 184 | ret[6].name = NULL; |
191 | ret[6].type = C_END; | 185 | ret[6].type = C_END; |
192 | ret[6].sval = NULL; | ||
193 | ret[6].ival = 0; | ||
194 | 186 | ||
195 | return ret; | 187 | return ret; |
196 | } | 188 | } |
@@ -199,17 +191,17 @@ static game_params *custom_params(const config_item *cfg) | |||
199 | { | 191 | { |
200 | game_params *ret = snew(game_params); | 192 | game_params *ret = snew(game_params); |
201 | 193 | ||
202 | ret->w = atoi(cfg[0].sval); | 194 | ret->w = atoi(cfg[0].u.string.sval); |
203 | ret->h = atoi(cfg[1].sval); | 195 | ret->h = atoi(cfg[1].u.string.sval); |
204 | ret->n = atoi(cfg[2].sval); | 196 | ret->n = atoi(cfg[2].u.string.sval); |
205 | ret->rowsonly = cfg[3].ival; | 197 | ret->rowsonly = cfg[3].u.boolean.bval; |
206 | ret->orientable = cfg[4].ival; | 198 | ret->orientable = cfg[4].u.boolean.bval; |
207 | ret->movetarget = atoi(cfg[5].sval); | 199 | ret->movetarget = atoi(cfg[5].u.string.sval); |
208 | 200 | ||
209 | return ret; | 201 | return ret; |
210 | } | 202 | } |
211 | 203 | ||
212 | static char *validate_params(const game_params *params, int full) | 204 | static const char *validate_params(const game_params *params, int full) |
213 | { | 205 | { |
214 | if (params->n < 2) | 206 | if (params->n < 2) |
215 | return "Rotating block size must be at least two"; | 207 | return "Rotating block size must be at least two"; |
@@ -432,7 +424,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
432 | return ret; | 424 | return ret; |
433 | } | 425 | } |
434 | 426 | ||
435 | static char *validate_desc(const game_params *params, const char *desc) | 427 | static const char *validate_desc(const game_params *params, const char *desc) |
436 | { | 428 | { |
437 | const char *p; | 429 | const char *p; |
438 | int w = params->w, h = params->h, wh = w*h; | 430 | int w = params->w, h = params->h, wh = w*h; |
@@ -543,7 +535,7 @@ static int compare_int(const void *av, const void *bv) | |||
543 | } | 535 | } |
544 | 536 | ||
545 | static char *solve_game(const game_state *state, const game_state *currstate, | 537 | static char *solve_game(const game_state *state, const game_state *currstate, |
546 | const char *aux, char **error) | 538 | const char *aux, const char **error) |
547 | { | 539 | { |
548 | return dupstr("S"); | 540 | return dupstr("S"); |
549 | } | 541 | } |
@@ -663,7 +655,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
663 | if (button == CURSOR_DOWN && (ui->cur_y+n) < (h)) | 655 | if (button == CURSOR_DOWN && (ui->cur_y+n) < (h)) |
664 | ui->cur_y++; | 656 | ui->cur_y++; |
665 | ui->cur_visible = 1; | 657 | ui->cur_visible = 1; |
666 | return ""; | 658 | return UI_UPDATE; |
667 | } | 659 | } |
668 | 660 | ||
669 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { | 661 | if (button == LEFT_BUTTON || button == RIGHT_BUTTON) { |
@@ -687,7 +679,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
687 | dir = (button == CURSOR_SELECT2) ? -1 : +1; | 679 | dir = (button == CURSOR_SELECT2) ? -1 : +1; |
688 | } else { | 680 | } else { |
689 | ui->cur_visible = 1; | 681 | ui->cur_visible = 1; |
690 | return ""; | 682 | return UI_UPDATE; |
691 | } | 683 | } |
692 | } else if (button == 'a' || button == 'A' || button==MOD_NUM_KEYPAD+'7') { | 684 | } else if (button == 'a' || button == 'A' || button==MOD_NUM_KEYPAD+'7') { |
693 | x = y = 0; | 685 | x = y = 0; |
diff --git a/apps/plugins/puzzles/src/undead.c b/apps/plugins/puzzles/src/undead.c index b1f536e8d0..df0735e469 100644 --- a/apps/plugins/puzzles/src/undead.c +++ b/apps/plugins/puzzles/src/undead.c | |||
@@ -163,24 +163,20 @@ static config_item *game_configure(const game_params *params) | |||
163 | ret[0].name = "Width"; | 163 | ret[0].name = "Width"; |
164 | ret[0].type = C_STRING; | 164 | ret[0].type = C_STRING; |
165 | sprintf(buf, "%d", params->w); | 165 | sprintf(buf, "%d", params->w); |
166 | ret[0].sval = dupstr(buf); | 166 | ret[0].u.string.sval = dupstr(buf); |
167 | ret[0].ival = 0; | ||
168 | 167 | ||
169 | ret[1].name = "Height"; | 168 | ret[1].name = "Height"; |
170 | ret[1].type = C_STRING; | 169 | ret[1].type = C_STRING; |
171 | sprintf(buf, "%d", params->h); | 170 | sprintf(buf, "%d", params->h); |
172 | ret[1].sval = dupstr(buf); | 171 | ret[1].u.string.sval = dupstr(buf); |
173 | ret[1].ival = 0; | ||
174 | 172 | ||
175 | ret[2].name = "Difficulty"; | 173 | ret[2].name = "Difficulty"; |
176 | ret[2].type = C_CHOICES; | 174 | ret[2].type = C_CHOICES; |
177 | ret[2].sval = DIFFCONFIG; | 175 | ret[2].u.choices.choicenames = DIFFCONFIG; |
178 | ret[2].ival = params->diff; | 176 | ret[2].u.choices.selected = params->diff; |
179 | 177 | ||
180 | ret[3].name = NULL; | 178 | ret[3].name = NULL; |
181 | ret[3].type = C_END; | 179 | ret[3].type = C_END; |
182 | ret[3].sval = NULL; | ||
183 | ret[3].ival = 0; | ||
184 | 180 | ||
185 | return ret; | 181 | return ret; |
186 | } | 182 | } |
@@ -189,13 +185,13 @@ static game_params *custom_params(const config_item *cfg) | |||
189 | { | 185 | { |
190 | game_params *ret = snew(game_params); | 186 | game_params *ret = snew(game_params); |
191 | 187 | ||
192 | ret->w = atoi(cfg[0].sval); | 188 | ret->w = atoi(cfg[0].u.string.sval); |
193 | ret->h = atoi(cfg[1].sval); | 189 | ret->h = atoi(cfg[1].u.string.sval); |
194 | ret->diff = cfg[2].ival; | 190 | ret->diff = cfg[2].u.choices.selected; |
195 | return ret; | 191 | return ret; |
196 | } | 192 | } |
197 | 193 | ||
198 | static char *validate_params(const game_params *params, int full) | 194 | static const char *validate_params(const game_params *params, int full) |
199 | { | 195 | { |
200 | if ((params->w * params->h ) > 54) return "Grid is too big"; | 196 | if ((params->w * params->h ) > 54) return "Grid is too big"; |
201 | if (params->w < 3) return "Width must be at least 3"; | 197 | if (params->w < 3) return "Width must be at least 3"; |
@@ -1440,7 +1436,7 @@ static game_state *new_game(midend *me, const game_params *params, | |||
1440 | return state; | 1436 | return state; |
1441 | } | 1437 | } |
1442 | 1438 | ||
1443 | static char *validate_desc(const game_params *params, const char *desc) | 1439 | static const char *validate_desc(const game_params *params, const char *desc) |
1444 | { | 1440 | { |
1445 | int i; | 1441 | int i; |
1446 | int w = params->w, h = params->h; | 1442 | int w = params->w, h = params->h; |
@@ -1493,7 +1489,7 @@ static char *validate_desc(const game_params *params, const char *desc) | |||
1493 | } | 1489 | } |
1494 | 1490 | ||
1495 | static char *solve_game(const game_state *state_start, const game_state *currstate, | 1491 | static char *solve_game(const game_state *state_start, const game_state *currstate, |
1496 | const char *aux, char **error) | 1492 | const char *aux, const char **error) |
1497 | { | 1493 | { |
1498 | int p; | 1494 | int p; |
1499 | int *old_guess; | 1495 | int *old_guess; |
@@ -1725,7 +1721,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1725 | 1721 | ||
1726 | if (button == 'a' || button == 'A') { | 1722 | if (button == 'a' || button == 'A') { |
1727 | ui->ascii = !ui->ascii; | 1723 | ui->ascii = !ui->ascii; |
1728 | return ""; | 1724 | return UI_UPDATE; |
1729 | } | 1725 | } |
1730 | 1726 | ||
1731 | if (button == 'm' || button == 'M') { | 1727 | if (button == 'm' || button == 'M') { |
@@ -1771,12 +1767,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1771 | case CURSOR_LEFT: ui->hx -= (ui->hx > 1) ? 1 : 0; break; | 1767 | case CURSOR_LEFT: ui->hx -= (ui->hx > 1) ? 1 : 0; break; |
1772 | } | 1768 | } |
1773 | ui->hshow = ui->hcursor = 1; | 1769 | ui->hshow = ui->hcursor = 1; |
1774 | return ""; | 1770 | return UI_UPDATE; |
1775 | } | 1771 | } |
1776 | if (ui->hshow && button == CURSOR_SELECT) { | 1772 | if (ui->hshow && button == CURSOR_SELECT) { |
1777 | ui->hpencil = 1 - ui->hpencil; | 1773 | ui->hpencil = 1 - ui->hpencil; |
1778 | ui->hcursor = 1; | 1774 | ui->hcursor = 1; |
1779 | return ""; | 1775 | return UI_UPDATE; |
1780 | } | 1776 | } |
1781 | 1777 | ||
1782 | if (ui->hshow == 1 && ui->hpencil == 1) { | 1778 | if (ui->hshow == 1 && ui->hpencil == 1) { |
@@ -1814,12 +1810,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1814 | if (button == LEFT_BUTTON) { | 1810 | if (button == LEFT_BUTTON) { |
1815 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; | 1811 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; |
1816 | ui->hx = gx; ui->hy = gy; | 1812 | ui->hx = gx; ui->hy = gy; |
1817 | return ""; | 1813 | return UI_UPDATE; |
1818 | } | 1814 | } |
1819 | else if (button == RIGHT_BUTTON && g == 7) { | 1815 | else if (button == RIGHT_BUTTON && g == 7) { |
1820 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; | 1816 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; |
1821 | ui->hx = gx; ui->hy = gy; | 1817 | ui->hx = gx; ui->hy = gy; |
1822 | return ""; | 1818 | return UI_UPDATE; |
1823 | } | 1819 | } |
1824 | } | 1820 | } |
1825 | else if (ui->hshow == 1) { | 1821 | else if (ui->hshow == 1) { |
@@ -1828,36 +1824,36 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1828 | if (gx == ui->hx && gy == ui->hy) { | 1824 | if (gx == ui->hx && gy == ui->hy) { |
1829 | ui->hshow = 0; ui->hpencil = 0; ui->hcursor = 0; | 1825 | ui->hshow = 0; ui->hpencil = 0; ui->hcursor = 0; |
1830 | ui->hx = 0; ui->hy = 0; | 1826 | ui->hx = 0; ui->hy = 0; |
1831 | return ""; | 1827 | return UI_UPDATE; |
1832 | } | 1828 | } |
1833 | else { | 1829 | else { |
1834 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; | 1830 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; |
1835 | ui->hx = gx; ui->hy = gy; | 1831 | ui->hx = gx; ui->hy = gy; |
1836 | return ""; | 1832 | return UI_UPDATE; |
1837 | } | 1833 | } |
1838 | } | 1834 | } |
1839 | else { | 1835 | else { |
1840 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; | 1836 | ui->hshow = 1; ui->hpencil = 0; ui->hcursor = 0; |
1841 | ui->hx = gx; ui->hy = gy; | 1837 | ui->hx = gx; ui->hy = gy; |
1842 | return ""; | 1838 | return UI_UPDATE; |
1843 | } | 1839 | } |
1844 | } | 1840 | } |
1845 | else if (button == RIGHT_BUTTON) { | 1841 | else if (button == RIGHT_BUTTON) { |
1846 | if (ui->hpencil == 0 && g == 7) { | 1842 | if (ui->hpencil == 0 && g == 7) { |
1847 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; | 1843 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; |
1848 | ui->hx = gx; ui->hy = gy; | 1844 | ui->hx = gx; ui->hy = gy; |
1849 | return ""; | 1845 | return UI_UPDATE; |
1850 | } | 1846 | } |
1851 | else { | 1847 | else { |
1852 | if (gx == ui->hx && gy == ui->hy) { | 1848 | if (gx == ui->hx && gy == ui->hy) { |
1853 | ui->hshow = 0; ui->hpencil = 0; ui->hcursor = 0; | 1849 | ui->hshow = 0; ui->hpencil = 0; ui->hcursor = 0; |
1854 | ui->hx = 0; ui->hy = 0; | 1850 | ui->hx = 0; ui->hy = 0; |
1855 | return ""; | 1851 | return UI_UPDATE; |
1856 | } | 1852 | } |
1857 | else if (g == 7) { | 1853 | else if (g == 7) { |
1858 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; | 1854 | ui->hshow = 1; ui->hpencil = 1; ui->hcursor = 0; |
1859 | ui->hx = gx; ui->hy = gy; | 1855 | ui->hx = gx; ui->hy = gy; |
1860 | return ""; | 1856 | return UI_UPDATE; |
1861 | } | 1857 | } |
1862 | } | 1858 | } |
1863 | } | 1859 | } |
diff --git a/apps/plugins/puzzles/src/unequal.c b/apps/plugins/puzzles/src/unequal.c index a63b7d8ed0..cb477c9e37 100644 --- a/apps/plugins/puzzles/src/unequal.c +++ b/apps/plugins/puzzles/src/unequal.c | |||
@@ -218,24 +218,21 @@ static config_item *game_configure(const game_params *params) | |||
218 | 218 | ||
219 | ret[0].name = "Mode"; | 219 | ret[0].name = "Mode"; |
220 | ret[0].type = C_CHOICES; | 220 | ret[0].type = C_CHOICES; |
221 | ret[0].sval = ":Unequal:Adjacent"; | 221 | ret[0].u.choices.choicenames = ":Unequal:Adjacent"; |
222 | ret[0].ival = params->adjacent; | 222 | ret[0].u.choices.selected = params->adjacent; |
223 | 223 | ||
224 | ret[1].name = "Size (s*s)"; | 224 | ret[1].name = "Size (s*s)"; |
225 | ret[1].type = C_STRING; | 225 | ret[1].type = C_STRING; |
226 | sprintf(buf, "%d", params->order); | 226 | sprintf(buf, "%d", params->order); |
227 | ret[1].sval = dupstr(buf); | 227 | ret[1].u.string.sval = dupstr(buf); |
228 | ret[1].ival = 0; | ||
229 | 228 | ||
230 | ret[2].name = "Difficulty"; | 229 | ret[2].name = "Difficulty"; |
231 | ret[2].type = C_CHOICES; | 230 | ret[2].type = C_CHOICES; |
232 | ret[2].sval = DIFFCONFIG; | 231 | ret[2].u.choices.choicenames = DIFFCONFIG; |
233 | ret[2].ival = params->diff; | 232 | ret[2].u.choices.selected = params->diff; |
234 | 233 | ||
235 | ret[3].name = NULL; | 234 | ret[3].name = NULL; |
236 | ret[3].type = C_END; | 235 | ret[3].type = C_END; |
237 | ret[3].sval = NULL; | ||
238 | ret[3].ival = 0; | ||
239 | 236 | ||
240 | return ret; | 237 | return ret; |
241 | } | 238 | } |
@@ -244,14 +241,14 @@ static game_params *custom_params(const config_item *cfg) | |||
244 | { | 241 | { |
245 | game_params *ret = snew(game_params); | 242 | game_params *ret = snew(game_params); |
246 | 243 | ||
247 | ret->adjacent = cfg[0].ival; | 244 | ret->adjacent = cfg[0].u.choices.selected; |
248 | ret->order = atoi(cfg[1].sval); | 245 | ret->order = atoi(cfg[1].u.string.sval); |
249 | ret->diff = cfg[2].ival; | 246 | ret->diff = cfg[2].u.choices.selected; |
250 | 247 | ||
251 | return ret; | 248 | return ret; |
252 | } | 249 | } |
253 | 250 | ||
254 | static char *validate_params(const game_params *params, int full) | 251 | static const char *validate_params(const game_params *params, int full) |
255 | { | 252 | { |
256 | if (params->order < 3 || params->order > 32) | 253 | if (params->order < 3 || params->order > 32) |
257 | return "Order must be between 3 and 32"; | 254 | return "Order must be between 3 and 32"; |
@@ -1198,12 +1195,12 @@ generate: | |||
1198 | } | 1195 | } |
1199 | 1196 | ||
1200 | static game_state *load_game(const game_params *params, const char *desc, | 1197 | static game_state *load_game(const game_params *params, const char *desc, |
1201 | char **why_r) | 1198 | const char **why_r) |
1202 | { | 1199 | { |
1203 | game_state *state = blank_game(params->order, params->adjacent); | 1200 | game_state *state = blank_game(params->order, params->adjacent); |
1204 | const char *p = desc; | 1201 | const char *p = desc; |
1205 | int i = 0, n, o = params->order, x, y; | 1202 | int i = 0, n, o = params->order, x, y; |
1206 | char *why = NULL; | 1203 | const char *why = NULL; |
1207 | 1204 | ||
1208 | while (*p) { | 1205 | while (*p) { |
1209 | while (*p >= 'a' && *p <= 'z') { | 1206 | while (*p >= 'a' && *p <= 'z') { |
@@ -1294,9 +1291,9 @@ static game_state *new_game(midend *me, const game_params *params, | |||
1294 | return state; | 1291 | return state; |
1295 | } | 1292 | } |
1296 | 1293 | ||
1297 | static char *validate_desc(const game_params *params, const char *desc) | 1294 | static const char *validate_desc(const game_params *params, const char *desc) |
1298 | { | 1295 | { |
1299 | char *why = NULL; | 1296 | const char *why = NULL; |
1300 | game_state *dummy = load_game(params, desc, &why); | 1297 | game_state *dummy = load_game(params, desc, &why); |
1301 | if (dummy) { | 1298 | if (dummy) { |
1302 | free_game(dummy); | 1299 | free_game(dummy); |
@@ -1307,7 +1304,7 @@ static char *validate_desc(const game_params *params, const char *desc) | |||
1307 | } | 1304 | } |
1308 | 1305 | ||
1309 | static char *solve_game(const game_state *state, const game_state *currstate, | 1306 | static char *solve_game(const game_state *state, const game_state *currstate, |
1310 | const char *aux, char **error) | 1307 | const char *aux, const char **error) |
1311 | { | 1308 | { |
1312 | game_state *solved; | 1309 | game_state *solved; |
1313 | int r; | 1310 | int r; |
@@ -1425,7 +1422,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1425 | ui->hshow = 1; | 1422 | ui->hshow = 1; |
1426 | } | 1423 | } |
1427 | ui->hcursor = 0; | 1424 | ui->hcursor = 0; |
1428 | return ""; | 1425 | return UI_UPDATE; |
1429 | } | 1426 | } |
1430 | if (button == RIGHT_BUTTON) { | 1427 | if (button == RIGHT_BUTTON) { |
1431 | /* pencil highlighting for non-filled squares */ | 1428 | /* pencil highlighting for non-filled squares */ |
@@ -1439,7 +1436,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1439 | ui->hshow = 1; | 1436 | ui->hshow = 1; |
1440 | } | 1437 | } |
1441 | ui->hcursor = 0; | 1438 | ui->hcursor = 0; |
1442 | return ""; | 1439 | return UI_UPDATE; |
1443 | } | 1440 | } |
1444 | } | 1441 | } |
1445 | 1442 | ||
@@ -1453,11 +1450,12 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1453 | ny != ui->hy + adjthan[i].dy); ++i); | 1450 | ny != ui->hy + adjthan[i].dy); ++i); |
1454 | 1451 | ||
1455 | if (i == 4) | 1452 | if (i == 4) |
1456 | return ""; /* invalid direction, i.e. out of the board */ | 1453 | return UI_UPDATE; /* invalid direction, i.e. out of |
1454 | * the board */ | ||
1457 | 1455 | ||
1458 | if (!(GRID(state, flags, ui->hx, ui->hy) & adjthan[i].f || | 1456 | if (!(GRID(state, flags, ui->hx, ui->hy) & adjthan[i].f || |
1459 | GRID(state, flags, nx, ny ) & adjthan[i].fo)) | 1457 | GRID(state, flags, nx, ny ) & adjthan[i].fo)) |
1460 | return ""; /* no clue to toggle */ | 1458 | return UI_UPDATE; /* no clue to toggle */ |
1461 | 1459 | ||
1462 | if (state->adjacent) | 1460 | if (state->adjacent) |
1463 | self = (adjthan[i].dx >= 0 && adjthan[i].dy >= 0); | 1461 | self = (adjthan[i].dx >= 0 && adjthan[i].dy >= 0); |
@@ -1475,13 +1473,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1475 | } else { | 1473 | } else { |
1476 | move_cursor(button, &ui->hx, &ui->hy, ds->order, ds->order, FALSE); | 1474 | move_cursor(button, &ui->hx, &ui->hy, ds->order, ds->order, FALSE); |
1477 | ui->hshow = ui->hcursor = 1; | 1475 | ui->hshow = ui->hcursor = 1; |
1478 | return ""; | 1476 | return UI_UPDATE; |
1479 | } | 1477 | } |
1480 | } | 1478 | } |
1481 | if (ui->hshow && IS_CURSOR_SELECT(button)) { | 1479 | if (ui->hshow && IS_CURSOR_SELECT(button)) { |
1482 | ui->hpencil = 1 - ui->hpencil; | 1480 | ui->hpencil = 1 - ui->hpencil; |
1483 | ui->hcursor = 1; | 1481 | ui->hcursor = 1; |
1484 | return ""; | 1482 | return UI_UPDATE; |
1485 | } | 1483 | } |
1486 | 1484 | ||
1487 | n = c2n(button, state->order); | 1485 | n = c2n(button, state->order); |
@@ -1568,7 +1566,9 @@ static game_state *execute_move(const game_state *state, const char *move) | |||
1568 | } | 1566 | } |
1569 | return ret; | 1567 | return ret; |
1570 | } else if (move[0] == 'H') { | 1568 | } else if (move[0] == 'H') { |
1571 | return solver_hint(state, NULL, DIFF_EASY, DIFF_EASY); | 1569 | ret = solver_hint(state, NULL, DIFF_EASY, DIFF_EASY); |
1570 | check_complete(ret->nums, ret, 1); | ||
1571 | return ret; | ||
1572 | } else if (move[0] == 'F' && sscanf(move+1, "%d,%d,%d", &x, &y, &n) == 3 && | 1572 | } else if (move[0] == 'F' && sscanf(move+1, "%d,%d,%d", &x, &y, &n) == 3 && |
1573 | x >= 0 && x < state->order && y >= 0 && y < state->order) { | 1573 | x >= 0 && x < state->order && y >= 0 && y < state->order) { |
1574 | ret = dup_game(state); | 1574 | ret = dup_game(state); |
@@ -2041,7 +2041,7 @@ const char *quis = NULL; | |||
2041 | 2041 | ||
2042 | #if 0 /* currently unused */ | 2042 | #if 0 /* currently unused */ |
2043 | 2043 | ||
2044 | static void debug_printf(char *fmt, ...) | 2044 | static void debug_printf(const char *fmt, ...) |
2045 | { | 2045 | { |
2046 | char buf[4096]; | 2046 | char buf[4096]; |
2047 | va_list ap; | 2047 | va_list ap; |
@@ -2125,7 +2125,7 @@ static int solve(game_params *p, char *desc, int debug) | |||
2125 | 2125 | ||
2126 | static void check(game_params *p) | 2126 | static void check(game_params *p) |
2127 | { | 2127 | { |
2128 | char *msg = validate_params(p, 1); | 2128 | const char *msg = validate_params(p, 1); |
2129 | if (msg) { | 2129 | if (msg) { |
2130 | fprintf(stderr, "%s: %s", quis, msg); | 2130 | fprintf(stderr, "%s: %s", quis, msg); |
2131 | exit(1); | 2131 | exit(1); |
@@ -2233,7 +2233,8 @@ int main(int argc, const char *argv[]) | |||
2233 | int i; | 2233 | int i; |
2234 | for (i = 0; i < argc; i++) { | 2234 | for (i = 0; i < argc; i++) { |
2235 | const char *id = *argv++; | 2235 | const char *id = *argv++; |
2236 | char *desc = strchr(id, ':'), *err; | 2236 | char *desc = strchr(id, ':'); |
2237 | const char *err; | ||
2237 | p = default_params(); | 2238 | p = default_params(); |
2238 | if (desc) { | 2239 | if (desc) { |
2239 | *desc++ = '\0'; | 2240 | *desc++ = '\0'; |
diff --git a/apps/plugins/puzzles/src/unfinished/group.c b/apps/plugins/puzzles/src/unfinished/group.c index 4a4ad6ce53..b812b041eb 100644 --- a/apps/plugins/puzzles/src/unfinished/group.c +++ b/apps/plugins/puzzles/src/unfinished/group.c | |||
@@ -212,23 +212,19 @@ static config_item *game_configure(const game_params *params) | |||
212 | ret[0].name = "Grid size"; | 212 | ret[0].name = "Grid size"; |
213 | ret[0].type = C_STRING; | 213 | ret[0].type = C_STRING; |
214 | sprintf(buf, "%d", params->w); | 214 | sprintf(buf, "%d", params->w); |
215 | ret[0].sval = dupstr(buf); | 215 | ret[0].u.string.sval = dupstr(buf); |
216 | ret[0].ival = 0; | ||
217 | 216 | ||
218 | ret[1].name = "Difficulty"; | 217 | ret[1].name = "Difficulty"; |
219 | ret[1].type = C_CHOICES; | 218 | ret[1].type = C_CHOICES; |
220 | ret[1].sval = DIFFCONFIG; | 219 | ret[1].u.choices.choicenames = DIFFCONFIG; |
221 | ret[1].ival = params->diff; | 220 | ret[1].u.choices.selected = params->diff; |
222 | 221 | ||
223 | ret[2].name = "Show identity"; | 222 | ret[2].name = "Show identity"; |
224 | ret[2].type = C_BOOLEAN; | 223 | ret[2].type = C_BOOLEAN; |
225 | ret[2].sval = NULL; | 224 | ret[2].u.boolean.bval = params->id; |
226 | ret[2].ival = params->id; | ||
227 | 225 | ||
228 | ret[3].name = NULL; | 226 | ret[3].name = NULL; |
229 | ret[3].type = C_END; | 227 | ret[3].type = C_END; |
230 | ret[3].sval = NULL; | ||
231 | ret[3].ival = 0; | ||
232 | 228 | ||
233 | return ret; | 229 | return ret; |
234 | } | 230 | } |
@@ -237,14 +233,14 @@ static game_params *custom_params(const config_item *cfg) | |||
237 | { | 233 | { |
238 | game_params *ret = snew(game_params); | 234 | game_params *ret = snew(game_params); |
239 | 235 | ||
240 | ret->w = atoi(cfg[0].sval); | 236 | ret->w = atoi(cfg[0].u.string.sval); |
241 | ret->diff = cfg[1].ival; | 237 | ret->diff = cfg[1].u.choices.selected; |
242 | ret->id = cfg[2].ival; | 238 | ret->id = cfg[2].u.boolean.bval; |
243 | 239 | ||
244 | return ret; | 240 | return ret; |
245 | } | 241 | } |
246 | 242 | ||
247 | static char *validate_params(const game_params *params, int full) | 243 | static const char *validate_params(const game_params *params, int full) |
248 | { | 244 | { |
249 | if (params->w < 3 || params->w > 26) | 245 | if (params->w < 3 || params->w > 26) |
250 | return "Grid size must be between 3 and 26"; | 246 | return "Grid size must be between 3 and 26"; |
@@ -781,7 +777,7 @@ done | |||
781 | * Gameplay. | 777 | * Gameplay. |
782 | */ | 778 | */ |
783 | 779 | ||
784 | static char *validate_grid_desc(const char **pdesc, int range, int area) | 780 | static const char *validate_grid_desc(const char **pdesc, int range, int area) |
785 | { | 781 | { |
786 | const char *desc = *pdesc; | 782 | const char *desc = *pdesc; |
787 | int squares = 0; | 783 | int squares = 0; |
@@ -811,7 +807,7 @@ static char *validate_grid_desc(const char **pdesc, int range, int area) | |||
811 | return NULL; | 807 | return NULL; |
812 | } | 808 | } |
813 | 809 | ||
814 | static char *validate_desc(const game_params *params, const char *desc) | 810 | static const char *validate_desc(const game_params *params, const char *desc) |
815 | { | 811 | { |
816 | int w = params->w, a = w*w; | 812 | int w = params->w, a = w*w; |
817 | const char *p = desc; | 813 | const char *p = desc; |
@@ -911,7 +907,7 @@ static void free_game(game_state *state) | |||
911 | } | 907 | } |
912 | 908 | ||
913 | static char *solve_game(const game_state *state, const game_state *currstate, | 909 | static char *solve_game(const game_state *state, const game_state *currstate, |
914 | const char *aux, char **error) | 910 | const char *aux, const char **error) |
915 | { | 911 | { |
916 | int w = state->par.w, a = w*w; | 912 | int w = state->par.w, a = w*w; |
917 | int i, ret; | 913 | int i, ret; |
@@ -1281,13 +1277,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1281 | ui->drag |= 4; /* some movement has happened */ | 1277 | ui->drag |= 4; /* some movement has happened */ |
1282 | if (tcoord >= 0 && tcoord < w) { | 1278 | if (tcoord >= 0 && tcoord < w) { |
1283 | ui->dragpos = tcoord; | 1279 | ui->dragpos = tcoord; |
1284 | return ""; | 1280 | return UI_UPDATE; |
1285 | } | 1281 | } |
1286 | } else if (IS_MOUSE_RELEASE(button)) { | 1282 | } else if (IS_MOUSE_RELEASE(button)) { |
1287 | if (ui->drag & 4) { | 1283 | if (ui->drag & 4) { |
1288 | ui->drag = 0; /* end drag */ | 1284 | ui->drag = 0; /* end drag */ |
1289 | if (state->sequence[ui->dragpos] == ui->dragnum) | 1285 | if (state->sequence[ui->dragpos] == ui->dragnum) |
1290 | return ""; /* drag was a no-op overall */ | 1286 | return UI_UPDATE; /* drag was a no-op overall */ |
1291 | sprintf(buf, "D%d,%d", ui->dragnum, ui->dragpos); | 1287 | sprintf(buf, "D%d,%d", ui->dragnum, ui->dragpos); |
1292 | return dupstr(buf); | 1288 | return dupstr(buf); |
1293 | } else { | 1289 | } else { |
@@ -1298,7 +1294,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1298 | state->sequence[ui->edgepos]); | 1294 | state->sequence[ui->edgepos]); |
1299 | return dupstr(buf); | 1295 | return dupstr(buf); |
1300 | } else | 1296 | } else |
1301 | return ""; /* no-op */ | 1297 | return UI_UPDATE; /* no-op */ |
1302 | } | 1298 | } |
1303 | } | 1299 | } |
1304 | } else if (IS_MOUSE_DOWN(button)) { | 1300 | } else if (IS_MOUSE_DOWN(button)) { |
@@ -1321,7 +1317,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1321 | ui->hpencil = 0; | 1317 | ui->hpencil = 0; |
1322 | } | 1318 | } |
1323 | ui->hcursor = 0; | 1319 | ui->hcursor = 0; |
1324 | return ""; /* UI activity occurred */ | 1320 | return UI_UPDATE; |
1325 | } | 1321 | } |
1326 | if (button == RIGHT_BUTTON) { | 1322 | if (button == RIGHT_BUTTON) { |
1327 | /* | 1323 | /* |
@@ -1345,20 +1341,20 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1345 | ui->hshow = 0; | 1341 | ui->hshow = 0; |
1346 | } | 1342 | } |
1347 | ui->hcursor = 0; | 1343 | ui->hcursor = 0; |
1348 | return ""; /* UI activity occurred */ | 1344 | return UI_UPDATE; |
1349 | } | 1345 | } |
1350 | } else if (tx >= 0 && tx < w && ty == -1) { | 1346 | } else if (tx >= 0 && tx < w && ty == -1) { |
1351 | ui->drag = 2; | 1347 | ui->drag = 2; |
1352 | ui->dragnum = state->sequence[tx]; | 1348 | ui->dragnum = state->sequence[tx]; |
1353 | ui->dragpos = tx; | 1349 | ui->dragpos = tx; |
1354 | ui->edgepos = FROMCOORD(x + TILESIZE/2); | 1350 | ui->edgepos = FROMCOORD(x + TILESIZE/2); |
1355 | return ""; | 1351 | return UI_UPDATE; |
1356 | } else if (ty >= 0 && ty < w && tx == -1) { | 1352 | } else if (ty >= 0 && ty < w && tx == -1) { |
1357 | ui->drag = 1; | 1353 | ui->drag = 1; |
1358 | ui->dragnum = state->sequence[ty]; | 1354 | ui->dragnum = state->sequence[ty]; |
1359 | ui->dragpos = ty; | 1355 | ui->dragpos = ty; |
1360 | ui->edgepos = FROMCOORD(y + TILESIZE/2); | 1356 | ui->edgepos = FROMCOORD(y + TILESIZE/2); |
1361 | return ""; | 1357 | return UI_UPDATE; |
1362 | } | 1358 | } |
1363 | } else if (IS_MOUSE_DRAG(button)) { | 1359 | } else if (IS_MOUSE_DRAG(button)) { |
1364 | if (!ui->hpencil && | 1360 | if (!ui->hpencil && |
@@ -1371,7 +1367,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1371 | ui->odx = ui->ody = 0; | 1367 | ui->odx = ui->ody = 0; |
1372 | ui->odn = 1; | 1368 | ui->odn = 1; |
1373 | } | 1369 | } |
1374 | return ""; | 1370 | return UI_UPDATE; |
1375 | } | 1371 | } |
1376 | 1372 | ||
1377 | if (IS_CURSOR_MOVE(button)) { | 1373 | if (IS_CURSOR_MOVE(button)) { |
@@ -1381,13 +1377,13 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1381 | ui->hx = state->sequence[cx]; | 1377 | ui->hx = state->sequence[cx]; |
1382 | ui->hy = state->sequence[cy]; | 1378 | ui->hy = state->sequence[cy]; |
1383 | ui->hshow = ui->hcursor = 1; | 1379 | ui->hshow = ui->hcursor = 1; |
1384 | return ""; | 1380 | return UI_UPDATE; |
1385 | } | 1381 | } |
1386 | if (ui->hshow && | 1382 | if (ui->hshow && |
1387 | (button == CURSOR_SELECT)) { | 1383 | (button == CURSOR_SELECT)) { |
1388 | ui->hpencil = 1 - ui->hpencil; | 1384 | ui->hpencil = 1 - ui->hpencil; |
1389 | ui->hcursor = 1; | 1385 | ui->hcursor = 1; |
1390 | return ""; | 1386 | return UI_UPDATE; |
1391 | } | 1387 | } |
1392 | 1388 | ||
1393 | if (ui->hshow && | 1389 | if (ui->hshow && |
@@ -2110,7 +2106,8 @@ int main(int argc, char **argv) | |||
2110 | { | 2106 | { |
2111 | game_params *p; | 2107 | game_params *p; |
2112 | game_state *s; | 2108 | game_state *s; |
2113 | char *id = NULL, *desc, *err; | 2109 | char *id = NULL, *desc; |
2110 | const char *err; | ||
2114 | digit *grid; | 2111 | digit *grid; |
2115 | int grade = FALSE; | 2112 | int grade = FALSE; |
2116 | int ret, diff, really_show_working = FALSE; | 2113 | int ret, diff, really_show_working = FALSE; |
diff --git a/apps/plugins/puzzles/src/unfinished/path.c b/apps/plugins/puzzles/src/unfinished/path.c index 61d6c61c6a..d4ec5d87cc 100644 --- a/apps/plugins/puzzles/src/unfinished/path.c +++ b/apps/plugins/puzzles/src/unfinished/path.c | |||
@@ -770,7 +770,7 @@ int main(void) | |||
770 | #ifdef TEST_GENERAL | 770 | #ifdef TEST_GENERAL |
771 | #include <stdarg.h> | 771 | #include <stdarg.h> |
772 | 772 | ||
773 | void fatal(char *fmt, ...) | 773 | void fatal(const char *fmt, ...) |
774 | { | 774 | { |
775 | va_list ap; | 775 | va_list ap; |
776 | 776 | ||
diff --git a/apps/plugins/puzzles/src/unfinished/separate.c b/apps/plugins/puzzles/src/unfinished/separate.c index a7b4fc96e1..7fd8da8202 100644 --- a/apps/plugins/puzzles/src/unfinished/separate.c +++ b/apps/plugins/puzzles/src/unfinished/separate.c | |||
@@ -170,7 +170,7 @@ static game_params *custom_params(const config_item *cfg) | |||
170 | return NULL; | 170 | return NULL; |
171 | } | 171 | } |
172 | 172 | ||
173 | static char *validate_params(const game_params *params, int full) | 173 | static const char *validate_params(const game_params *params, int full) |
174 | { | 174 | { |
175 | return NULL; | 175 | return NULL; |
176 | } | 176 | } |
@@ -646,7 +646,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
646 | return desc; | 646 | return desc; |
647 | } | 647 | } |
648 | 648 | ||
649 | static char *validate_desc(const game_params *params, const char *desc) | 649 | static const char *validate_desc(const game_params *params, const char *desc) |
650 | { | 650 | { |
651 | return NULL; | 651 | return NULL; |
652 | } | 652 | } |
@@ -676,7 +676,7 @@ static void free_game(game_state *state) | |||
676 | } | 676 | } |
677 | 677 | ||
678 | static char *solve_game(const game_state *state, const game_state *currstate, | 678 | static char *solve_game(const game_state *state, const game_state *currstate, |
679 | const char *aux, char **error) | 679 | const char *aux, const char **error) |
680 | { | 680 | { |
681 | return NULL; | 681 | return NULL; |
682 | } | 682 | } |
diff --git a/apps/plugins/puzzles/src/unfinished/slide.c b/apps/plugins/puzzles/src/unfinished/slide.c index 9d4fce1461..9770013235 100644 --- a/apps/plugins/puzzles/src/unfinished/slide.c +++ b/apps/plugins/puzzles/src/unfinished/slide.c | |||
@@ -244,25 +244,20 @@ static config_item *game_configure(const game_params *params) | |||
244 | ret[0].name = "Width"; | 244 | ret[0].name = "Width"; |
245 | ret[0].type = C_STRING; | 245 | ret[0].type = C_STRING; |
246 | sprintf(buf, "%d", params->w); | 246 | sprintf(buf, "%d", params->w); |
247 | ret[0].sval = dupstr(buf); | 247 | ret[0].u.string.sval = dupstr(buf); |
248 | ret[0].ival = 0; | ||
249 | 248 | ||
250 | ret[1].name = "Height"; | 249 | ret[1].name = "Height"; |
251 | ret[1].type = C_STRING; | 250 | ret[1].type = C_STRING; |
252 | sprintf(buf, "%d", params->h); | 251 | sprintf(buf, "%d", params->h); |
253 | ret[1].sval = dupstr(buf); | 252 | ret[1].u.string.sval = dupstr(buf); |
254 | ret[1].ival = 0; | ||
255 | 253 | ||
256 | ret[2].name = "Solution length limit"; | 254 | ret[2].name = "Solution length limit"; |
257 | ret[2].type = C_STRING; | 255 | ret[2].type = C_STRING; |
258 | sprintf(buf, "%d", params->maxmoves); | 256 | sprintf(buf, "%d", params->maxmoves); |
259 | ret[2].sval = dupstr(buf); | 257 | ret[2].u.string.sval = dupstr(buf); |
260 | ret[2].ival = 0; | ||
261 | 258 | ||
262 | ret[3].name = NULL; | 259 | ret[3].name = NULL; |
263 | ret[3].type = C_END; | 260 | ret[3].type = C_END; |
264 | ret[3].sval = NULL; | ||
265 | ret[3].ival = 0; | ||
266 | 261 | ||
267 | return ret; | 262 | return ret; |
268 | } | 263 | } |
@@ -271,14 +266,14 @@ static game_params *custom_params(const config_item *cfg) | |||
271 | { | 266 | { |
272 | game_params *ret = snew(game_params); | 267 | game_params *ret = snew(game_params); |
273 | 268 | ||
274 | ret->w = atoi(cfg[0].sval); | 269 | ret->w = atoi(cfg[0].u.string.sval); |
275 | ret->h = atoi(cfg[1].sval); | 270 | ret->h = atoi(cfg[1].u.string.sval); |
276 | ret->maxmoves = atoi(cfg[2].sval); | 271 | ret->maxmoves = atoi(cfg[2].u.string.sval); |
277 | 272 | ||
278 | return ret; | 273 | return ret; |
279 | } | 274 | } |
280 | 275 | ||
281 | static char *validate_params(const game_params *params, int full) | 276 | static const char *validate_params(const game_params *params, int full) |
282 | { | 277 | { |
283 | if (params->w > MAXWID) | 278 | if (params->w > MAXWID) |
284 | return "Width must be at most " STR(MAXWID); | 279 | return "Width must be at most " STR(MAXWID); |
@@ -891,7 +886,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
891 | return ret; | 886 | return ret; |
892 | } | 887 | } |
893 | 888 | ||
894 | static char *validate_desc(const game_params *params, const char *desc) | 889 | static const char *validate_desc(const game_params *params, const char *desc) |
895 | { | 890 | { |
896 | int w = params->w, h = params->h, wh = w*h; | 891 | int w = params->w, h = params->h, wh = w*h; |
897 | int *active, *link; | 892 | int *active, *link; |
@@ -1126,7 +1121,7 @@ static void free_game(game_state *state) | |||
1126 | } | 1121 | } |
1127 | 1122 | ||
1128 | static char *solve_game(const game_state *state, const game_state *currstate, | 1123 | static char *solve_game(const game_state *state, const game_state *currstate, |
1129 | const char *aux, char **error) | 1124 | const char *aux, const char **error) |
1130 | { | 1125 | { |
1131 | int *moves; | 1126 | int *moves; |
1132 | int nmoves; | 1127 | int nmoves; |
@@ -1349,7 +1344,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1349 | * And that's it. Update the display to reflect the start | 1344 | * And that's it. Update the display to reflect the start |
1350 | * of a drag. | 1345 | * of a drag. |
1351 | */ | 1346 | */ |
1352 | return ""; | 1347 | return UI_UPDATE; |
1353 | } else if (button == LEFT_DRAG && ui->dragging) { | 1348 | } else if (button == LEFT_DRAG && ui->dragging) { |
1354 | int dist, distlimit, dx, dy, s, px, py; | 1349 | int dist, distlimit, dx, dy, s, px, py; |
1355 | 1350 | ||
@@ -1376,7 +1371,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1376 | if (px >= 0 && px < w && py >= 0 && py < h && | 1371 | if (px >= 0 && px < w && py >= 0 && py < h && |
1377 | ui->reachable[py*w+px]) { | 1372 | ui->reachable[py*w+px]) { |
1378 | ui->drag_currpos = py*w+px; | 1373 | ui->drag_currpos = py*w+px; |
1379 | return ""; | 1374 | return UI_UPDATE; |
1380 | } | 1375 | } |
1381 | } | 1376 | } |
1382 | } | 1377 | } |
diff --git a/apps/plugins/puzzles/src/unfinished/sokoban.c b/apps/plugins/puzzles/src/unfinished/sokoban.c index 2f0af35bc2..1264690416 100644 --- a/apps/plugins/puzzles/src/unfinished/sokoban.c +++ b/apps/plugins/puzzles/src/unfinished/sokoban.c | |||
@@ -210,19 +210,15 @@ static config_item *game_configure(const game_params *params) | |||
210 | ret[0].name = "Width"; | 210 | ret[0].name = "Width"; |
211 | ret[0].type = C_STRING; | 211 | ret[0].type = C_STRING; |
212 | sprintf(buf, "%d", params->w); | 212 | sprintf(buf, "%d", params->w); |
213 | ret[0].sval = dupstr(buf); | 213 | ret[0].u.string.sval = dupstr(buf); |
214 | ret[0].ival = 0; | ||
215 | 214 | ||
216 | ret[1].name = "Height"; | 215 | ret[1].name = "Height"; |
217 | ret[1].type = C_STRING; | 216 | ret[1].type = C_STRING; |
218 | sprintf(buf, "%d", params->h); | 217 | sprintf(buf, "%d", params->h); |
219 | ret[1].sval = dupstr(buf); | 218 | ret[1].u.string.sval = dupstr(buf); |
220 | ret[1].ival = 0; | ||
221 | 219 | ||
222 | ret[2].name = NULL; | 220 | ret[2].name = NULL; |
223 | ret[2].type = C_END; | 221 | ret[2].type = C_END; |
224 | ret[2].sval = NULL; | ||
225 | ret[2].ival = 0; | ||
226 | 222 | ||
227 | return ret; | 223 | return ret; |
228 | } | 224 | } |
@@ -231,13 +227,13 @@ static game_params *custom_params(const config_item *cfg) | |||
231 | { | 227 | { |
232 | game_params *ret = snew(game_params); | 228 | game_params *ret = snew(game_params); |
233 | 229 | ||
234 | ret->w = atoi(cfg[0].sval); | 230 | ret->w = atoi(cfg[0].u.string.sval); |
235 | ret->h = atoi(cfg[1].sval); | 231 | ret->h = atoi(cfg[1].u.string.sval); |
236 | 232 | ||
237 | return ret; | 233 | return ret; |
238 | } | 234 | } |
239 | 235 | ||
240 | static char *validate_params(const game_params *params, int full) | 236 | static const char *validate_params(const game_params *params, int full) |
241 | { | 237 | { |
242 | if (params->w < 4 || params->h < 4) | 238 | if (params->w < 4 || params->h < 4) |
243 | return "Width and height must both be at least 4"; | 239 | return "Width and height must both be at least 4"; |
@@ -806,7 +802,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
806 | return desc; | 802 | return desc; |
807 | } | 803 | } |
808 | 804 | ||
809 | static char *validate_desc(const game_params *params, const char *desc) | 805 | static const char *validate_desc(const game_params *params, const char *desc) |
810 | { | 806 | { |
811 | int w = params->w, h = params->h; | 807 | int w = params->w, h = params->h; |
812 | int area = 0; | 808 | int area = 0; |
@@ -903,7 +899,7 @@ static void free_game(game_state *state) | |||
903 | } | 899 | } |
904 | 900 | ||
905 | static char *solve_game(const game_state *state, const game_state *currstate, | 901 | static char *solve_game(const game_state *state, const game_state *currstate, |
906 | const char *aux, char **error) | 902 | const char *aux, const char **error) |
907 | { | 903 | { |
908 | return NULL; | 904 | return NULL; |
909 | } | 905 | } |
diff --git a/apps/plugins/puzzles/src/unruly.c b/apps/plugins/puzzles/src/unruly.c index f418efa776..9d2d5924d2 100644 --- a/apps/plugins/puzzles/src/unruly.c +++ b/apps/plugins/puzzles/src/unruly.c | |||
@@ -239,28 +239,24 @@ static config_item *game_configure(const game_params *params) | |||
239 | ret[0].name = "Width"; | 239 | ret[0].name = "Width"; |
240 | ret[0].type = C_STRING; | 240 | ret[0].type = C_STRING; |
241 | sprintf(buf, "%d", params->w2); | 241 | sprintf(buf, "%d", params->w2); |
242 | ret[0].sval = dupstr(buf); | 242 | ret[0].u.string.sval = dupstr(buf); |
243 | ret[0].ival = 0; | ||
244 | 243 | ||
245 | ret[1].name = "Height"; | 244 | ret[1].name = "Height"; |
246 | ret[1].type = C_STRING; | 245 | ret[1].type = C_STRING; |
247 | sprintf(buf, "%d", params->h2); | 246 | sprintf(buf, "%d", params->h2); |
248 | ret[1].sval = dupstr(buf); | 247 | ret[1].u.string.sval = dupstr(buf); |
249 | ret[1].ival = 0; | ||
250 | 248 | ||
251 | ret[2].name = "Unique rows and columns"; | 249 | ret[2].name = "Unique rows and columns"; |
252 | ret[2].type = C_BOOLEAN; | 250 | ret[2].type = C_BOOLEAN; |
253 | ret[2].ival = params->unique; | 251 | ret[2].u.boolean.bval = params->unique; |
254 | 252 | ||
255 | ret[3].name = "Difficulty"; | 253 | ret[3].name = "Difficulty"; |
256 | ret[3].type = C_CHOICES; | 254 | ret[3].type = C_CHOICES; |
257 | ret[3].sval = DIFFCONFIG; | 255 | ret[3].u.choices.choicenames = DIFFCONFIG; |
258 | ret[3].ival = params->diff; | 256 | ret[3].u.choices.selected = params->diff; |
259 | 257 | ||
260 | ret[4].name = NULL; | 258 | ret[4].name = NULL; |
261 | ret[4].type = C_END; | 259 | ret[4].type = C_END; |
262 | ret[4].sval = NULL; | ||
263 | ret[4].ival = 0; | ||
264 | 260 | ||
265 | return ret; | 261 | return ret; |
266 | } | 262 | } |
@@ -269,15 +265,15 @@ static game_params *custom_params(const config_item *cfg) | |||
269 | { | 265 | { |
270 | game_params *ret = snew(game_params); | 266 | game_params *ret = snew(game_params); |
271 | 267 | ||
272 | ret->w2 = atoi(cfg[0].sval); | 268 | ret->w2 = atoi(cfg[0].u.string.sval); |
273 | ret->h2 = atoi(cfg[1].sval); | 269 | ret->h2 = atoi(cfg[1].u.string.sval); |
274 | ret->unique = cfg[2].ival; | 270 | ret->unique = cfg[2].u.boolean.bval; |
275 | ret->diff = cfg[3].ival; | 271 | ret->diff = cfg[3].u.choices.selected; |
276 | 272 | ||
277 | return ret; | 273 | return ret; |
278 | } | 274 | } |
279 | 275 | ||
280 | static char *validate_params(const game_params *params, int full) | 276 | static const char *validate_params(const game_params *params, int full) |
281 | { | 277 | { |
282 | if ((params->w2 & 1) || (params->h2 & 1)) | 278 | if ((params->w2 & 1) || (params->h2 & 1)) |
283 | return "Width and height must both be even"; | 279 | return "Width and height must both be even"; |
@@ -319,7 +315,7 @@ static char *validate_params(const game_params *params, int full) | |||
319 | return NULL; | 315 | return NULL; |
320 | } | 316 | } |
321 | 317 | ||
322 | static char *validate_desc(const game_params *params, const char *desc) | 318 | static const char *validate_desc(const game_params *params, const char *desc) |
323 | { | 319 | { |
324 | int w2 = params->w2, h2 = params->h2; | 320 | int w2 = params->w2, h2 = params->h2; |
325 | int s = w2 * h2; | 321 | int s = w2 * h2; |
@@ -1178,7 +1174,7 @@ static int unruly_solve_game(game_state *state, | |||
1178 | } | 1174 | } |
1179 | 1175 | ||
1180 | static char *solve_game(const game_state *state, const game_state *currstate, | 1176 | static char *solve_game(const game_state *state, const game_state *currstate, |
1181 | const char *aux, char **error) | 1177 | const char *aux, const char **error) |
1182 | { | 1178 | { |
1183 | game_state *solved = dup_game(state); | 1179 | game_state *solved = dup_game(state); |
1184 | struct unruly_scratch *scratch = unruly_new_scratch(solved); | 1180 | struct unruly_scratch *scratch = unruly_new_scratch(solved); |
@@ -1531,7 +1527,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1531 | if (IS_CURSOR_MOVE(button)) { | 1527 | if (IS_CURSOR_MOVE(button)) { |
1532 | move_cursor(button, &ui->cx, &ui->cy, w2, h2, 0); | 1528 | move_cursor(button, &ui->cx, &ui->cy, w2, h2, 0); |
1533 | ui->cursor = TRUE; | 1529 | ui->cursor = TRUE; |
1534 | return ""; | 1530 | return UI_UPDATE; |
1535 | } | 1531 | } |
1536 | 1532 | ||
1537 | /* Place one */ | 1533 | /* Place one */ |
@@ -1976,7 +1972,8 @@ int main(int argc, char *argv[]) | |||
1976 | 1972 | ||
1977 | game_params *params = NULL; | 1973 | game_params *params = NULL; |
1978 | 1974 | ||
1979 | char *id = NULL, *desc = NULL, *err; | 1975 | char *id = NULL, *desc = NULL; |
1976 | const char *err; | ||
1980 | 1977 | ||
1981 | quis = argv[0]; | 1978 | quis = argv[0]; |
1982 | 1979 | ||
diff --git a/apps/plugins/puzzles/src/untangle.c b/apps/plugins/puzzles/src/untangle.c index 441c8658ce..6c2eb30deb 100644 --- a/apps/plugins/puzzles/src/untangle.c +++ b/apps/plugins/puzzles/src/untangle.c | |||
@@ -187,13 +187,10 @@ static config_item *game_configure(const game_params *params) | |||
187 | ret[0].name = "Number of points"; | 187 | ret[0].name = "Number of points"; |
188 | ret[0].type = C_STRING; | 188 | ret[0].type = C_STRING; |
189 | sprintf(buf, "%d", params->n); | 189 | sprintf(buf, "%d", params->n); |
190 | ret[0].sval = dupstr(buf); | 190 | ret[0].u.string.sval = dupstr(buf); |
191 | ret[0].ival = 0; | ||
192 | 191 | ||
193 | ret[1].name = NULL; | 192 | ret[1].name = NULL; |
194 | ret[1].type = C_END; | 193 | ret[1].type = C_END; |
195 | ret[1].sval = NULL; | ||
196 | ret[1].ival = 0; | ||
197 | 194 | ||
198 | return ret; | 195 | return ret; |
199 | } | 196 | } |
@@ -202,12 +199,12 @@ static game_params *custom_params(const config_item *cfg) | |||
202 | { | 199 | { |
203 | game_params *ret = snew(game_params); | 200 | game_params *ret = snew(game_params); |
204 | 201 | ||
205 | ret->n = atoi(cfg[0].sval); | 202 | ret->n = atoi(cfg[0].u.string.sval); |
206 | 203 | ||
207 | return ret; | 204 | return ret; |
208 | } | 205 | } |
209 | 206 | ||
210 | static char *validate_params(const game_params *params, int full) | 207 | static const char *validate_params(const game_params *params, int full) |
211 | { | 208 | { |
212 | if (params->n < 4) | 209 | if (params->n < 4) |
213 | return "Number of points must be at least four"; | 210 | return "Number of points must be at least four"; |
@@ -661,7 +658,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
661 | */ | 658 | */ |
662 | ret = NULL; | 659 | ret = NULL; |
663 | { | 660 | { |
664 | char *sep; | 661 | const char *sep; |
665 | char buf[80]; | 662 | char buf[80]; |
666 | int retlen; | 663 | int retlen; |
667 | edge *ea; | 664 | edge *ea; |
@@ -736,7 +733,7 @@ static char *new_game_desc(const game_params *params, random_state *rs, | |||
736 | return ret; | 733 | return ret; |
737 | } | 734 | } |
738 | 735 | ||
739 | static char *validate_desc(const game_params *params, const char *desc) | 736 | static const char *validate_desc(const game_params *params, const char *desc) |
740 | { | 737 | { |
741 | int a, b; | 738 | int a, b; |
742 | 739 | ||
@@ -883,7 +880,7 @@ static void free_game(game_state *state) | |||
883 | } | 880 | } |
884 | 881 | ||
885 | static char *solve_game(const game_state *state, const game_state *currstate, | 882 | static char *solve_game(const game_state *state, const game_state *currstate, |
886 | const char *aux, char **error) | 883 | const char *aux, const char **error) |
887 | { | 884 | { |
888 | int n = state->params.n; | 885 | int n = state->params.n; |
889 | int matrix[4]; | 886 | int matrix[4]; |
@@ -1126,14 +1123,14 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1126 | ui->newpoint.x = x; | 1123 | ui->newpoint.x = x; |
1127 | ui->newpoint.y = y; | 1124 | ui->newpoint.y = y; |
1128 | ui->newpoint.d = ds->tilesize; | 1125 | ui->newpoint.d = ds->tilesize; |
1129 | return ""; | 1126 | return UI_UPDATE; |
1130 | } | 1127 | } |
1131 | 1128 | ||
1132 | } else if (IS_MOUSE_DRAG(button) && ui->dragpoint >= 0) { | 1129 | } else if (IS_MOUSE_DRAG(button) && ui->dragpoint >= 0) { |
1133 | ui->newpoint.x = x; | 1130 | ui->newpoint.x = x; |
1134 | ui->newpoint.y = y; | 1131 | ui->newpoint.y = y; |
1135 | ui->newpoint.d = ds->tilesize; | 1132 | ui->newpoint.d = ds->tilesize; |
1136 | return ""; | 1133 | return UI_UPDATE; |
1137 | } else if (IS_MOUSE_RELEASE(button) && ui->dragpoint >= 0) { | 1134 | } else if (IS_MOUSE_RELEASE(button) && ui->dragpoint >= 0) { |
1138 | int p = ui->dragpoint; | 1135 | int p = ui->dragpoint; |
1139 | char buf[80]; | 1136 | char buf[80]; |
@@ -1148,7 +1145,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, | |||
1148 | ui->newpoint.x >= (long)state->w*ui->newpoint.d || | 1145 | ui->newpoint.x >= (long)state->w*ui->newpoint.d || |
1149 | ui->newpoint.y < 0 || | 1146 | ui->newpoint.y < 0 || |
1150 | ui->newpoint.y >= (long)state->h*ui->newpoint.d) | 1147 | ui->newpoint.y >= (long)state->h*ui->newpoint.d) |
1151 | return ""; | 1148 | return UI_UPDATE; |
1152 | 1149 | ||
1153 | /* | 1150 | /* |
1154 | * We aren't cancelling the drag. Construct a move string | 1151 | * We aren't cancelling the drag. Construct a move string |
diff --git a/apps/plugins/puzzles/src/windows.c b/apps/plugins/puzzles/src/windows.c index ffd0f75894..8e5b40650d 100644 --- a/apps/plugins/puzzles/src/windows.c +++ b/apps/plugins/puzzles/src/windows.c | |||
@@ -150,7 +150,7 @@ void dputs(char *buf) | |||
150 | OutputDebugString(buf); | 150 | OutputDebugString(buf); |
151 | } | 151 | } |
152 | 152 | ||
153 | void debug_printf(char *fmt, ...) | 153 | void debug_printf(const char *fmt, ...) |
154 | { | 154 | { |
155 | char buf[4096]; | 155 | char buf[4096]; |
156 | va_list ap; | 156 | va_list ap; |
@@ -258,7 +258,7 @@ void frontend_free(frontend *fe) | |||
258 | static void update_type_menu_tick(frontend *fe); | 258 | static void update_type_menu_tick(frontend *fe); |
259 | static void update_copy_menu_greying(frontend *fe); | 259 | static void update_copy_menu_greying(frontend *fe); |
260 | 260 | ||
261 | void fatal(char *fmt, ...) | 261 | void fatal(const char *fmt, ...) |
262 | { | 262 | { |
263 | char buf[2048]; | 263 | char buf[2048]; |
264 | va_list ap; | 264 | va_list ap; |
@@ -304,7 +304,7 @@ void get_random_seed(void **randseed, int *randseedsize) | |||
304 | *randseedsize = sizeof(SYSTEMTIME); | 304 | *randseedsize = sizeof(SYSTEMTIME); |
305 | } | 305 | } |
306 | 306 | ||
307 | static void win_status_bar(void *handle, char *text) | 307 | static void win_status_bar(void *handle, const char *text) |
308 | { | 308 | { |
309 | #ifdef _WIN32_WCE | 309 | #ifdef _WIN32_WCE |
310 | TCHAR wText[255]; | 310 | TCHAR wText[255]; |
@@ -556,7 +556,8 @@ static void win_unclip(void *handle) | |||
556 | } | 556 | } |
557 | 557 | ||
558 | static void win_draw_text(void *handle, int x, int y, int fonttype, | 558 | static void win_draw_text(void *handle, int x, int y, int fonttype, |
559 | int fontsize, int align, int colour, char *text) | 559 | int fontsize, int align, int colour, |
560 | const char *text) | ||
560 | { | 561 | { |
561 | frontend *fe = (frontend *)handle; | 562 | frontend *fe = (frontend *)handle; |
562 | POINT xy; | 563 | POINT xy; |
@@ -1002,7 +1003,7 @@ void print(frontend *fe) | |||
1002 | document *doc; | 1003 | document *doc; |
1003 | midend *nme = NULL; /* non-interactive midend for bulk puzzle generation */ | 1004 | midend *nme = NULL; /* non-interactive midend for bulk puzzle generation */ |
1004 | int i; | 1005 | int i; |
1005 | char *err = NULL; | 1006 | const char *err = NULL; |
1006 | 1007 | ||
1007 | /* | 1008 | /* |
1008 | * Create our document structure and fill it up with puzzles. | 1009 | * Create our document structure and fill it up with puzzles. |
@@ -1550,7 +1551,7 @@ static frontend *frontend_new(HINSTANCE inst) | |||
1550 | return fe; | 1551 | return fe; |
1551 | } | 1552 | } |
1552 | 1553 | ||
1553 | static void savefile_write(void *wctx, void *buf, int len) | 1554 | static void savefile_write(void *wctx, const void *buf, int len) |
1554 | { | 1555 | { |
1555 | FILE *fp = (FILE *)wctx; | 1556 | FILE *fp = (FILE *)wctx; |
1556 | fwrite(buf, 1, len, fp); | 1557 | fwrite(buf, 1, len, fp); |
@@ -1586,7 +1587,7 @@ static midend *midend_for_new_game(frontend *fe, const game *cgame, | |||
1586 | midend_new_game(me); | 1587 | midend_new_game(me); |
1587 | } else { | 1588 | } else { |
1588 | FILE *fp; | 1589 | FILE *fp; |
1589 | char *err_param, *err_load; | 1590 | const char *err_param, *err_load; |
1590 | 1591 | ||
1591 | /* | 1592 | /* |
1592 | * See if arg is a valid filename of a save game file. | 1593 | * See if arg is a valid filename of a save game file. |
@@ -2057,52 +2058,43 @@ static config_item *frontend_get_config(frontend *fe, int which, | |||
2057 | 2058 | ||
2058 | ret[i].name = "Number of puzzles to print"; | 2059 | ret[i].name = "Number of puzzles to print"; |
2059 | ret[i].type = C_STRING; | 2060 | ret[i].type = C_STRING; |
2060 | ret[i].sval = dupstr("1"); | 2061 | ret[i].u.string.sval = dupstr("1"); |
2061 | ret[i].ival = 0; | ||
2062 | i++; | 2062 | i++; |
2063 | 2063 | ||
2064 | ret[i].name = "Number of puzzles across the page"; | 2064 | ret[i].name = "Number of puzzles across the page"; |
2065 | ret[i].type = C_STRING; | 2065 | ret[i].type = C_STRING; |
2066 | ret[i].sval = dupstr("1"); | 2066 | ret[i].u.string.sval = dupstr("1"); |
2067 | ret[i].ival = 0; | ||
2068 | i++; | 2067 | i++; |
2069 | 2068 | ||
2070 | ret[i].name = "Number of puzzles down the page"; | 2069 | ret[i].name = "Number of puzzles down the page"; |
2071 | ret[i].type = C_STRING; | 2070 | ret[i].type = C_STRING; |
2072 | ret[i].sval = dupstr("1"); | 2071 | ret[i].u.string.sval = dupstr("1"); |
2073 | ret[i].ival = 0; | ||
2074 | i++; | 2072 | i++; |
2075 | 2073 | ||
2076 | ret[i].name = "Percentage of standard size"; | 2074 | ret[i].name = "Percentage of standard size"; |
2077 | ret[i].type = C_STRING; | 2075 | ret[i].type = C_STRING; |
2078 | ret[i].sval = dupstr("100.0"); | 2076 | ret[i].u.string.sval = dupstr("100.0"); |
2079 | ret[i].ival = 0; | ||
2080 | i++; | 2077 | i++; |
2081 | 2078 | ||
2082 | ret[i].name = "Include currently shown puzzle"; | 2079 | ret[i].name = "Include currently shown puzzle"; |
2083 | ret[i].type = C_BOOLEAN; | 2080 | ret[i].type = C_BOOLEAN; |
2084 | ret[i].sval = NULL; | 2081 | ret[i].u.boolean.bval = TRUE; |
2085 | ret[i].ival = TRUE; | ||
2086 | i++; | 2082 | i++; |
2087 | 2083 | ||
2088 | ret[i].name = "Print solutions"; | 2084 | ret[i].name = "Print solutions"; |
2089 | ret[i].type = C_BOOLEAN; | 2085 | ret[i].type = C_BOOLEAN; |
2090 | ret[i].sval = NULL; | 2086 | ret[i].u.boolean.bval = FALSE; |
2091 | ret[i].ival = FALSE; | ||
2092 | i++; | 2087 | i++; |
2093 | 2088 | ||
2094 | if (fe->game->can_print_in_colour) { | 2089 | if (fe->game->can_print_in_colour) { |
2095 | ret[i].name = "Print in colour"; | 2090 | ret[i].name = "Print in colour"; |
2096 | ret[i].type = C_BOOLEAN; | 2091 | ret[i].type = C_BOOLEAN; |
2097 | ret[i].sval = NULL; | 2092 | ret[i].u.boolean.bval = FALSE; |
2098 | ret[i].ival = FALSE; | ||
2099 | i++; | 2093 | i++; |
2100 | } | 2094 | } |
2101 | 2095 | ||
2102 | ret[i].name = NULL; | 2096 | ret[i].name = NULL; |
2103 | ret[i].type = C_END; | 2097 | ret[i].type = C_END; |
2104 | ret[i].sval = NULL; | ||
2105 | ret[i].ival = 0; | ||
2106 | i++; | 2098 | i++; |
2107 | 2099 | ||
2108 | return ret; | 2100 | return ret; |
@@ -2112,22 +2104,24 @@ static config_item *frontend_get_config(frontend *fe, int which, | |||
2112 | } | 2104 | } |
2113 | } | 2105 | } |
2114 | 2106 | ||
2115 | static char *frontend_set_config(frontend *fe, int which, config_item *cfg) | 2107 | static const char *frontend_set_config( |
2108 | frontend *fe, int which, config_item *cfg) | ||
2116 | { | 2109 | { |
2117 | if (which < CFG_FRONTEND_SPECIFIC) { | 2110 | if (which < CFG_FRONTEND_SPECIFIC) { |
2118 | return midend_set_config(fe->me, which, cfg); | 2111 | return midend_set_config(fe->me, which, cfg); |
2119 | } else if (which == CFG_PRINT) { | 2112 | } else if (which == CFG_PRINT) { |
2120 | if ((fe->printcount = atoi(cfg[0].sval)) <= 0) | 2113 | if ((fe->printcount = atoi(cfg[0].u.string.sval)) <= 0) |
2121 | return "Number of puzzles to print should be at least one"; | 2114 | return "Number of puzzles to print should be at least one"; |
2122 | if ((fe->printw = atoi(cfg[1].sval)) <= 0) | 2115 | if ((fe->printw = atoi(cfg[1].u.string.sval)) <= 0) |
2123 | return "Number of puzzles across the page should be at least one"; | 2116 | return "Number of puzzles across the page should be at least one"; |
2124 | if ((fe->printh = atoi(cfg[2].sval)) <= 0) | 2117 | if ((fe->printh = atoi(cfg[2].u.string.sval)) <= 0) |
2125 | return "Number of puzzles down the page should be at least one"; | 2118 | return "Number of puzzles down the page should be at least one"; |
2126 | if ((fe->printscale = (float)atof(cfg[3].sval)) <= 0) | 2119 | if ((fe->printscale = (float)atof(cfg[3].u.string.sval)) <= 0) |
2127 | return "Print size should be positive"; | 2120 | return "Print size should be positive"; |
2128 | fe->printcurr = cfg[4].ival; | 2121 | fe->printcurr = cfg[4].u.boolean.bval; |
2129 | fe->printsolns = cfg[5].ival; | 2122 | fe->printsolns = cfg[5].u.boolean.bval; |
2130 | fe->printcolour = fe->game->can_print_in_colour && cfg[6].ival; | 2123 | fe->printcolour = fe->game->can_print_in_colour && |
2124 | cfg[6].u.boolean.bval; | ||
2131 | return NULL; | 2125 | return NULL; |
2132 | } else { | 2126 | } else { |
2133 | assert(!"We should never get here"); | 2127 | assert(!"We should never get here"); |
@@ -2140,7 +2134,7 @@ static char *frontend_set_config(frontend *fe, int which, config_item *cfg) | |||
2140 | /* Control coordinates should be specified in dialog units. */ | 2134 | /* Control coordinates should be specified in dialog units. */ |
2141 | HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2, | 2135 | HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2, |
2142 | LPCTSTR wclass, int wstyle, | 2136 | LPCTSTR wclass, int wstyle, |
2143 | int exstyle, const char *wtext, int wid) | 2137 | int exstyle, const char *wtext, INT_PTR wid) |
2144 | { | 2138 | { |
2145 | RECT rc; | 2139 | RECT rc; |
2146 | TCHAR wwtext[256]; | 2140 | TCHAR wwtext[256]; |
@@ -2191,7 +2185,7 @@ static void create_config_controls(frontend * fe) | |||
2191 | mkctrl(fe, col2l, col2r, y, y + 12, | 2185 | mkctrl(fe, col2l, col2r, y, y + 12, |
2192 | TEXT("EDIT"), WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL, | 2186 | TEXT("EDIT"), WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL, |
2193 | 0, "", (j->ctlid = id++)); | 2187 | 0, "", (j->ctlid = id++)); |
2194 | SetDlgItemTextA(fe->cfgbox, j->ctlid, i->sval); | 2188 | SetDlgItemTextA(fe->cfgbox, j->ctlid, i->u.string.sval); |
2195 | break; | 2189 | break; |
2196 | 2190 | ||
2197 | case C_BOOLEAN: | 2191 | case C_BOOLEAN: |
@@ -2201,7 +2195,7 @@ static void create_config_controls(frontend * fe) | |||
2201 | mkctrl(fe, col1l, col2r, y + 1, y + 11, TEXT("BUTTON"), | 2195 | mkctrl(fe, col1l, col2r, y + 1, y + 11, TEXT("BUTTON"), |
2202 | BS_NOTIFY | BS_AUTOCHECKBOX | WS_TABSTOP, | 2196 | BS_NOTIFY | BS_AUTOCHECKBOX | WS_TABSTOP, |
2203 | 0, i->name, (j->ctlid = id++)); | 2197 | 0, i->name, (j->ctlid = id++)); |
2204 | CheckDlgButton(fe->cfgbox, j->ctlid, (i->ival != 0)); | 2198 | CheckDlgButton(fe->cfgbox, j->ctlid, (i->u.boolean.bval != 0)); |
2205 | break; | 2199 | break; |
2206 | 2200 | ||
2207 | case C_CHOICES: | 2201 | case C_CHOICES: |
@@ -2215,9 +2209,11 @@ static void create_config_controls(frontend * fe) | |||
2215 | CBS_DROPDOWNLIST | CBS_HASSTRINGS, | 2209 | CBS_DROPDOWNLIST | CBS_HASSTRINGS, |
2216 | 0, "", (j->ctlid = id++)); | 2210 | 0, "", (j->ctlid = id++)); |
2217 | { | 2211 | { |
2218 | char c, *p, *q, *str; | 2212 | char c; |
2213 | const char *p, *q; | ||
2214 | char *str; | ||
2219 | 2215 | ||
2220 | p = i->sval; | 2216 | p = i->u.choices.choicenames; |
2221 | c = *p++; | 2217 | c = *p++; |
2222 | while (*p) { | 2218 | while (*p) { |
2223 | q = p; | 2219 | q = p; |
@@ -2236,7 +2232,7 @@ static void create_config_controls(frontend * fe) | |||
2236 | p = q; | 2232 | p = q; |
2237 | } | 2233 | } |
2238 | } | 2234 | } |
2239 | SendMessage(ctl, CB_SETCURSEL, i->ival, 0); | 2235 | SendMessage(ctl, CB_SETCURSEL, i->u.choices.selected, 0); |
2240 | break; | 2236 | break; |
2241 | } | 2237 | } |
2242 | 2238 | ||
@@ -2282,7 +2278,8 @@ static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg, | |||
2282 | */ | 2278 | */ |
2283 | if ((LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)) { | 2279 | if ((LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)) { |
2284 | if (LOWORD(wParam) == IDOK) { | 2280 | if (LOWORD(wParam) == IDOK) { |
2285 | char *err = frontend_set_config(fe, fe->cfg_which, fe->cfg); | 2281 | const char *err = frontend_set_config( |
2282 | fe, fe->cfg_which, fe->cfg); | ||
2286 | 2283 | ||
2287 | if (err) { | 2284 | if (err) { |
2288 | MessageBox(hwnd, err, "Validation error", | 2285 | MessageBox(hwnd, err, "Validation error", |
@@ -2324,16 +2321,16 @@ static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg, | |||
2324 | GetDlgItemText(fe->cfgbox, j->ctlid, buffer, lenof(buffer)); | 2321 | GetDlgItemText(fe->cfgbox, j->ctlid, buffer, lenof(buffer)); |
2325 | #endif | 2322 | #endif |
2326 | buffer[lenof(buffer)-1] = '\0'; | 2323 | buffer[lenof(buffer)-1] = '\0'; |
2327 | sfree(i->sval); | 2324 | sfree(i->u.string.sval); |
2328 | i->sval = dupstr(buffer); | 2325 | i->u.string.sval = dupstr(buffer); |
2329 | } else if (i->type == C_BOOLEAN && | 2326 | } else if (i->type == C_BOOLEAN && |
2330 | (HIWORD(wParam) == BN_CLICKED || | 2327 | (HIWORD(wParam) == BN_CLICKED || |
2331 | HIWORD(wParam) == BN_DBLCLK)) { | 2328 | HIWORD(wParam) == BN_DBLCLK)) { |
2332 | i->ival = IsDlgButtonChecked(fe->cfgbox, j->ctlid); | 2329 | i->u.boolean.bval = IsDlgButtonChecked(fe->cfgbox, j->ctlid); |
2333 | } else if (i->type == C_CHOICES && | 2330 | } else if (i->type == C_CHOICES && |
2334 | HIWORD(wParam) == CBN_SELCHANGE) { | 2331 | HIWORD(wParam) == CBN_SELCHANGE) { |
2335 | i->ival = SendDlgItemMessage(fe->cfgbox, j->ctlid, | 2332 | i->u.choices.selected = SendDlgItemMessage(fe->cfgbox, j->ctlid, |
2336 | CB_GETCURSEL, 0, 0); | 2333 | CB_GETCURSEL, 0, 0); |
2337 | } | 2334 | } |
2338 | 2335 | ||
2339 | return 0; | 2336 | return 0; |
@@ -2349,7 +2346,7 @@ static int CALLBACK ConfigDlgProc(HWND hwnd, UINT msg, | |||
2349 | #ifndef _WIN32_WCE | 2346 | #ifndef _WIN32_WCE |
2350 | HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2, | 2347 | HWND mkctrl(frontend *fe, int x1, int x2, int y1, int y2, |
2351 | char *wclass, int wstyle, | 2348 | char *wclass, int wstyle, |
2352 | int exstyle, const char *wtext, int wid) | 2349 | int exstyle, const char *wtext, INT_PTR wid) |
2353 | { | 2350 | { |
2354 | HWND ret; | 2351 | HWND ret; |
2355 | ret = CreateWindowEx(exstyle, wclass, wtext, | 2352 | ret = CreateWindowEx(exstyle, wclass, wtext, |
@@ -2683,7 +2680,7 @@ static int get_config(frontend *fe, int which) | |||
2683 | ctl = mkctrl(fe, col2l, col2r, y, y+height*3/2, | 2680 | ctl = mkctrl(fe, col2l, col2r, y, y+height*3/2, |
2684 | "EDIT", WS_TABSTOP | ES_AUTOHSCROLL, | 2681 | "EDIT", WS_TABSTOP | ES_AUTOHSCROLL, |
2685 | WS_EX_CLIENTEDGE, "", (j->ctlid = id++)); | 2682 | WS_EX_CLIENTEDGE, "", (j->ctlid = id++)); |
2686 | SetWindowText(ctl, i->sval); | 2683 | SetWindowText(ctl, i->u.string.sval); |
2687 | y += height*3/2; | 2684 | y += height*3/2; |
2688 | break; | 2685 | break; |
2689 | 2686 | ||
@@ -2694,7 +2691,7 @@ static int get_config(frontend *fe, int which) | |||
2694 | mkctrl(fe, col1l, col2r, y, y+height, "BUTTON", | 2691 | mkctrl(fe, col1l, col2r, y, y+height, "BUTTON", |
2695 | BS_NOTIFY | BS_AUTOCHECKBOX | WS_TABSTOP, | 2692 | BS_NOTIFY | BS_AUTOCHECKBOX | WS_TABSTOP, |
2696 | 0, i->name, (j->ctlid = id++)); | 2693 | 0, i->name, (j->ctlid = id++)); |
2697 | CheckDlgButton(fe->cfgbox, j->ctlid, (i->ival != 0)); | 2694 | CheckDlgButton(fe->cfgbox, j->ctlid, (i->u.boolean.bval != 0)); |
2698 | y += height; | 2695 | y += height; |
2699 | break; | 2696 | break; |
2700 | 2697 | ||
@@ -2709,10 +2706,12 @@ static int get_config(frontend *fe, int which) | |||
2709 | CBS_DROPDOWNLIST | CBS_HASSTRINGS, | 2706 | CBS_DROPDOWNLIST | CBS_HASSTRINGS, |
2710 | WS_EX_CLIENTEDGE, "", (j->ctlid = id++)); | 2707 | WS_EX_CLIENTEDGE, "", (j->ctlid = id++)); |
2711 | { | 2708 | { |
2712 | char c, *p, *q, *str; | 2709 | char c; |
2710 | const char *p, *q; | ||
2711 | char *str; | ||
2713 | 2712 | ||
2714 | SendMessage(ctl, CB_RESETCONTENT, 0, 0); | 2713 | SendMessage(ctl, CB_RESETCONTENT, 0, 0); |
2715 | p = i->sval; | 2714 | p = i->u.choices.choicenames; |
2716 | c = *p++; | 2715 | c = *p++; |
2717 | while (*p) { | 2716 | while (*p) { |
2718 | q = p; | 2717 | q = p; |
@@ -2727,7 +2726,7 @@ static int get_config(frontend *fe, int which) | |||
2727 | } | 2726 | } |
2728 | } | 2727 | } |
2729 | 2728 | ||
2730 | SendMessage(ctl, CB_SETCURSEL, i->ival, 0); | 2729 | SendMessage(ctl, CB_SETCURSEL, i->u.choices.selected, 0); |
2731 | 2730 | ||
2732 | y += height*3/2; | 2731 | y += height*3/2; |
2733 | break; | 2732 | break; |
@@ -3019,7 +3018,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, | |||
3019 | break; | 3018 | break; |
3020 | case IDM_SOLVE: | 3019 | case IDM_SOLVE: |
3021 | { | 3020 | { |
3022 | char *msg = midend_solve(fe->me); | 3021 | const char *msg = midend_solve(fe->me); |
3023 | if (msg) | 3022 | if (msg) |
3024 | MessageBox(hwnd, msg, "Unable to solve", | 3023 | MessageBox(hwnd, msg, "Unable to solve", |
3025 | MB_ICONERROR | MB_OK); | 3024 | MB_ICONERROR | MB_OK); |
@@ -3111,7 +3110,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, | |||
3111 | fclose(fp); | 3110 | fclose(fp); |
3112 | } else { | 3111 | } else { |
3113 | FILE *fp = fopen(filename, "r"); | 3112 | FILE *fp = fopen(filename, "r"); |
3114 | char *err = NULL; | 3113 | const char *err = NULL; |
3114 | char *err_w = NULL; | ||
3115 | midend *me = fe->me; | 3115 | midend *me = fe->me; |
3116 | #ifdef COMBINED | 3116 | #ifdef COMBINED |
3117 | char *id_name; | 3117 | char *id_name; |
@@ -3139,7 +3139,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, | |||
3139 | "supported by this program"; | 3139 | "supported by this program"; |
3140 | } else { | 3140 | } else { |
3141 | me = midend_for_new_game(fe, gamelist[i], NULL, | 3141 | me = midend_for_new_game(fe, gamelist[i], NULL, |
3142 | FALSE, FALSE, &err); | 3142 | FALSE, FALSE, &err_w); |
3143 | err = err_w; | ||
3143 | rewind(fp); /* for the actual load */ | 3144 | rewind(fp); /* for the actual load */ |
3144 | } | 3145 | } |
3145 | sfree(id_name); | 3146 | sfree(id_name); |
@@ -3152,6 +3153,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, | |||
3152 | 3153 | ||
3153 | if (err) { | 3154 | if (err) { |
3154 | MessageBox(hwnd, err, "Error", MB_ICONERROR|MB_OK); | 3155 | MessageBox(hwnd, err, "Error", MB_ICONERROR|MB_OK); |
3156 | sfree(err_w); | ||
3155 | break; | 3157 | break; |
3156 | } | 3158 | } |
3157 | 3159 | ||