sgt/puzzles
12 years agoError checking in Pattern, which was until now the only remaining game
simon [Fri, 6 Apr 2012 12:34:34 +0000 (12:34 +0000)]
Error checking in Pattern, which was until now the only remaining game
that _ought_ to have it but did not.

I've tried to implement it before and found that the most obvious
approach was so effective as to constitute a spoiler, so this is a
deliberately weakened approach which in a bit of play-testing seems to
be a more sensible balance. It won't necessarily tell you at the very
instant you put a foot wrong, but it will at least ensure that (my
usual minimum standard) once you've filled in the whole grid you will
either have seen a victory flash, or an error indicator showing you
why not.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9445 cda61777-01e9-0310-a592-d414129be87e

12 years agoComment the Mac build out of Buildscr, since I no longer have a
simon [Tue, 3 Apr 2012 12:49:22 +0000 (12:49 +0000)]
Comment the Mac build out of Buildscr, since I no longer have a
working Mac and hence can't build it any more.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9442 cda61777-01e9-0310-a592-d414129be87e

12 years agoPatch from Jonas Koelker to add keyboard control support to Pearl.
simon [Sun, 19 Feb 2012 10:15:59 +0000 (10:15 +0000)]
Patch from Jonas Koelker to add keyboard control support to Pearl.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9411 cda61777-01e9-0310-a592-d414129be87e

12 years agoTweak a conditional expression in pearl.c to work around a display bug
simon [Fri, 17 Feb 2012 19:07:31 +0000 (19:07 +0000)]
Tweak a conditional expression in pearl.c to work around a display bug
in the Java build - which turns out to be a JVM bug in OpenJDK 6,
causing the NestedVM rendition of the expression (i==1?3:4) to be
mis-JITed. OpenJDK 7 appears not to do that any more, but this
equivalent (for these purposes) rephrasing should perturb the code
just enough to dodge the problem.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9408 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix one-character typo in r9405 which was breaking right-clicks.
simon [Mon, 13 Feb 2012 21:10:47 +0000 (21:10 +0000)]
Fix one-character typo in r9405 which was breaking right-clicks.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9406 cda61777-01e9-0310-a592-d414129be87e

12 years agoDavid Nickerson reports odd behaviour involving a drag start point
simon [Wed, 8 Feb 2012 23:31:58 +0000 (23:31 +0000)]
David Nickerson reports odd behaviour involving a drag start point
persisting between separate mouse actions. Revamp all uses of the
ndragcoords field in an attempt to stamp that out: we now distinguish
between active drags (>0), a valid click but no drag yet (0), and a
totally invalid situation in which all mouse activity will be ignored
until the next fresh attempt (-1).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9405 cda61777-01e9-0310-a592-d414129be87e

12 years agoCorrect kdiff setting.
simon [Thu, 2 Feb 2012 23:04:46 +0000 (23:04 +0000)]
Correct kdiff setting.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9403 cda61777-01e9-0310-a592-d414129be87e

12 years agoDon't try to run solver_killer_sums on a Killer cage with only one
simon [Thu, 2 Feb 2012 23:04:43 +0000 (23:04 +0000)]
Don't try to run solver_killer_sums on a Killer cage with only one
square. It isn't equipped for it, and will try to handle it with the
4-square case and get confused. This can come up if the
DIFF_KINTERSECT pass before that split a cage, and will cause the
solver to miss valid solutions; e.g. 3x3kadu#802065940985372 would
generate an ambiguous puzzle before this change.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9402 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix a couple of typos in messages.
simon [Thu, 2 Feb 2012 23:04:38 +0000 (23:04 +0000)]
Fix a couple of typos in messages.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9401 cda61777-01e9-0310-a592-d414129be87e

12 years agoDavid Nickerson reports that it's possible to lay a line over a 'no
simon [Thu, 2 Feb 2012 07:18:14 +0000 (07:18 +0000)]
David Nickerson reports that it's possible to lay a line over a 'no
line here' cross mark by dragging, and furthermore, that doing so puts
that grid edge into a stuck state that no UI action short of undo can
get it back out of. Fix drags to stop at crosses, and fix execute_move
to fault any move string that nonetheless somehow managed to try to
set a line over a cross without explicitly tagging it 'R'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9400 cda61777-01e9-0310-a592-d414129be87e

12 years agoArrgh! Revert r9395,r9396,r9397,r9398, all of which I just committed
simon [Thu, 2 Feb 2012 07:15:48 +0000 (07:15 +0000)]
Arrgh! Revert r9395,r9396,r9397,r9398, all of which I just committed
by mistake in one go by running git-svn dcommit on the wrong branch.
Those were patches recently submitted by a user but which are not of
production quality (yet?) and I meant to keep them in my local
experimental repository. Sorry.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9399 cda61777-01e9-0310-a592-d414129be87e

12 years agoFixed decoding bug for dual grids
simon [Thu, 2 Feb 2012 07:13:17 +0000 (07:13 +0000)]
Fixed decoding bug for dual grids

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9398 cda61777-01e9-0310-a592-d414129be87e

12 years agoAdded dual floret preset
simon [Thu, 2 Feb 2012 07:13:15 +0000 (07:13 +0000)]
Added dual floret preset

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9397 cda61777-01e9-0310-a592-d414129be87e

12 years agoAdded "dual" option to grid generators
simon [Thu, 2 Feb 2012 07:13:14 +0000 (07:13 +0000)]
Added "dual" option to grid generators

It is now possible to produce duals of all grids.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9396 cda61777-01e9-0310-a592-d414129be87e

12 years agoCan now take the dual of a grid
simon [Thu, 2 Feb 2012 07:13:12 +0000 (07:13 +0000)]
Can now take the dual of a grid

Taking the dual of a grid creates a new grid with one vertex
for each face of the original and one face for each vertex. This
allows the easy introduction of a new grid type, the dual of the
octagonal grid, which is a square grid in which each square is split
into four triangles.

Of the grid types currently present, square is its own dual,
honeycomb is the dual of triangles, cairo is the dual of snub-squares,
kites is the dual of great-hexagonal, and the dodecagonal ones would
have vertices with twelve edges, probably not practical. The others
all have duals that would introduce new classes of puzzle.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9395 cda61777-01e9-0310-a592-d414129be87e

12 years agoSort out a bit of confusion between mouse- and keyboard-driven drags
simon [Tue, 31 Jan 2012 08:38:42 +0000 (08:38 +0000)]
Sort out a bit of confusion between mouse- and keyboard-driven drags
in Rectangles. Mouse drags now take priority - you can't start a
keyboard drag while the mouse is held down, and starting a mouse drag
instantly cancels an unfinished keyboard drag - and also I've fixed an
assertion failure which would come up if you had the keyboard cursor
visible at the end of a mouse drag (by pressing arrow keys while the
mouse was held down).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9393 cda61777-01e9-0310-a592-d414129be87e

