cliargs.c

来自「unix环境编程」· C语言 代码 · 共 19 行

C
19
字号
#include	"opend.h"/* * This function is called by buf_args(), which is called by * request().  buf_args() has broken up the client's buffer * into an argv[]-style array, which we now process. */intcli_args(int argc, char **argv){	if (argc != 3 || strcmp(argv[0], CL_OPEN) != 0) {		strcpy(errmsg, "usage: <pathname> <oflag>\n");		return(-1);	}	pathname = argv[1];		/* save ptr to pathname to open */	oflag = atoi(argv[2]);	return(0);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?