📄 debug.main.c
字号:
/* $Id: debug.main.c,v 1.4 2003/10/29 18:51:23 relson Exp $ *//*****************************************************************************NAME: debug.main.c - shared debug functionsAUTHOR: David Relson <relson@osagesoftware.com>******************************************************************************/#include "common.h"#include <stdlib.h>#include <string.h>typedef struct mask_char_to_symbol_s { const char *str; u_int32_t bit;} mask_char_to_symbol_t;static mask_char_to_symbol_t const char_to_symbol[] ={ { "g", BIT_GENERAL }, { "s", BIT_SPAMICITY }, { "d", BIT_DATABASE }, { "l", BIT_LEXER }, { "w", BIT_WORDLIST }};int main(void){ size_t i; for (i=0; i<sizeof(char_to_symbol)/sizeof(char_to_symbol[0]); i += 1) { const mask_char_to_symbol_t *ptr = char_to_symbol + i; set_debug_mask( ptr->str ); if ( (debug_mask & ptr->bit) != ptr->bit ) { fprintf(stderr, "debug_mask for '%s' is wrong.\n", ptr->str); exit(EX_ERROR); } } printf("All O.K.\n"); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -