亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? test.c

?? Documentation and source code Copyright (C) 1985 by Mark E. Mallett permission is granted to distr
?? C
字號:
/* The following is a test program for a subroutine set which provides
   a simple emulation of the TOPS-20 COMND JSYS for C programs.  This
   program tests some of the basic features, and illustrates how the
   subroutine package is used. */

#include "comnd.h"			/* Include interface definitions */
					/* for the COMND package */
#include "stdio.h"			/* Include standard system defn's */
#include "setjmp.h"			/* Include defn for the setjmp/longjump */
					/* facility of the C language */

/* Declare forward routines that our program uses; mainly those routines
   which are included in the command dispatch table.  Since they will be in
   the table, they must be defined. */

   int		datcmd();		/* The DATE command */
   int		exicmd();		/* The EXIT command */
   int		hlpcmd();		/* The HELP command */
   int		numcmd();		/* The NUMBER command */
   int		uicmd();		/* Unimplemented command */

/* Declare various simple variables our program uses. */


char		Atmbuf[100] = {0};	/* Atom buffer used by CSB */
jmp_buf		Topenv = {0};		/* Setjump buffer used in command
					   parsing. */
char		Txtbuf[100] = {0};	/* Text buffer used by CSB (later) */


/* Define our command table and dispatch table.  The command table is a
   table of pointers to strings; these strings do not have to be in any
   order; but remember they are printed (for help) in the order given
   here. */

/* Note that in the command table, only a few of the entries are
   reasonable.  The rest of the keywords are in the table to illustrate
   the way that keywords are matched by the COMND subroutines. */

char		*Cmdtbl[] = {		/* Command keyword table */
				"ABLE",
				"BAKER",
				"BARKER",
				"BASKET",
				"CHANCELLOR",
				"CHESTER",
				"DATE",
				"DOG",
				"EXIT",
				"HELP",
				"NUMBER",
				NULL	/* The table ends with a null */
			    };

int		(*Cmddsp[])() = {	/* Dispatch table for commands */
			uicmd,		/* ABLE */
			uicmd,		/* BAKER */
			uicmd,		/* BARKER */
			uicmd,		/* BASKET */
			uicmd,		/* CHANCELLOR */
			uicmd,		/* CHESTER */
			datcmd,		/* DATE */
			uicmd,		/* DOG */
			exicmd,		/* EXIT */
			hlpcmd,		/* HELP */
			numcmd		/* NUMBER */
				};


/* Define our Command State Block.  A program may have any number of
   these, and typically have a couple (one for main level commands and
   another for subcommands, etc.).  This program only uses one, because
   it is not very complex. */


   CSB		Topcsb = {0,		/* Flags to pass to COMND subroutine */
			  0,		/* Flags returned by COMND */
			  &Topenv,	/* Address of setjmp buffer; used in
			  		   transfering control if a reparse
					   is necessary */
			  0,		/* Input designator (ignored) */
			  0, 		/* Output designator (ignored) */
			  "TEST> ",	/* Prompt string */
			  &Txtbuf,	/* Address of text buffer */
			  100,		/* Size of text buffer (bytes) */
			  &Atmbuf,	/* Address of atom buffer */
			  100,		/* Size of atom buffer (bytes) */
			  0};		/* The rest of the block is used for
			  		   returned values and does not have
					   to be initialized here */


/* Define the various Command Function Blocks that we will use.  Each
   function block defines something to be parsed.  The first definition is
   expanded with comments; the rest are simply defined. */


   CFB		Cmdcfb = {_CMKEY,	/* Function code (_CMKEY=keyword) */
			  _CFDPP|_CFHPP, /* Flags;  _CFDPP indicates that
			  		    we've supplied a default string;
					    _CFHPP indicates that we've
					    supplied our own help text to be
					    used in addition to the standard
					    help.  _CFSDH would suppress the
					    standard help as well. */
			   0,		/* This would be an address of another
			   		   CFB to be used in satisfying the
					   parse.  No alternatives here */
			   &Cmdtbl,	/* Data for the function; addr of
			   		   keyword table, here. */
			   "Command, ",	/* Help text that we supply */
			   "BASKET"	/* Default string. */
			   };

	/* CFB for HELP... this illustrates how CFBs can be chained to give
	   alternative parse paths. */
CFB		Hlpcfb = {_CMTOK, _CFHPP|_CFSDH, &Cmdcfb, "*",
			  "\"*\" for help on all topics", 0};

	/* Initialization CFB */
CFB		Inicfb = {_CMINI, 0, 0, 0, 0, 0};

	/* CFB for guide words */
CFB		Noicfb = {_CMNOI, 0, 0, 0, 0, "guide words"};

	/* CFB for confirmation */
CFB		Cfmcfb = {_CMCFM, 0, 0, 0, 0, 0};

	/* CFB for date parse */
CFB		Datcfb = {_CMDAT, _CFDTD|_CFDTT, 0, 0, 0, 0};

	/* CFB for decimal number parse */
CFB		Numcfb = {_CMNUM, 0, 0, 10, 0, 0};
/*

*/

/* The main routine. */


main()

{
IND	int	i;			/* Scratch */
IND	char	**kptr;			/* Keyword ptr ptr */


/* Enter command loop. */

while (TRUE)
    {

/* The first part of COMND parsing is to initialize the parse.  This is
   done with a CFB with function code of _CFINI */

    COMND (&Topcsb, &Inicfb);		/* Init the parse */


/* Call setjmp to mark the point where a reparse of the command string would
   take place.  Since we've supplied this setjmp buffer address to COMND (by
   putting its address in our CSB), COMND will transfer control here whenever
   a reparse should take place.  If the setjmp mechanism is not used, the
   program must always check for a return code of _CRRPT, indicating that
   a reparse is necessary.  The setjmp mechanism is the far simpler method. */

    setjmp (Topenv);			/* Trap reparse */

/* Now parse a command keyword.  This is done by calling COMND with the
   appropriate command function block. */

    if (!COMNDi (&Topcsb, &Cmdcfb))	/* Parse a command */
	continue;			/*  continue if failed.  (see the */
					/*  routine COMNDI() below) */

/* Now determine what keyword was parsed.  The return value (in CSB_RVL of
   the command state block) is the address of the keyword table entry which
   was parsed.  Thus it is a pointer to a pointer to the keyword. */

    kptr = (char **) (Topcsb.CSB_RVL._ADR);
					/* Get the table entry address */
    i = kptr - &Cmdtbl[0];		/* Get the command table index */


/* i now has the command index; simply dispatch via the command dispatch
   table to the appropriate processing routine. */

    (*Cmddsp[i])();			/* Call the routine */

/* End of command loop. */

    }

}
/*

*/

/* datcmd - the DATE command */

datcmd ()

{
IND	int	id,it,m,d,y,mm,hh;	/* Date/time values */
IND	int	*rslptr;		/* Result pointer */

/* Issue a call to our "noise" subroutine (below) to parse guide words. */

if (!noise("is"))			/* Do guide word parse */
    return;				/* And return if it failed */

/* Parse the command argument */

if (!COMNDi(&Topcsb, &Datcfb))		/* Do COMND call and check failure */
    return;

/* Issue call to our "confrm" routine to confirm the command. */

if (!confrm())				/* Call our general confirm routine */
    return;				/* If not confirmed, just return. */


rslptr = &Atmbuf[0];
id = rslptr[0];				/* Get results */
it = rslptr[1];
cvided (id, it, &m, &d, &y, &hh, &mm);
printf ("Returned %02d/%02d/%04d %02d:%02d\n", m, d, y, hh, mm);

}
/*

*/

/* exicmd - the EXIT command */

exicmd ()

{
/* Issue a call to our "noise" subroutine (below) to parse guide words. */

if (!noise("program"))			/* Do guide word parse */
    return;				/* And return if it failed */

/* Issue call to our "confrm" routine to confirm the command. */

if (!confrm())				/* Call our general confirm routine */
    return;				/* If not confirmed, just return. */

exit();					/* Exit the program. */
}
/*

*/

/* hlpcmd - the HELP command */

/* This command illustrates how COMND is used to parse one of multiple
   choices; here we either parse the token "*" or a command keyword. */

hlpcmd ()

{
char		**kptr;			/* Points to keyword */
char		*aptr;			/* Points to argument */

/* Collect the help argument, after giving appropriate guide string */

if (!noise ("on subject"))		/* Give guide string */
    return;				/*  return if it failed */

/* Parse the command argument. */

if (!COMNDi(&Topcsb, &Hlpcfb))		/* Do COMND call and check failure */
    return;

/* Since we supplied alternate CFBs in our COMND call, we have to see which
   one matched the input, and process accordingly.  Here "process" is simply
   to set a pointer to the text we are going to say we can't give help for */

if (Topcsb.CSB_CFB == &Hlpcfb)		/* If matched our token */
    aptr = "*";				/* Set pointer to token string. */
else					/* Otherwise */
    {
    kptr = (char **) Topcsb.CSB_RVL._ADR;
					/* Get ptr to keyword pointer */
    aptr = *kptr;			/* Get addr of string */
    }

if (!confrm())				/* Call our general confirm routine */
    return;				/* If not confirmed, just return. */

/* Now we've got the keyword; this is only a test routine, show the thing
   parsed and say we can't give help for it. */

printf ("Sorry, can not give help for ");
printf (aptr);
printf ("\n");
}
/*

*/

/* numcmd - the NUMBER command */

numcmd ()

{
IND	int	num;			/* Number */

if (!noise ("to print"))		/* Get/give guide string */
    return;				/* Return if invalid */

if (!COMNDi (&Topcsb, &Numcfb))		/* If not ok */
    return;

/* Extract the number from the returned value field in the CSB; then go
   on to confirm the command. */

num = Topcsb.CSB_RVL._INT;		/* Get the number */

if (!confrm())				/* Call our general confirm routine */
    return;				/* If not confirmed, just return. */

printf ("Number is %d\n", num);		/* Print the number, for show */
}
/*

*/

/* uicmd - unimplemented or silly commands */

uicmd ()

{
if (!noise ("nothing"))			/* Give random guide string */
    return;				/* Return if bad parse of it */

if (!confrm())				/* Call our general confirm routine */
    return;				/* If not confirmed, just return. */

printf ("This command is not implemented.\n");
}
/*

*/

/* noise - parses a guide string.  Called with the address of the expected
   guide string; without the parentheses, of course. */

noise (str)

char		*str;			/* Address of string */

{
Noicfb.CFB_DEF = str;			/* Store the string pointer in
					   the guide word CFB */
return (COMNDi(&Topcsb, &Noicfb));	/* Do parse and return the result */
}
/*

*/

/* confrm - get confirmation (call COMND for confirm) */

/* Returns TRUE if OK confirmation; FALSE if not. */
 
confrm ()

{
if (COMNDi (&Topcsb, &Cfmcfb))		/* Get confirmation */
    return (TRUE);			/* Give OK return if success */
printf (" ?Not confirmed\n");		/* Give another error msg */
return (FALSE);				/* Return bad status. */
}
/*

*/

/* COMNDi - interface to the COMND() library routine, giving a message if
   a parse error occurs.  Returns TRUE or FALSE depending on success */

int COMNDi (CSBptr, CFBptr)

CSB		*CSBptr;		/* Address of command state block */
CFB		*CFBptr;		/* Address of command function block */

{
IND	int	i;			/* A counter */
IND	char	*sptr;			/* A string pointer */

if (COMND(CSBptr, CFBptr) == _CROK)	/* If successful parse */
    return (TRUE);			/*  then give good return */
sptr = &CSBptr->CSB_BUF[CSBptr->CSB_PRS]; /* Get addr of unrecognized input */
i = CSBptr->CSB_FLN - CSBptr->CSB_PRS;	/* Get # of chars unrecognized */
printf (" ??Invalid- Can not recognize \"");
while (i--)
    putchar (*sptr++);			/* Print the bad string */
printf ("\"... use ? here.\n");		/* Tell him how to proceed. */
return (FALSE);				/* Give bad return */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜久久久久| 国产亚洲欧美中文| 欧美va在线播放| 国产精品乱码一区二区三区软件| 亚洲永久免费av| 国产大片一区二区| 欧美一级欧美三级| 一区二区三区中文在线| 岛国精品在线观看| 日韩精品一区国产麻豆| 亚洲国产你懂的| 94色蜜桃网一区二区三区| 精品免费国产二区三区| 欧美日韩一区二区三区在线| 亚洲天堂中文字幕| 激情综合网av| 51精品秘密在线观看| 亚洲综合丁香婷婷六月香| av一区二区三区黑人| 久久婷婷成人综合色| 蜜臀久久久久久久| 欧美伦理影视网| 一区二区高清免费观看影视大全 | 亚洲福利视频导航| 91视频观看视频| 日韩美女久久久| 99精品视频在线观看| 中文字幕视频一区二区三区久| 国产高清在线精品| 国产精品免费视频一区| 国产精品123区| 国产欧美综合色| 丁香激情综合国产| 成人免费在线视频观看| 99久久精品一区二区| 亚洲欧美一区二区在线观看| 91香蕉视频黄| 亚洲成人资源在线| 欧美一级黄色大片| 国产在线不卡视频| 国产精品美女一区二区三区 | 欧美亚洲国产一区二区三区| 一区二区三区在线免费视频| 国产精品免费视频网站| 成人深夜视频在线观看| 国产精品午夜电影| 色哟哟一区二区| 午夜久久久久久久久| 日韩免费性生活视频播放| 激情偷乱视频一区二区三区| 日本一区二区三区久久久久久久久不| 高清beeg欧美| 欧美一区二区三区不卡| 在线免费视频一区二区| 亚洲动漫第一页| 91精品国模一区二区三区| 精品中文字幕一区二区小辣椒| 久久久99精品免费观看| 色综合网站在线| 日本视频免费一区| 国产精品丝袜久久久久久app| 91美女精品福利| 日本三级韩国三级欧美三级| 国产欧美一区二区精品婷婷| 91极品美女在线| 久久成人久久爱| 国产精品国产三级国产普通话三级| 色视频成人在线观看免| 久久激情综合网| 亚洲欧洲日产国码二区| 91麻豆精品国产91久久久久久久久| 国产一区999| 亚洲一区二区五区| 久久女同互慰一区二区三区| 一本一道久久a久久精品| 久久久影院官网| 成人短视频下载| 亚洲精品成人精品456| 91精品国产综合久久久久久久| 国产一区不卡在线| 亚洲国产成人精品视频| 国产精品女主播在线观看| 555www色欧美视频| 99国产精品国产精品久久| 久久se这里有精品| 亚洲福利一区二区| 中文字幕视频一区二区三区久| 欧美一区二区免费视频| 色哟哟精品一区| 国产精品一区二区三区乱码| 五月天精品一区二区三区| 中文字幕亚洲精品在线观看 | 亚洲成人资源网| 国产精品福利av| wwww国产精品欧美| 欧美一二区视频| 欧美色综合久久| 色综合色狠狠综合色| 精品国产不卡一区二区三区| 日韩成人精品在线观看| 亚洲欧美在线高清| 国产精品入口麻豆九色| 精品国产乱码久久久久久老虎| 欧美美女视频在线观看| 在线日韩一区二区| 99久久久久久99| 成人精品国产福利| 国产高清在线观看免费不卡| 国产在线视频精品一区| 美女mm1313爽爽久久久蜜臀| 天堂成人国产精品一区| 国产精品主播直播| 老司机免费视频一区二区| 日韩av中文字幕一区二区三区| 亚洲亚洲精品在线观看| 亚洲日本在线看| 亚洲天堂精品在线观看| 亚洲欧美经典视频| 亚洲免费av网站| 一区二区三区免费网站| 一区二区三区鲁丝不卡| 一区二区三区免费在线观看| 亚洲综合久久久久| 无吗不卡中文字幕| 日欧美一区二区| 麻豆国产欧美日韩综合精品二区| 麻豆成人免费电影| 日韩精品中午字幕| 日韩欧美的一区二区| 欧美蜜桃一区二区三区| 91精品久久久久久蜜臀| 26uuu色噜噜精品一区二区| 久久午夜色播影院免费高清| 欧美国产精品一区二区三区| 国产精品视频免费| 一区二区欧美国产| 免费在线观看成人| 国产成人免费在线观看不卡| 91蜜桃免费观看视频| 7777精品伊人久久久大香线蕉超级流畅 | 精品国产免费视频| 国产日韩欧美电影| 一区二区三区高清不卡| 日本成人超碰在线观看| 国产·精品毛片| 欧美三级一区二区| 亚洲欧美经典视频| 久久精品国产99久久6| 国产suv精品一区二区883| 国产精品77777| 丝袜美腿亚洲一区| 久久国产精品免费| av综合在线播放| 日韩一二三区视频| 综合色中文字幕| 美女一区二区久久| 日本伦理一区二区| 2022国产精品视频| 亚洲综合免费观看高清在线观看| 麻豆国产91在线播放| av在线这里只有精品| 日韩精品专区在线| 一区二区三区国产豹纹内裤在线| 经典三级视频一区| 欧美日本一区二区三区四区| 亚洲国产精品成人综合| 人人超碰91尤物精品国产| 99久久国产综合精品女不卡| 日韩精品资源二区在线| 亚洲国产人成综合网站| www.久久久久久久久| 精品入口麻豆88视频| 亚洲成人av福利| 91在线播放网址| 国产亚洲综合色| 麻豆精品视频在线| 欧美日韩精品一区二区在线播放| 国产精品国产三级国产aⅴ中文| 麻豆精品视频在线观看视频| 欧美精品一区二区三区视频 | 国产电影精品久久禁18| 欧美精品一二三四| 一区二区免费看| 欧美一卡二卡在线| 亚洲一二三区视频在线观看| av不卡在线观看| 国产欧美一区二区精品秋霞影院| 日本亚洲三级在线| 欧美日本在线一区| 午夜视频在线观看一区| 色综合久久久久综合| 亚洲欧美自拍偷拍| 99久久伊人网影院| 国产精品日韩成人| 不卡的av在线| 国产精品久久久久精k8| 99久久国产综合色|国产精品| 中文字幕第一区二区| 成人免费视频国产在线观看| 久久久久久久久久久黄色|