📄 proto.cpp
字号:
#include "proto.h"
#include "ctt_proto.h"
#include "stt_proto.h"
#include "ttg_proto.h"
//parsers
TParsersMap ctt_parse_funcs;
TParsersMap stt_parse_funcs;
int register_parser(int dir, int where, WORD pc_id, ParserFuncT parse_func)
{
MyAssert( ! ((pc_id<0) || (pc_id>MAX_PACKET_DB)),
"register_parser: wrong `pc_id` parameter", 0
);
TParsersMap * parse_funcs;
if(dir == DIR_CTT)
parse_funcs = &ctt_parse_funcs;
else
if(dir == DIR_STT)
parse_funcs = &stt_parse_funcs;
else
MyAssert(1, "register_parser: wrong `dir` parameter",0);
TParseFuncsList * plist = &((*parse_funcs)[pc_id]); // creates new elem if pc_id key doesn't exist
// TODO: 礤 镱玮铍
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -