diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-05-01 12:53:41 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-05-01 12:53:41 +0000 |
| commit | 791940b043d500c096a56d57467b4b68ea31ce1f (patch) | |
| tree | a8168dfaeb265abc278f9b9ff7897ecd0d911bb9 /midend.c | |
| parent | e72931bfe27e7d7303a22717cce05721551f3e4a (diff) | |
| download | puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.zip puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.gz puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.bz2 puzzles-791940b043d500c096a56d57467b4b68ea31ce1f.tar.xz | |
Introduced a new function in every game which formats a game_state
as text. This is used by front ends to implement copy-to-clipboard.
Currently the function does nothing (and is disabled) in every game
except Solo, but it's a start.
[originally from svn r5724]
Diffstat (limited to 'midend.c')
| -rw-r--r-- | midend.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -573,3 +573,11 @@ char *midend_set_config(midend_data *me, int which, config_item *cfg) return NULL; } + +char *midend_text_format(midend_data *me) +{ + if (me->ourgame->can_format_as_text && me->statepos > 0) + return me->ourgame->text_format(me->states[me->statepos-1]); + else + return NULL; +} |