show the error string in the GUI rather than stderr

This makes the error string just be an internal "membuffer", which the
GUI can fetch and show when errors occur.  The error string keeps
accumulating until somebody retrieves it with "get_error_string()".

This should make any write errors actually show up to the user.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2014-03-14 10:35:09 -07:00 committed by Dirk Hohndel
parent b5d0cfd557
commit ec33a95ad0
3 changed files with 33 additions and 9 deletions

1
dive.h
View file

@ -661,6 +661,7 @@ extern "C" {
#endif
extern int report_error(const char *fmt, ...);
extern const char *get_error_string(void);
extern struct dive *find_dive_including(timestamp_t when);
extern bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset);