aboutsummaryrefslogtreecommitdiffstats
path: root/src/radharc.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2016-01-04 04:01:22 +0100
committerMattias Andrée <maandree@member.fsf.org>2016-01-04 04:01:26 +0100
commit99efede3347745046a8b92bef784c2e3fe0fe5fa (patch)
treef9caae8375944c38a2ce1f965c3cff24b447d183 /src/radharc.c
parentautomatic selection of RADHARC_STATE (diff)
downloadradharc-99efede3347745046a8b92bef784c2e3fe0fe5fa.tar.gz
radharc-99efede3347745046a8b92bef784c2e3fe0fe5fa.tar.bz2
radharc-99efede3347745046a8b92bef784c2e3fe0fe5fa.tar.xz
...
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/radharc.c')
-rw-r--r--src/radharc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/radharc.c b/src/radharc.c
index 48538d9..86f21df 100644
--- a/src/radharc.c
+++ b/src/radharc.c
@@ -14,11 +14,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "settings.h"
+#include "state.h"
#include "haiku.h"
#include <stdio.h>
#include <stdlib.h>
+#define t(...) do { if (__VA_ARGS__) goto fail; } while (0)
/**
@@ -59,7 +60,13 @@ main(int argc, char *argv[])
check_timetravel(*argv);
parse_command_line(argc, argv, &settings);
+ argv0 = argv0 ? argv0 : "radharc";
+ t (get_state_pathname(&settings));
return 0;
+
+fail:
+ haiku(argv0);
+ return 1;
}