aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--error.h4
-rw-r--r--main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/error.h b/error.h
index 50e4ebc..5923703 100644
--- a/error.h
+++ b/error.h
@@ -4,7 +4,7 @@
#include <stdlib.h>
/* Clean up and exit, printing a message */
-#define error(...) { endwin(); printf("\033[?1003l\n"); printf(__FILE__ ": %i", __LINE__); printf(": " __VA_ARGS__); exit(1); }
-#define todo() { endwin(); printf("\033[?1003l\n"); printf(__FILE__": %i: Not yet implemented\n", __LINE__); exit(1); }
+#define error(...) { endwin(); printf("\033[?1003l\n"); printf(__FILE__ ": %i", __LINE__); printf(": " __VA_ARGS__); exit(EXIT_FAILURE); }
+#define todo() { endwin(); printf("\033[?1003l\n"); printf(__FILE__": %i: Not yet implemented\n", __LINE__); exit(EXIT_FAILURE); }
#endif /* ERROR_H_ */
diff --git a/main.c b/main.c
index cb183b7..a5aaccf 100644
--- a/main.c
+++ b/main.c
@@ -28,7 +28,7 @@ void sigint_handler(int sig) {
printf("\033[?1003l\n"); /* Makes the terminal NOT report mouse movements */
endwin();
printf("Received SIGINT\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
void initialize_colors(void) {
@@ -145,7 +145,7 @@ int main(int argc, char **argv) {
if (bmp_only) {
map_to_bmp(map, width, height, start_pos, end_pos, path, visited, bmp_filename);
printf("Wrote the bmp to %s. Pathfinding took %f seconds\n", bmp_filename, path_time);
- exit(0);
+ exit(EXIT_SUCCESS);
}
/* This is useful for attaching a debugger */