?? msd.c
字號(hào):
#include <stdlib.h>#include <stdio.h>#include "ic.h"#include "megaco_session.h"#define INBUFSZ 2048#define OUTBUFSZ 2048static ___map___* InitSwitch();int main(int args, char** argv) { FILE* fd; int i,j; ___map___* map; CORBA_Environment* senvP; CORBA_Environment* renvP; senvP = CORBA_Environment_alloc(INBUFSZ, OUTBUFSZ); renvP = CORBA_Environment_alloc(INBUFSZ, OUTBUFSZ); map = InitSwitch(); printf("starting\n"); if ((fd = fopen("msg.txt", "r")) == NULL) { fprintf(stderr, "failed opening message file\n"); exit(EXIT_FAILURE); } for (i = 0; fscanf(fd, "%02x", &j) != EOF; i++) { senvP->_inbuf[i] = (char)j; } senvP->_inbufsz = i; for (; i < senvP->_inbufsz ; i++) senvP->_inbuf[i] = 0; printf("message read\n"); ___switch___(renvP, senvP, map); printf("done\n"); exit(EXIT_SUCCESS);}static ___map___* InitSwitch() { ___map___ marray[3] = { ___Megaco_SessionUser_map___, ___MegacoSessionTcpUser_map___, ___MegacoSessionUdpUser_map___ }; return ___merge___(marray,3);}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -