Mercurial > hg > early-roguelike
comparison srogue/save.c @ 119:458df24e973d
srogue: use functions from mdport.c.
Shell escape, passwd entries, terminal settings, and most signal
handling is now done with the more portable md_* functions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 30 Apr 2014 14:46:30 -0700 |
parents | f0073eb75a6a |
children | d6b7c3fb37ea |
comparison
equal
deleted
inserted
replaced
118:8d1dfc5a912c | 119:458df24e973d |
---|---|
40 * ignore: | 40 * ignore: |
41 * Ignore ALL signals possible | 41 * Ignore ALL signals possible |
42 */ | 42 */ |
43 ignore() | 43 ignore() |
44 { | 44 { |
45 int i; | 45 md_ignoreallsignals(); |
46 | |
47 for (i = 0; i < NSIG; i++) | |
48 signal(i, SIG_IGN); | |
49 } | 46 } |
50 | 47 |
51 /* | 48 /* |
52 * save_game: | 49 * save_game: |
53 * Save the current game | 50 * Save the current game |
189 encwrite(&slines,sizeof(slines),savef); | 186 encwrite(&slines,sizeof(slines),savef); |
190 encwrite(&scols,sizeof(scols),savef); | 187 encwrite(&scols,sizeof(scols),savef); |
191 msg(""); | 188 msg(""); |
192 rs_save_file(savef); | 189 rs_save_file(savef); |
193 close(fnum); | 190 close(fnum); |
194 signal(SIGINT, byebye); | 191 md_onsignal_exit(); |
195 signal(SIGQUIT, byebye); | |
196 wclear(cw); | 192 wclear(cw); |
197 draw(cw); | 193 draw(cw); |
198 } | 194 } |
199 | 195 |
200 /* | 196 /* |