comparison src/nbdebug.h @ 18753:6e3dc2d630c2 v8.1.2366

patch 8.1.2366: using old C style comments Commit: https://github.com/vim/vim/commit/9bf703d46a79fbffeb829246ea5ce385bddc4166 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 30 19:44:38 2019 +0100 patch 8.1.2366: using old C style comments Problem: Using old C style comments. Solution: Use // comments where appropriate.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Nov 2019 19:45:03 +0100
parents c7ba5fed403c
children 038eb6d9003a
comparison
equal deleted inserted replaced
18752:9ec3c9cb4533 18753:6e3dc2d630c2
11 #ifndef NBDEBUG_H 11 #ifndef NBDEBUG_H
12 #define NBDEBUG_H 12 #define NBDEBUG_H
13 13
14 #ifdef NBDEBUG 14 #ifdef NBDEBUG
15 15
16 #ifndef ASSERT 16 # ifndef ASSERT
17 #define ASSERT(c) \ 17 # define ASSERT(c) \
18 if (!(c)) { \ 18 if (!(c)) { \
19 fprintf(stderr, "Assertion failed: line %d, file %s\n", \ 19 fprintf(stderr, "Assertion failed: line %d, file %s\n", \
20 __LINE__, __FILE__); \ 20 __LINE__, __FILE__); \
21 fflush(stderr); \ 21 fflush(stderr); \
22 abort(); \ 22 abort(); \
23 } 23 }
24 #endif 24 # endif
25 25
26 #define nbdebug(a) nbdbg a 26 # define nbdebug(a) nbdbg a
27 27
28 #define NB_TRACE 0x00000001 28 # define NB_TRACE 0x00000001
29 #define NB_TRACE_VERBOSE 0x00000002 29 # define NB_TRACE_VERBOSE 0x00000002
30 #define NB_TRACE_COLONCMD 0x00000004 30 # define NB_TRACE_COLONCMD 0x00000004
31 #define NB_PRINT 0x00000008 31 # define NB_PRINT 0x00000008
32 #define NB_DEBUG_ALL 0xffffffff 32 # define NB_DEBUG_ALL 0xffffffff
33 33
34 #define NBDLEVEL(flags) (nb_debug != NULL && (nb_dlevel & (flags))) 34 # define NBDLEVEL(flags) (nb_debug != NULL && (nb_dlevel & (flags)))
35 35
36 #define NBDEBUG_TRACE 1 36 # define NBDEBUG_TRACE 1
37 37
38 typedef enum { 38 typedef enum {
39 WT_ENV = 1, /* look for env var if set */ 39 WT_ENV = 1, // look for env var if set
40 WT_WAIT, /* look for ~/.gvimwait if set */ 40 WT_WAIT, // look for ~/.gvimwait if set
41 WT_STOP /* look for ~/.gvimstop if set */ 41 WT_STOP // look for ~/.gvimstop if set
42 } WtWait; 42 } WtWait;
43 43
44 44
45 void nbdbg(char *, ...) 45 void nbdbg(char *, ...)
46 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE 46 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
47 __attribute__((format(printf, 1, 2))) 47 __attribute__((format(printf, 1, 2)))
48 #endif 48 # endif
49 ; 49 ;
50 50
51 void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs); 51 void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
52 void nbdebug_log_init(char *log_var, char *level_var); 52 void nbdebug_log_init(char *log_var, char *level_var);
53 53
54 extern FILE *nb_debug; 54 extern FILE *nb_debug;
55 extern u_int nb_dlevel; /* nb_debug verbosity level */ 55 extern u_int nb_dlevel; // nb_debug verbosity level
56 56
57 # else /* not NBDEBUG */ 57 #else // not NBDEBUG
58 58
59 #ifndef ASSERT 59 # ifndef ASSERT
60 # define ASSERT(c) 60 # define ASSERT(c)
61 #endif 61 # endif
62 62
63 /* 63 /*
64 * The following 3 stubs are needed because a macro cannot be used because of 64 * The following 3 stubs are needed because a macro cannot be used because of
65 * the variable number of arguments. 65 * the variable number of arguments.
66 */ 66 */
70 char *fmt, 70 char *fmt,
71 ...) 71 ...)
72 { 72 {
73 } 73 }
74 74
75 #endif /* NBDEBUG */ 75 #endif // NBDEBUG
76 #endif /* NBDEBUG_H */ 76 #endif // NBDEBUG_H