chiark / gitweb /
New name UI_UPDATE for interpret_move's return "".
authorSimon Tatham <anakin@pobox.com>
Sun, 1 Oct 2017 11:52:12 +0000 (12:52 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 1 Oct 2017 14:18:14 +0000 (15:18 +0100)
commiteeb2db283de9115f7256fa4cc49597d63e06b0ab
tree48de59795d6a338ef56c5a0f1e1247478c6ad6b9
parentedcf839d4c557c3993d681665829390697353344
New name UI_UPDATE for interpret_move's return "".

Now midend.c directly tests the returned pointer for equality to this
value, instead of checking whether it's the empty string.

A minor effect of this is that games may now return a dynamically
allocated empty string from interpret_move() and treat it as just
another legal move description. But I don't expect anyone to be
perverse enough to actually do that! The main purpose is that it
avoids returning a string literal from a function whose return type is
a pointer to _non-const_ char, i.e. we are now one step closer to
being able to make this code base clean under -Wwrite-strings.
41 files changed:
blackbox.c
bridges.c
devel.but
dominosa.c
filling.c
flip.c
flood.c
galaxies.c
guess.c
keen.c
lightup.c
magnets.c
map.c
midend.c
mines.c
misc.c
net.c
netslide.c
palisade.c
pattern.c
pearl.c
pegs.c
puzzles.h
range.c
rect.c
samegame.c
signpost.c
singles.c
sixteen.c
slant.c
solo.c
tents.c
towers.c
tracks.c
twiddle.c
undead.c
unequal.c
unfinished/group.c
unfinished/slide.c
unruly.c
untangle.c