Mercurial > vim
annotate src/nbdebug.h @ 9758:5534cfa2ec87 v7.4.2154
commit https://github.com/vim/vim/commit/fe9489233c463dd87046df3fd95332e47b66e93c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 4 21:11:32 2016 +0200
patch 7.4.2154
Problem: Test_communicate() fails sometimes.
Solution: Add it to the flaky tests.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 04 Aug 2016 21:15:04 +0200 |
parents | 1a5d34492798 |
children | 4aead6a9b7a9 |
rev | line source |
---|---|
7 | 1 /* vi:set ts=8 sts=8 sw=8: |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * Visual Workshop integration by Gordon Prieur | |
5 * | |
6 * Do ":help uganda" in Vim to read copying and usage conditions. | |
7 * Do ":help credits" in Vim to see a list of people who contributed. | |
8 */ | |
9 | |
10 | |
11 #ifndef NBDEBUG_H | |
12 #define NBDEBUG_H | |
13 | |
14 #ifdef NBDEBUG | |
15 | |
16 #ifndef ASSERT | |
17 #define ASSERT(c) \ | |
18 if (!(c)) { \ | |
19 fprintf(stderr, "Assertion failed: line %d, file %s\n", \ | |
20 __LINE__, __FILE__); \ | |
21 fflush(stderr); \ | |
22 abort(); \ | |
23 } | |
24 #endif | |
25 | |
1624 | 26 #define nbdebug(a) nbdbg a |
7 | 27 |
28 #define NB_TRACE 0x00000001 | |
29 #define NB_TRACE_VERBOSE 0x00000002 | |
30 #define NB_TRACE_COLONCMD 0x00000004 | |
33 | 31 #define NB_PRINT 0x00000008 |
7 | 32 #define NB_DEBUG_ALL 0xffffffff |
33 | |
34 #define NBDLEVEL(flags) (nb_debug != NULL && (nb_dlevel & (flags))) | |
35 | |
36 #define NBDEBUG_TRACE 1 | |
37 | |
38 typedef enum { | |
39 WT_ENV = 1, /* look for env var if set */ | |
40 WT_WAIT, /* look for ~/.gvimwait if set */ | |
41 WT_STOP /* look for ~/.gvimstop if set */ | |
42 } WtWait; | |
43 | |
44 | |
45 void nbdbg(char *, ...); | |
46 | |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
1817
diff
changeset
|
47 void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs); |
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
1817
diff
changeset
|
48 void nbdebug_log_init(char *log_var, char *level_var); |
7 | 49 |
50 extern FILE *nb_debug; | |
51 extern u_int nb_dlevel; /* nb_debug verbosity level */ | |
52 | |
53 # else /* not NBDEBUG */ | |
54 | |
55 #ifndef ASSERT | |
56 # define ASSERT(c) | |
57 #endif | |
58 | |
59 /* | |
33 | 60 * The following 3 stubs are needed because a macro cannot be used because of |
7 | 61 * the variable number of arguments. |
62 */ | |
63 | |
64 void | |
65 nbdbg( | |
66 char *fmt, | |
67 ...) | |
68 { | |
69 } | |
70 | |
71 #endif /* NBDEBUG */ | |
72 #endif /* NBDEBUG_H */ |