📄 call.c
字号:
/************************************************************* * File: mon/call.c * Purpose: Part of core Monitor * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 970304 Start of revision history */#include <mon.h>Optdesc call_opts[] = { {"addr [-s str|val]..","call function"}, {"addr","address of function"}, {"-s str","pass address of string"}, {"val","pass value"}, {0}};/************************************************************** call(ac,av)* the call command */call(ac,av)int ac;char *av[];{int i,j,k;char *arg[10];arg[0] = 0;k = 0;for (i=1;i<ac;i++) { if (av[i][0] == '-') { j = 1; while (av[i][j] != 0) { if (av[i][j] == 's') { i++; if (i >= ac) printf("bad arg count\n"); else arg[k++] = av[i]; break; } else printf("%c: unknown option\n",av[i][j]); j++; } } else { if (!get_rsa(&arg[k],av[i])) return; k++; } }if (arg[0] != 0) (((Func *)arg[0]))(arg[1],arg[2],arg[3],arg[4],arg[5]);else printf("Function address not specified\n");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -