From 6cb43717cbbe8380d2aeb382d2b6f350bab74494 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 8 Nov 2018 16:40:47 +0100 Subject: Improve loggers --- main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index d62615a..6a7e327 100644 --- a/main.c +++ b/main.c @@ -50,6 +50,7 @@ extern int firstSMSIndex; extern int canAugment; extern int showName; +#define DEBUG void fail_exit(const char *msg) { @@ -61,6 +62,10 @@ void fail_exit(const char *msg) { int main(int argc, char* argv[]){ +#ifdef DEBUG + freopen("/tmp/mesms.debug", "w", stderr); +#endif + /* Gestion des paramètres */ while (1) { int c; @@ -129,6 +134,7 @@ int main(int argc, char* argv[]){ } + fprintf(stderr, "test"); /* Initialisation */ @@ -162,14 +168,17 @@ int main(int argc, char* argv[]){ int r = 0; + fprintf(stderr, "test1"); if( r = fillContactList(DEFAULT_CONTACT_FILENAME) ) { return r; } if( r = loadConv() ) { return r; } + fprintf(stderr, "test2"); sortContacts(); + fprintf(stderr, "test3"); for(int i = 0 ; i < 9 ; i++) { init_pair( i+1, i, COLOR_BLACK); -- cgit v1.2.3