diff --git a/libdc/src/internal.h b/libdc/src/internal.h index 620a290..bc9ef29 100644 --- a/libdc/src/internal.h +++ b/libdc/src/internal.h @@ -25,7 +25,11 @@ #include #include -#define DEBUG +/* For internal debugging only. Please note that the client will then begin to + * write text files everywhere filled with all sorts of private information. Use + * with caution. + */ +/*#define DEBUG*/ #define return_if_true(v,r) do { if (v) return r; } while(0) #define goto_if_true(v,l) do { if (v) goto l; } while(0) diff --git a/libdc/src/session.c b/libdc/src/session.c index 36394c4..a467435 100644 --- a/libdc/src/session.c +++ b/libdc/src/session.c @@ -182,12 +182,14 @@ static void dc_session_handler(dc_gateway_t gw, dc_event_t e, void *p) h(s, e); } +#ifdef DEBUG char *str = NULL; str = json_dumps(dc_event_payload(e), 0); FILE *f = fopen("events.txt", "a+"); fprintf(f, "%s: %s\n", dc_event_type(e), str); free(str); fclose(f); +#endif } dc_session_t dc_session_new(dc_loop_t loop) diff --git a/ncdc/src/mainwindow.c b/ncdc/src/mainwindow.c index d50d831..778a845 100644 --- a/ncdc/src/mainwindow.c +++ b/ncdc/src/mainwindow.c @@ -382,16 +382,20 @@ void ncdc_mainwindow_input_ready(ncdc_mainwindow_t n) } keylen = wcslen(key); +#if 0 FILE *f = fopen("keys.txt", "a+"); fwprintf(f, L"KEY: %02X %ls\n", key[0], &key[1] ); fclose(f); +#endif } +#if 0 FILE *f = fopen("keys.txt", "a+"); fwprintf(f, L"%X\n", i); fclose(f); +#endif if (key != NULL && (k = ncdc_find_keybinding(keys_global, key, keylen)) != NULL) {