12 years agoMove a debug statement at the end of new_clues from the caller (just
simon [Tue, 31 Jan 2012 08:32:26 +0000 (08:32 +0000)]
Move a debug statement at the end of new_clues from the caller (just
after return) to the callee (just before). Might print something
useful in the soak-test context (where that debug statement will now
be printed and previously wasn't), but the main aim is to remove the
variable 'ngen' at the main call site, which triggered a set-but-not-
used warning if the debug statement that printed it was compiled out.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9392 cda61777-01e9-0310-a592-d414129be87e

12 years agoAdd comments suggesting some solver upgrades to Light Up (perhaps for
simon [Mon, 23 Jan 2012 19:12:12 +0000 (19:12 +0000)]
Add comments suggesting some solver upgrades to Light Up (perhaps for
a new sub-recursive difficulty level?), inspired by a user emailing in
the game ID
18x10:gBc1b2g2e2d1b2c2h2e3c2dBd1g1bBb2b1fBbBb1bBgBd2dBi1h1c2b1dBe2bBdBb3cBg
which I was able to solve without backtracking by the use of these
techniques.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9388 cda61777-01e9-0310-a592-d414129be87e

12 years agoThe Light Up solver limits its recursion depth, so if it fails to find
simon [Mon, 23 Jan 2012 18:56:05 +0000 (18:56 +0000)]
The Light Up solver limits its recursion depth, so if it fails to find
a solution then it should not deduce that no solution exists. Change
wording of the error message returned from the Solve user action.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9387 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix default parameter assignment in Light Up when validating an
simon [Mon, 23 Jan 2012 18:56:04 +0000 (18:56 +0000)]
Fix default parameter assignment in Light Up when validating an
incomplete parameter string: if the user hand-types a game ID along
the lines of '18x10:stuff', we should not assume SYMM_ROT4 in the
resulting game_params, since it'll be failed by validate_params.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9386 cda61777-01e9-0310-a592-d414129be87e

12 years agoTrivial and silly patch to allow users to configure the Signpost
simon [Sun, 22 Jan 2012 15:52:14 +0000 (15:52 +0000)]
Trivial and silly patch to allow users to configure the Signpost
victory roll so that adjacent arrows rotate in opposite directions,
giving the impression that they're an interlocking field of gears.
Possibly even more brain-twisting than the original version :-)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9384 cda61777-01e9-0310-a592-d414129be87e

12 years agoIt's a new year.
jacob [Sun, 22 Jan 2012 15:44:04 +0000 (15:44 +0000)]
It's a new year.
(It was a new year this time last year, too.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9382 cda61777-01e9-0310-a592-d414129be87e

12 years agoTweak right-click processing to be less finicky.
simon [Sun, 22 Jan 2012 15:12:56 +0000 (15:12 +0000)]
Tweak right-click processing to be less finicky.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9381 cda61777-01e9-0310-a592-d414129be87e

12 years agoNew puzzle! Or rather, new-ish, because this one has been lying around
simon [Sun, 22 Jan 2012 14:14:26 +0000 (14:14 +0000)]
New puzzle! Or rather, new-ish, because this one has been lying around
in the 'unfinished' directory for a while, and has now been finished
up thanks to James Harvey putting in some effort and galvanising me to
put in the rest. This is 'Pearl', an implementation of Nikoli's 'Masyu'.

The code in Loopy that generates a random loop along grid edges to use
as the puzzle solution has been abstracted out into loopgen.[ch] so
that Pearl can use it for its puzzle solutions too. I've also
introduced a new utility module called 'tdq' (for 'to-do queue').

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9379 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix a bug causing premature defeatism in the Bridges solver. Deducing
simon [Tue, 17 Jan 2012 18:53:02 +0000 (18:53 +0000)]
Fix a bug causing premature defeatism in the Bridges solver. Deducing
a better upper bound on the number of bridges leaving a given island
in a given direction was not counted as having 'done something'; so a
solver run could make several such deductions, but then terminate in
the belief that it hadn't achieved anything, when just going back
round the main solver loop would have enabled it to make further
deductions based on those new bounds.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9377 cda61777-01e9-0310-a592-d414129be87e

12 years agoAllow --save to work with --soln, causing saved game files to be
simon [Wed, 28 Dec 2011 18:17:30 +0000 (18:17 +0000)]
Allow --save to work with --soln, causing saved game files to be
written out with the Solve operation having already been performed.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9375 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix bug in error reporting for --save caused by freeing 'realname'
simon [Wed, 28 Dec 2011 18:07:46 +0000 (18:07 +0000)]
Fix bug in error reporting for --save caused by freeing 'realname'
before the error messages wanted to use it.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9374 cda61777-01e9-0310-a592-d414129be87e

12 years agoFix bug in --save caused by failure to initialise ctx.error to zero
simon [Wed, 28 Dec 2011 18:07:46 +0000 (18:07 +0000)]
Fix bug in --save caused by failure to initialise ctx.error to zero
before later checking to see if an errno code was dumped in it.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9373 cda61777-01e9-0310-a592-d414129be87e

12 years agoIn Group, the keyboard-controlled cursor should respect user
simon [Wed, 21 Dec 2011 13:46:48 +0000 (13:46 +0000)]
In Group, the keyboard-controlled cursor should respect user
rearrangement of the rows and columns.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9372 cda61777-01e9-0310-a592-d414129be87e

12 years agoRemove the 'cheated' flag in Range's game_ui, which was stickily
simon [Sun, 18 Sep 2011 07:43:19 +0000 (07:43 +0000)]
Remove the 'cheated' flag in Range's game_ui, which was stickily
remembering whether the player had ever used the hint or solve
functions, even if they then pressed undo (and even if they saved and
restored).

As far as Solve+Undo is concerned, this just brings Range into line
with common practice in the rest of my puzzles. On the other hand,
Range is the first time there's been a 'hint' function to consider in
this question, so here's a policy decision: the victory flash is not a
congratulation for a puzzle solved unaided, it's a confirmation that
you really have reached a correct solution and haven't made any
mistakes. So the only reason to omit the victory flash is if you've
used the Solve operation to go straight to a guaranteed-correct
solution _in a single move_; if you're using the hint button, there's
still scope for you to make mistakes in all your non-hint moves, so
the victory flash is still a useful indicator that you didn't.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9306 cda61777-01e9-0310-a592-d414129be87e

12 years agoWhen we run out of background colours for chains and wrap back to the
simon [Sun, 18 Sep 2011 07:43:18 +0000 (07:43 +0000)]
When we run out of background colours for chains and wrap back to the
beginning, we should wrap back to COL_B0+1 rather than COL_B0 itself,
so as not to reuse white. White should be special, and always indicate
a properly numbered square.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9305 cda61777-01e9-0310-a592-d414129be87e

12 years agoPatch from Chris Boyle to fix Signpost's labelling when you have more
simon [Sun, 18 Sep 2011 07:43:18 +0000 (07:43 +0000)]
Patch from Chris Boyle to fix Signpost's labelling when you have more
than 26 separate linked chains of unnumbered squares: we now wrap from
'z' to an Excel-like 'aa', 'ab', ..., instead of falling off z into
punctuation and control characters.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9304 cda61777-01e9-0310-a592-d414129be87e

12 years agoChanged my mind about midend_is_solved: I've now reprototyped it as
simon [Sun, 19 Jun 2011 13:43:35 +0000 (13:43 +0000)]
Changed my mind about midend_is_solved: I've now reprototyped it as
midend_status(), and given it three return codes for win, (permanent)
loss and game-still-in-play. Depending on what the front end wants to
use it for, it may find any or all of these three states worth
distinguishing from each other.

(I suppose a further enhancement might be to add _non_-permanent loss
as a fourth distinct status, to describe situations in which you can't
play further without pressing Undo but doing so is not completely
pointless. That might reasonably include dead-end situations in Same
Game and Pegs, and blown-self-up situations in Mines and Inertia.
However, I haven't done this at present.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9179 cda61777-01e9-0310-a592-d414129be87e

12 years agoPass background colour as a parameter to draw_gts and draw_adjs, so
simon [Sun, 22 May 2011 07:07:47 +0000 (07:07 +0000)]
Pass background colour as a parameter to draw_gts and draw_adjs, so
that we can pass -1 in calls from game_print(). Fixes a printing bug
in which all the adjs and gts were overlaid with giant black
rectangles! (Because COL_BACKGROUND doesn't mean the same thing in
that context.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9175 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix segfault in Loopy printing, introduced when I added the dynamic
simon [Wed, 11 May 2011 18:11:28 +0000 (18:11 +0000)]
Fix segfault in Loopy printing, introduced when I added the dynamic
arrays 'textx' and 'texty' to the game_drawstate but failed to
initialise them in the temporary drawstate used by game_print().
Thanks to Arun Giridhar for spotting this.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9173 cda61777-01e9-0310-a592-d414129be87e

13 years agoHaving played Keen a bit following the clue-generation fix in r9165,
simon [Sat, 7 May 2011 13:22:17 +0000 (13:22 +0000)]
Having played Keen a bit following the clue-generation fix in r9165,
I've decided that the extremely low density of one-option
multiplication clues is not a universally good idea after all: it
seems to me to make puzzles _quantitatively_ harder, even if Keen's
difficulty-level system can't see any difference in the set of modes
of reasoning required at least once to solve the grid.

So I've readjusted the clue selection, so that multiplicative clues
with only one workable pair of factors are restored to 'good' status
at Normal difficulty level and below, and only considered less-than-
fully-desirable at Hard and above. I think that's a reasonable
compromise.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9170 cda61777-01e9-0310-a592-d414129be87e

13 years agoApply the rotation in Penrose grid descriptions by rotating in the
simon [Fri, 6 May 2011 17:09:03 +0000 (17:09 +0000)]
Apply the rotation in Penrose grid descriptions by rotating in the
4-vector representation, rather than mucking about with sines and
cosines after grid generation. _Should_ make no difference in the
generated grids (there's a theoretical risk of an unlucky rounding
error just about managing to push some point in or out of bounds, but
I think it's vanishingly small), but simplifies the coordinate-
flattening procedure, and in particular increases its chance of
getting vertical lines actually vertical.

(Prior to this change, the game ID
10x10t12:G2554,-31,108_a3b12h0a212a3d102b2a23a2e3b01b0a2c2a0c0 was
generating a not-quite-vertical edge at top left, in the Java port but
not on Linux; I suspect differences in sin and cos as the cause of the
discrepancy. With the rotation done like this, the points'
x-coordinates are now computed without reference to their
y-coordinates.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9168 cda61777-01e9-0310-a592-d414129be87e

13 years agoApply a missing bit of r9164, which only broke the build with
simon [Thu, 5 May 2011 17:13:16 +0000 (17:13 +0000)]
Apply a missing bit of r9164, which only broke the build with
-DDEBUGGING so I didn't notice it at the time.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9167 cda61777-01e9-0310-a592-d414129be87e

13 years agoPortability fixes, mostly from James for Palm purposes. Mostly
simon [Wed, 4 May 2011 18:41:21 +0000 (18:41 +0000)]
Portability fixes, mostly from James for Palm purposes. Mostly
additions of missing 'static' and explicit 'void' in parameter lists,
plus one or two other things like explicitly casting chars in variadic
argument lists to int and using DBL_MAX if HUGE_VAL isn't available.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9166 cda61777-01e9-0310-a592-d414129be87e

13 years agoHaving looked at Keen's clue selection code, I also notice that the
simon [Wed, 4 May 2011 18:22:15 +0000 (18:22 +0000)]
Having looked at Keen's clue selection code, I also notice that the
intended behaviour of classifying multiplication clues as low-quality
if they only left one possible pair of multiplicands has never
actually worked, because I should have compared the possible clue
count against 2 rather than 1 since the multiplicands can occur either
way round.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9165 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix warnings generated by gcc 4.6.0 about variables set but not
simon [Wed, 4 May 2011 18:22:14 +0000 (18:22 +0000)]
Fix warnings generated by gcc 4.6.0 about variables set but not
thereafter read. Most of these changes are just removal of pointless
stuff or trivial reorganisations; one change is actually substantive,
and fixes a bug in Keen's clue selection (the variable 'bad' was
unreferenced not because I shouldn't have set it, but because I
_should_ have referenced it!).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9164 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix two memory leaks reported by Tiago Dionizio in recent Loopy
simon [Tue, 26 Apr 2011 13:44:27 +0000 (13:44 +0000)]
Fix two memory leaks reported by Tiago Dionizio in recent Loopy
development.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9163 cda61777-01e9-0310-a592-d414129be87e

13 years agoForgot to set 'has_incentre' on triangular grids, which don't use
simon [Mon, 25 Apr 2011 22:41:54 +0000 (22:41 +0000)]
Forgot to set 'has_incentre' on triangular grids, which don't use
grid_face_add_new(). Oops.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9161 cda61777-01e9-0310-a592-d414129be87e

13 years agoFrom James Harvey (via a period of collaborative polishing), a patch
simon [Sun, 24 Apr 2011 09:10:52 +0000 (09:10 +0000)]
From James Harvey (via a period of collaborative polishing), a patch
to add two kinds of Penrose tiling to the grid types supported by
Loopy.

This has involved a certain amount of infrastructure work, because of
course the whole point of Penrose tilings is that they don't have to
be the same every time: so now grid.c has grown the capacity to
describe its grids as strings, and reconstitute them from those string
descriptions. Hence a Penrose Loopy game description consists of a
string identifying a particular piece of Penrose tiling, followed by
the normal Loopy clue encoding.

All the existing grid types decline to provide a grid description
string, so their Loopy game descriptions have not changed encoding.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9159 cda61777-01e9-0310-a592-d414129be87e

13 years agoOops: initialise that new 'has_incentre' flag to false, otherwise the
simon [Sat, 23 Apr 2011 13:03:38 +0000 (13:03 +0000)]
Oops: initialise that new 'has_incentre' flag to false, otherwise the
game will sometimes pick random incentres in place of the carefully
computed ones. Ahem.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9158 cda61777-01e9-0310-a592-d414129be87e

13 years agoMove most of face_text_pos() into grid.c, leaving in loopy.c only the
simon [Sat, 23 Apr 2011 11:44:43 +0000 (11:44 +0000)]
Move most of face_text_pos() into grid.c, leaving in loopy.c only the
part that converts from abstract grid coordinates into screen
coordinates. This should speed up window-resizing by eliminating
pointless reiteration of the complicated part of the algorithm: now
when a game_drawstate is renewed, only the conversion into screen
coordinates has to be redone.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9157 cda61777-01e9-0310-a592-d414129be87e

13 years agoReplace my brute-force algorithm in face_text_pos with a more complex
simon [Sat, 23 Apr 2011 11:44:41 +0000 (11:44 +0000)]
Replace my brute-force algorithm in face_text_pos with a more complex
but faster and more mathematically sensible one.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9156 cda61777-01e9-0310-a592-d414129be87e

13 years agoStop calling face_text_pos() for faces that don't need to have text in
simon [Sat, 23 Apr 2011 11:44:41 +0000 (11:44 +0000)]
Stop calling face_text_pos() for faces that don't need to have text in
them anyway. It's slow and pointless.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9155 cda61777-01e9-0310-a592-d414129be87e

13 years agoSupport user-specified extra link flags (XLFLAGS) in the Unix
simon [Sat, 23 Apr 2011 11:37:46 +0000 (11:37 +0000)]
Support user-specified extra link flags (XLFLAGS) in the Unix
makefile. Makes it easy to recompile for things like profiling.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9154 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix mismatch between printf format strings and arguments in some
simon [Mon, 11 Apr 2011 17:32:44 +0000 (17:32 +0000)]
Fix mismatch between printf format strings and arguments in some
solosolver verbose diagnostics in X mode. Also added gcc-specific
prototypes with __attribute__((format)) to ensure they all get checked
in future.

Spotted by Arun Giridhar; segfault without this fix is reproducible by
'solosolver -v 3x3x:7_9e4_1c7d3e3d1b2_4e2c6e5_6b1d8e5d9c8_2e9_5'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9151 cda61777-01e9-0310-a592-d414129be87e

13 years agoRemove a stray diagnostic.
simon [Tue, 5 Apr 2011 18:05:57 +0000 (18:05 +0000)]
Remove a stray diagnostic.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9147 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix an amusing cut-and-paste error in the Java drawing code which was
simon [Tue, 5 Apr 2011 18:05:57 +0000 (18:05 +0000)]
Fix an amusing cut-and-paste error in the Java drawing code which was
causing complete mis-draws - but only when the window was exactly the
right size!

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9146 cda61777-01e9-0310-a592-d414129be87e

13 years agoAdjust the yellow used for LINE_UNKNOWN so that it's always a bit
simon [Tue, 5 Apr 2011 17:45:48 +0000 (17:45 +0000)]
Adjust the yellow used for LINE_UNKNOWN so that it's always a bit
darker than the background, because the Java front end demonstrates
that it's a bit eyewatering when it _matches_ the background.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9145 cda61777-01e9-0310-a592-d414129be87e

13 years agoTrivial markup fix.
simon [Sun, 3 Apr 2011 09:16:08 +0000 (09:16 +0000)]
Trivial markup fix.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9144 cda61777-01e9-0310-a592-d414129be87e

13 years agoAdd a new deduction to Easy level, which is as small as I can make it
simon [Sun, 3 Apr 2011 07:59:35 +0000 (07:59 +0000)]
Add a new deduction to Easy level, which is as small as I can make it
to have the effect of enabling large Easy-level grids to be
constructed in all grid types. Without this, some generations at Easy
level (e.g. 'loopy --generate 1 7x7t9de') can spin forever because
_even with all clues filled in_ the generated grids can't be solved at
that level.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9143 cda61777-01e9-0310-a592-d414129be87e

13 years agoMove up midend_is_solved() in the developer docs from subheading to
simon [Sun, 3 Apr 2011 07:55:18 +0000 (07:55 +0000)]
Move up midend_is_solved() in the developer docs from subheading to
heading level. It's _almost_ apt to have it as a subheading of
midend_solve(), but not quite, and it certainly wasn't intentional - I
must have absentmindedly typed the wrong Halibut command letter.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9142 cda61777-01e9-0310-a592-d414129be87e

13 years agoAdd a function to every game backend which indicates whether a game
simon [Sat, 2 Apr 2011 16:19:12 +0000 (16:19 +0000)]
Add a function to every game backend which indicates whether a game
state is in a solved position, and a midend function wrapping it.

(Or, at least, a situation in which further play is pointless. The
point is, given that game state, would it be a good idea for a front
end that does that sort of thing to proactively provide the option to
start a fresh game?)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9140 cda61777-01e9-0310-a592-d414129be87e

13 years agoAdd functions provided by the midend to tell a front end whether GUI
simon [Sat, 2 Apr 2011 15:36:30 +0000 (15:36 +0000)]
Add functions provided by the midend to tell a front end whether GUI
buttons for undo and redo should currently be greyed out.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9139 cda61777-01e9-0310-a592-d414129be87e

13 years agoRework the Loopy grid drawing algorithm so that it doesn't assume when
simon [Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)]
Rework the Loopy grid drawing algorithm so that it doesn't assume when
it clears a clipping region that it knows what features will need
redrawing in that region. Instead, I've moved all the clip/unclip/draw
functionality out into a game_redraw_in_rect() function which checks
_everything_ on the grid to see if it lies in the region.

As far as I can tell the effect only shows up in grid types that
aren't checked in, but it makes the code look nicer too.

(It would be nicer still to avoid the brute-force loop over the whole
grid checking it against the bounding box, particularly when we're
drawing in multiple bounding boxes. But this will do for the moment.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9138 cda61777-01e9-0310-a592-d414129be87e

13 years agoImprove the algorithm for figuring out where the number should be
simon [Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)]
Improve the algorithm for figuring out where the number should be
drawn in a face: averaging the vertex positions works fine for regular
or roughly regular convex polygons, but it'll start being a pain for
odder or concave ones.

This is a kludgey brute-force algorithm; I have ideas about more
elegant ways of doing this job, but they're more fiddly, so I thought
I'd start with something that basically worked.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9137 cda61777-01e9-0310-a592-d414129be87e

13 years agoWhen a lot of edges meet the same point - and, in particular, when
simon [Sat, 2 Apr 2011 13:15:56 +0000 (13:15 +0000)]
When a lot of edges meet the same point - and, in particular, when
they meet at sharp enough angles that the thick lines overlap
noticeably outside the circle of the point - redrawing the edges in a
different order each time looks ugly. Arrange to always redraw edges
in order of colour, so that empty lines are drawn before indeterminate
lines which in turn come before filled-in lines.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9136 cda61777-01e9-0310-a592-d414129be87e

13 years agoAnother patch from Chris Moore implementing two more grid types, both
simon [Thu, 24 Feb 2011 19:06:49 +0000 (19:06 +0000)]
Another patch from Chris Moore implementing two more grid types, both
involving dodecagons.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9109 cda61777-01e9-0310-a592-d414129be87e

13 years agoRetire the 'middle_face' field in 'struct grid', together with the
simon [Thu, 24 Feb 2011 19:06:48 +0000 (19:06 +0000)]
Retire the 'middle_face' field in 'struct grid', together with the
overly complicated algorithm that uses it to home in on the grid edge
closest to a mouse click. That algorithm is being stressed beyond its
limit by the new grid type, and it's unnecessary anyway given that no
sensibly sized puzzle grid is going to be big enough to make it
prohibitively expensive just to do the trivial approach of iterating
over all edges and finding the closest of the eligible ones.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9108 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Chris Moore to implement an extra grid type, the 'floret'
simon [Wed, 23 Feb 2011 20:05:42 +0000 (20:05 +0000)]
Patch from Chris Moore to implement an extra grid type, the 'floret'
pentagonal tiling.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9107 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Chris Moore to improve the generality of
simon [Wed, 23 Feb 2011 20:05:40 +0000 (20:05 +0000)]
Patch from Chris Moore to improve the generality of
grid_nearest_edge(), by having it search harder for a better dot to
move to in the first loop.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9106 cda61777-01e9-0310-a592-d414129be87e

13 years agoAnother UI feature for Group: now you can click between two legend
simon [Tue, 8 Feb 2011 22:13:18 +0000 (22:13 +0000)]
Another UI feature for Group: now you can click between two legend
elements to toggle thick lines in the grid. Helps to delineate
subgroups and cosets, so it's easier to remember what you can
legitimately fill in by associativity.

(I should really stop fiddling with this game's UI; it's far too silly.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9084 cda61777-01e9-0310-a592-d414129be87e

13 years agoThe printing function in Bridges was unable to cope with more than two
simon [Thu, 3 Feb 2011 19:49:19 +0000 (19:49 +0000)]
The printing function in Bridges was unable to cope with more than two
bridges between a pair of islands! Good grief. How did we never spot
that before?

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9083 cda61777-01e9-0310-a592-d414129be87e

13 years agoFix error highlighting after table rearrangement.
simon [Sun, 9 Jan 2011 11:30:09 +0000 (11:30 +0000)]
Fix error highlighting after table rearrangement.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9076 cda61777-01e9-0310-a592-d414129be87e

13 years agoAdd the ability to reorder the rows and columns in Group. It becomes
simon [Sat, 8 Jan 2011 15:53:25 +0000 (15:53 +0000)]
Add the ability to reorder the rows and columns in Group. It becomes
much easier to keep track of things if, once you've identified a
cyclic subgroup, you can move it into a contiguous correctly ordered
block.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9075 cda61777-01e9-0310-a592-d414129be87e

13 years agoIntroduce a mechanism in Buildscr for optionally building some of the
simon [Thu, 6 Jan 2011 18:37:05 +0000 (18:37 +0000)]
Introduce a mechanism in Buildscr for optionally building some of the
(more finished) puzzles in 'unfinished', as Java applets only. (The
rationale being: puzzles in 'unfinished' can be played locally by
people who go to the extra effort of downloading and building the
source, but to play them in Java is particularly inconvenient unless I
build the Java version myself. I just won't link it from the front
page.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9073 cda61777-01e9-0310-a592-d414129be87e

13 years agoAlso, it's ugly to blank out pieces of the applet window in black.
simon [Sat, 6 Nov 2010 18:14:42 +0000 (18:14 +0000)]
Also, it's ugly to blank out pieces of the applet window in black.
Use the puzzle background colour, like the GTK front end does.

(I know that renders the effect of the previous commit invisible,
but it's the principle of the thing! :-)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9023 cda61777-01e9-0310-a592-d414129be87e

13 years agoIn the Java front end, don't try to guess the puzzle rectangle's
simon [Sat, 6 Nov 2010 18:14:41 +0000 (18:14 +0000)]
In the Java front end, don't try to guess the puzzle rectangle's
width and height by assuming mirror symmetry within the containing
applet area. Instead, use the proper width and height as given back
by the C sizing function.

(In particular, this fixes a bug where the non-blanked puzzle area
appeared too tall by the height of the menu bar, probably as a
result of confusing PuzzleApplet.getHeight() with
PuzzlePanel.getHeight(). But the mirroring approach was conceptually
wrong anyway.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9022 cda61777-01e9-0310-a592-d414129be87e

13 years agoFixes to r8997: firstly, move the fix out of #ifdef CAIRO so that it
simon [Sat, 6 Nov 2010 17:47:46 +0000 (17:47 +0000)]
Fixes to r8997: firstly, move the fix out of #ifdef CAIRO so that it
applies to both drawing mechanisms, and secondly, make sure to paint
the spare pieces of window in the _puzzle's_ background colour
rather than the (sometimes slightly different) system default.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9021 cda61777-01e9-0310-a592-d414129be87e

13 years agoLiam Clarke points out that the use of the word 'radius' to describe
simon [Fri, 1 Oct 2010 11:46:32 +0000 (11:46 +0000)]
Liam Clarke points out that the use of the word 'radius' to describe
the size of the rotating sections in Twiddle is a misnomer, since
it's actually measuring something more like the diameter of the
section. Replace the word throughout with 'rotating block size' or
similar.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9013 cda61777-01e9-0310-a592-d414129be87e

13 years agoMemory leak fixes from Jonas Koelker.
simon [Mon, 20 Sep 2010 10:36:44 +0000 (10:36 +0000)]
Memory leak fixes from Jonas Koelker.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9001 cda61777-01e9-0310-a592-d414129be87e

13 years agoJonas Koelker reports that using the version of GTK currently in
simon [Tue, 14 Sep 2010 10:55:06 +0000 (10:55 +0000)]
Jonas Koelker reports that using the version of GTK currently in
Debian sid (2.20.1), there's a redraw problem when the window has a
different aspect ratio from the puzzle (due to resizing or
maximising): pieces of the window outside the real puzzle rectangle
don't get redrawn when exposed (e.g. by the drop-down menus).

Introduced code to explicitly redraw the whole exposed area,
including the parts that fall outside the pixmap. This makes the
problem go away in my hasty test install of sid, and doesn't seem to
affect the build on lenny.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8997 cda61777-01e9-0310-a592-d414129be87e

13 years agoNew puzzle from Jonas Koelker: 'Range', an implementation of the
simon [Tue, 14 Sep 2010 09:31:52 +0000 (09:31 +0000)]
New puzzle from Jonas Koelker: 'Range', an implementation of the
puzzle variously known (depending on which website you look at) as
Kurodoko, Kuromasu or 'Where is Black Cells'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8996 cda61777-01e9-0310-a592-d414129be87e

13 years agoUpdate ignore properties on the unfinished subdir.
simon [Tue, 14 Sep 2010 09:30:39 +0000 (09:30 +0000)]
Update ignore properties on the unfinished subdir.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8995 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Jonas Koelker to fix a double free in magnetssolver.
simon [Sun, 4 Jul 2010 22:57:05 +0000 (22:57 +0000)]
Patch from Jonas Koelker to fix a double free in magnetssolver.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8972 cda61777-01e9-0310-a592-d414129be87e

13 years agoSome minor fixes to the unfinished Pearl solver:
simon [Sun, 27 Jun 2010 11:17:27 +0000 (11:17 +0000)]
Some minor fixes to the unfinished Pearl solver:
 - move critical correctness checks out of diagnostic ifdefs (ahem)
 - move declarations to before conditionally compiled code (we don't
   build in C99 mode round here)
 - tidy up an unsightly blank line while I'm here.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8969 cda61777-01e9-0310-a592-d414129be87e

13 years agoSome kernels don't like my #! line. Move the -w into a 'use
simon [Sun, 30 May 2010 22:48:31 +0000 (22:48 +0000)]
Some kernels don't like my #! line. Move the -w into a 'use
warnings;' to make it simpler.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8966 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to add documentation of the new
simon [Sat, 29 May 2010 15:43:52 +0000 (15:43 +0000)]
Patch from Mark Wooding to add documentation of the new
draw_thick_line function, and also add some general thoughts on how
to draw puzzles' windows in an antialiasing-friendly way.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8965 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to add antialiasing-safety in repeated
simon [Sat, 29 May 2010 15:43:50 +0000 (15:43 +0000)]
Patch from Mark Wooding to add antialiasing-safety in repeated
redrawing of inequality signs in Unequal (which are redrawn when
they change colour).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8964 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to reorganise Loopy's redraw function to be
simon [Sat, 29 May 2010 15:43:48 +0000 (15:43 +0000)]
Patch from Mark Wooding to reorganise Loopy's redraw function to be
properly antialiasing-safe: all redraws are now done by clearing a
rectangle of the image, clipping to that rectangle, and redrawing
everything in it exactly once.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8963 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to introduce a draw_thick_line() function in
simon [Sat, 29 May 2010 15:43:46 +0000 (15:43 +0000)]
Patch from Mark Wooding to introduce a draw_thick_line() function in
the drawing API, for use by Loopy. It's optional: drawing.c will
construct an acceptable alternative using a filled polygon if the
front end doesn't provide it.

Net and Netslide previously had static functions called
draw_thick_line(), whose claim to the name is less justified and so
they've been renamed.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8962 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to (optionally at compile time) use the
simon [Sat, 29 May 2010 15:43:42 +0000 (15:43 +0000)]
Patch from Mark Wooding to (optionally at compile time) use the
Cairo rendering library in place of GDK, which provides pretty
antialiased graphics much like we get on MacOS. Inertia and Untangle
are perhaps the two games most obviously improved by this.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8961 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to disable GTK's internal double buffering,
simon [Sat, 29 May 2010 15:43:41 +0000 (15:43 +0000)]
Patch from Mark Wooding to disable GTK's internal double buffering,
which I didn't know about, but which is clearly a waste of effort
since we keep our own backing pixmap for the puzzle window.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8960 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Mark Wooding to use GTK stock items for standard 'OK',
simon [Sat, 29 May 2010 15:43:40 +0000 (15:43 +0000)]
Patch from Mark Wooding to use GTK stock items for standard 'OK',
'Yes' and 'No' buttons, which means they get the standard icons that
go on those button types. Also reorders yes/no boxes so that they're
the GNOME standard way round.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8959 cda61777-01e9-0310-a592-d414129be87e

13 years agoMake mkfiles.pl clean under 'perl -w'. Fixes one minor bug in the
simon [Sat, 29 May 2010 13:44:12 +0000 (13:44 +0000)]
Make mkfiles.pl clean under 'perl -w'. Fixes one minor bug in the
output (a comment from Recipe mistakenly got into the Unix
makefile); more importantly, lets mkfiles.pl run in up-to-date Perls
(where implicit split to @_ is now obsolete).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8957 cda61777-01e9-0310-a592-d414129be87e

13 years agoPatch from Ben Hutchings to fix an error-checking goof: Keen
simon [Sun, 16 May 2010 06:58:09 +0000 (06:58 +0000)]
Patch from Ben Hutchings to fix an error-checking goof: Keen
division clues were failing to light up as erroneous if the quotient
of the numbers in them came out right under rounded-down C integer
division (e.g. 2 and 5 would be accepted for a 2/ clue). Apparently
I copied the code that invents clues in the generator straight into
the solution checker, without remembering that the generator was
allowed to do it that way because exact divisibility had been
checked elsewhere.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8951 cda61777-01e9-0310-a592-d414129be87e

14 years agoA user points out that Signpost doesn't in fact use the numeric
simon [Sun, 9 May 2010 07:22:16 +0000 (07:22 +0000)]
A user points out that Signpost doesn't in fact use the numeric
keypad, so it shouldn't have the REQUIRE_NUMPAD flag.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8939 cda61777-01e9-0310-a592-d414129be87e

14 years agoFix a build-breaking bug I introduced to the OS X makefile in r8931.
simon [Mon, 26 Apr 2010 17:26:38 +0000 (17:26 +0000)]
Fix a build-breaking bug I introduced to the OS X makefile in r8931.
(Missed off the explicit -o from the compile lines constructing
version.{i386,ppc}.o, causing both to be compiled as version.o and
dependent build steps to fail.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8933 cda61777-01e9-0310-a592-d414129be87e

14 years agoAdd version2.def to the list of svn:ignored files.
simon [Sun, 25 Apr 2010 14:57:43 +0000 (14:57 +0000)]
Add version2.def to the list of svn:ignored files.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8932 cda61777-01e9-0310-a592-d414129be87e

14 years agoModification of a patch from Debian: eliminate the endless rebuilds
simon [Sun, 25 Apr 2010 14:57:21 +0000 (14:57 +0000)]
Modification of a patch from Debian: eliminate the endless rebuilds
of basically unchanged binaries due to the compulsory rebuild of
version.o. version.o now depends normally on version2.def, which is
constructed using much the same if statements that version.o used to
use, except that it's not overwritten at all if its contents don't
need to change.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8931 cda61777-01e9-0310-a592-d414129be87e

14 years agoPatch idea from Debian, but modified considerably in implementation:
simon [Sun, 25 Apr 2010 14:57:20 +0000 (14:57 +0000)]
Patch idea from Debian, but modified considerably in implementation:
introduce a new colour in Slant (COL_FILLEDSQUARE) which is used for
the background of any grid square that has a diagonal line in it.
This makes it easier to spot the one square on a giant board you
forgot to fill in, but on the other hand I found it to look very
strange and disconcerting. So I've set the colour to be identical to
COL_BACKGROUND by default, and users who like the idea can enable it
by environment variable or by local patch.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8930 cda61777-01e9-0310-a592-d414129be87e

14 years agoPatch from Debian, to bring the use of the X selection/clipboard in
simon [Sun, 25 Apr 2010 14:57:19 +0000 (14:57 +0000)]
Patch from Debian, to bring the use of the X selection/clipboard in
line with freedesktop.org. (This is relatively simple for Puzzles,
since it only writes to the clipboard and never reads it, so the
question of which selection to use when is most easily dealt with by
always writing to both.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8929 cda61777-01e9-0310-a592-d414129be87e

14 years agoWording tweaks inspired by (but not the same as) some in a Debian
simon [Sun, 18 Apr 2010 15:07:54 +0000 (15:07 +0000)]
Wording tweaks inspired by (but not the same as) some in a Debian
downstream patch.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8924 cda61777-01e9-0310-a592-d414129be87e

14 years agoPatch from Ben Hutchings: explicitly initialise something which some
simon [Sun, 18 Apr 2010 15:07:52 +0000 (15:07 +0000)]
Patch from Ben Hutchings: explicitly initialise something which some
gccs complained about.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8923 cda61777-01e9-0310-a592-d414129be87e

14 years agoFix incorrect uses of ctype.h (passing it uncast chars, or other
simon [Sat, 17 Apr 2010 13:27:15 +0000 (13:27 +0000)]
Fix incorrect uses of ctype.h (passing it uncast chars, or other
things potentially not in the range 0..255).

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8922 cda61777-01e9-0310-a592-d414129be87e

14 years agoFix from James H for an assertion failure during Signpost
simon [Sat, 17 Apr 2010 13:27:12 +0000 (13:27 +0000)]
Fix from James H for an assertion failure during Signpost
generation. To reproduce, try 'signpost --generate 1 7x7#12345-162'.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8921 cda61777-01e9-0310-a592-d414129be87e