remove debug code from client and library
This commit is contained in:
parent
08d1fcc15d
commit
6eff70d415
@ -25,7 +25,11 @@
|
||||
#include <dc/refable.h>
|
||||
#include <dc/account.h>
|
||||
|
||||
#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)
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user