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

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

?? datemath.c

?? 這是一個銀行業務上用來計算日期時間的工具包
?? C
字號:
/* * $Id: //pentools/main/datemath/datemath.c#5 $ * * written by:  Stephen J. Friedl *              Software Consultant *              Tustin, California USA *              steve@unixwiz.net * *	This tool's home page is * *		http://www.unixwiz.net/tools/datemath.html * *	This is the main driver for the datemath program.  The very *	large bulk of the code is in the lex scanner specifiction *	file "lex.l" and in the yacc grammer file "gram.y", so this *	file is little more than a wrapper. It will, however, serve *	as an anchor for the documentation. * *	This program performs various operations on mm/dd/yy, mm/yy, *	and YYMM dates, and it sends the results to the standard *	output.  This function will most often be used in shell *	scripts surrounded by `` characters: * *		END_DATE=`datemath $YYMM + 3`	# add three months * *	Datemath is fairly smart about converting from one kind *	of date to another when it makes sense, and most operations *	can apply to any kind of date.  mm/yy and yymm dates are *	both converted to yymm internally, and are used synonymously. * *	The most common usage will be: * *		datemath date + num *		datemath date - num *		datemath date - date * *	The first two add or subtract the specified number of days/months *	for mm/dd/yy or mm/yy dates, and output the same kind of date. *	The third form outputs the number of days/months between the *	two specified dates in integer form. * *	This program also supports functions that operate on dates, and *	they are: * *		fday(date)		return mm/dd/yy of first day of month *		lday(date)		return mm/dd/yy of last  day of month *		ndays(date)		return # of days in this month *		year(date)		return year (19YY format) *		month(date)		return month of this date *		day(date)		return day of this date (mm/dd/yy only) *		yymm(date)		convert mm/dd/yy to mm/yy * *	All expressions have a type: mm/dd/yy, yymm, and integer, and they *	can be nested arbitrarily and grouped with parenthesis.  For example *	we want to run program "foo" with two mm/dd/yy dates, but all we *	have is a mm/yy date in $YYMM.  We would do this with: * *		foo `datemath fday(yymm)` `datemath lday(yymm+2)` * *	If we needed to see how many days is in this span, we would do: * *		datemath '( lday(yymm+2) - fday(yymm) ) + 1' * *	The string can be separate arguments or a single arg, but *	the user must take care to quote characters special to the *	shell. * *	Dates themselves can be in any of the following formats: * *		mm/yy *		yymm *		mmddyy *		mmddyyyy *		mm/dd/yy *		mm/dd/yyyy * *	and full range checking is done on them to make sure the *	dates given are plausible. * *	Currently, "syntax error" is the only indication of most failures, *	although some semantic errors (such as the wrong date type) will *	be identified.  Exit value is 0 if all is OK and nonzero on error. * * COMMAND LINE * *	Other than the expression parsed, a few command-line params *	are allowed with the traditional "dash" notation. * *	-L	This runs only the lexer, not the parser: it's used *		for testing the flex code by reading and printing *		one token at a time. It does no date math. * *	-V	print the version of this program. * *	-9 yy	two-digit years from yy..99 are 1900, and all *		else is 2000. Default = 40 * *	-2	output two-digit years * *	-4	output four-digit years (default) * *	-C	output dates in Y/M/D format * * BUGS *	> limited error checking of plausible dates *	> very poor syntax error recovery *	> should be a way to output yymm dates as mm/yy *	> no way to do collated date *input* */#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <malloc.h>#include "defs.h"static const char	Version[] =	"datemath 2.0.10 - 2003-06-20 - steve@unixwiz.net";const char	*ProgName = NULL;int		year_digits   = 4,		collate_order = FALSE;static void usage(const char *argv0) __attribute__((noreturn));int main(int argc, char **argv){int	c, i, len;char	*exprbuf;int	lextest = FALSE;	ProgName = argv[0];	setbuf(stdout, (char *)0);	while ( (c = getopt(argc, argv, "VL9:24C")) != EOF )	{		switch (c)		{		  default:			usage(argv[0]);		  case '4':			year_digits = 4;			break;		  case '2':			year_digits = 2;			break;		  case 'C':			collate_order = TRUE;			break;		  case '9':			century19_year = atoi(optarg);			break;		  case 'L':			lextest = TRUE;			break;		  case 'V':		/* version */			fprintf(stderr, "%s\n", Version);			exit(EXIT_SUCCESS);		}	}	/*----------------------------------------------------------------	 * BUILD EXPRESSION STRING	 *	 * Figure out how much space we need for the whole string,	 * allocate it, then fill the buffer with it.	 */	len = 0;	for (i = optind; i < argc; i++ )	{		len += strlen(argv[i]) + 1;	}	if ( len == 0 )	{		fprintf(stderr, "ERROR: missing datemath expression\n");		usage(argv[0]);	}	len += 2; /* good measure */	if ( (exprbuf = malloc(len)) == 0 )		die("ERROR: cannot get %d bytes of memory", len);	for ( ; optind < argc; )	{		strcat(exprbuf, argv[optind++]);		strcat(exprbuf, " ");	}	init_scan(exprbuf);	if ( lextest )	{	int	tok;		while ( (tok = yylex()) != 0 )			printf("got token %d [%s]\n", tok, yytext);		exit(EXIT_SUCCESS);	}	else	{		exit( yyparse() == 0 ? EXIT_SUCCESS : EXIT_FAILURE);	}}void yyerror(const char *msg){	die("syntax error in command line: %s", msg);}static void usage(const char *argv0){const char *const *p;static const char * const text[] = {"","  -V        Report version information to stderr and exit","  -4        Output dates with four-digit years (default)","  -2        Output dates with two-digit years","  -9 ##     Two-digit years starting with ## are 19xx, else 20xx","  -C        Collate mode: output dates in year/month/day format","","Expression keywords:","""today tomorrow yesterday -- the obvious dates","fday(date) - the first day of the month","lday(date) - the last day of the month","ndays(date) - number of days in the month",0};	fprintf(stderr, "%s\n\n", Version);	fprintf(stderr, "usage: %s [options] date-expression\n", argv0);	for (p = text; *p; p++)	{		fprintf(stderr, "%s\n", *p);	}	exit(EXIT_FAILURE);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产bt| 欧美午夜精品久久久久久超碰| 亚洲综合久久av| 国产精品国产a级| 久久综合九色综合97_久久久| 日韩一区二区三| 3751色影院一区二区三区| 欧美日韩极品在线观看一区| 欧美日韩精品免费| 欧美一级片在线看| 日韩天堂在线观看| 久久久欧美精品sm网站| 久久久久久综合| 国产精品国产三级国产三级人妇 | 视频一区二区中文字幕| 日韩制服丝袜先锋影音| 精品制服美女久久| 成人影视亚洲图片在线| 91在线一区二区三区| 欧美日韩综合不卡| 精品久久久三级丝袜| 国产精品久久久久一区二区三区共| 国产精品久久久久久久久免费丝袜| 亚洲欧洲精品一区二区三区| 亚洲综合网站在线观看| 狠狠色狠狠色合久久伊人| 不卡一区二区在线| 在线观看91精品国产麻豆| 久久人人爽爽爽人久久久| 国产精品理论在线观看| 一区二区免费看| 韩国视频一区二区| 欧洲另类一二三四区| 欧美精品一区二区三区蜜臀| 中文字幕一区二区在线观看| 青青草国产成人av片免费| 国产高清不卡一区二区| 欧美在线三级电影| 国产日韩精品一区二区三区在线| 亚洲精品国产精华液| 极品少妇xxxx精品少妇偷拍| 色94色欧美sute亚洲13| 26uuu欧美| 亚洲激情五月婷婷| 国产成人在线观看免费网站| 欧美视频一区二区| 亚洲国产成人午夜在线一区| 秋霞av亚洲一区二区三| 色香蕉成人二区免费| 久久久国产一区二区三区四区小说| 亚洲午夜久久久久久久久电影网| 国产精品一级黄| 日韩视频在线观看一区二区| 亚洲精品亚洲人成人网| 成人激情动漫在线观看| 26uuu成人网一区二区三区| 午夜精品久久一牛影视| 色天天综合久久久久综合片| 国产精品情趣视频| 国产成人av网站| 久久久99免费| 久久91精品久久久久久秒播| 欧美另类久久久品| 亚洲一区二区三区四区在线免费观看 | 日韩欧美色综合网站| 婷婷综合久久一区二区三区| 欧美三区在线视频| 欧美aaaaaa午夜精品| 国产精品久久久久久久第一福利| 91精品国产综合久久久久久久久久 | 亚洲成人一二三| 欧美精品一区二区久久婷婷| eeuss鲁片一区二区三区| 午夜精品一区二区三区免费视频 | 色八戒一区二区三区| 六月婷婷色综合| 美国十次了思思久久精品导航| 中文字幕一区二区在线播放| 精品剧情在线观看| 欧美一区二区三区啪啪| 欧美艳星brazzers| 欧美日韩三级一区二区| 99久久婷婷国产精品综合| 亚洲国产精品久久人人爱蜜臀 | 亚洲一区二区三区四区在线免费观看| 亚洲视频一区二区在线观看| 亚洲国产乱码最新视频| 国产精品视频免费| 欧美精选在线播放| 欧美午夜精品一区| 欧美一区二区三区影视| 中文无字幕一区二区三区| 成人国产精品免费网站| 国产欧美日韩不卡| 亚洲另类色综合网站| 欧美午夜视频网站| 美女精品一区二区| 久久久不卡网国产精品一区| 不卡在线视频中文字幕| 亚洲国产视频在线| 日韩一级黄色大片| 国产精品69久久久久水密桃| 综合欧美亚洲日本| 欧美一卡二卡在线观看| 成人亚洲精品久久久久软件| 亚洲综合色区另类av| 精品乱人伦一区二区三区| 99视频精品全部免费在线| 亚洲成av人片| 国产精品欧美久久久久无广告| 欧美亚洲日本国产| 国产精品一区不卡| 午夜精品在线视频一区| 国产精品乱人伦| 欧美丰满一区二区免费视频| 成人免费看片app下载| 午夜视黄欧洲亚洲| 国产精品久线观看视频| 91精品国产高清一区二区三区蜜臀 | 99视频精品全部免费在线| 美女高潮久久久| 一区二区三区免费看视频| 久久久久国产精品厨房| 69堂精品视频| 在线免费精品视频| 不卡的av电影| 国产精品123| 麻豆国产91在线播放| 亚洲国产综合色| 亚洲欧洲色图综合| 国产精品免费视频观看| 久久先锋影音av| 日韩一区二区精品葵司在线| 欧美日韩精品久久久| 日本韩国精品在线| av一区二区久久| 成人h精品动漫一区二区三区| 精品一区二区三区在线观看国产| 婷婷中文字幕一区三区| 亚洲www啪成人一区二区麻豆| 自拍偷拍欧美激情| 国产精品全国免费观看高清| 久久久精品欧美丰满| 久久综合色一综合色88| 精品成人一区二区三区四区| 日韩欧美卡一卡二| 精品盗摄一区二区三区| 久久一区二区三区四区| www国产亚洲精品久久麻豆| 日韩午夜电影在线观看| 日韩一区二区在线观看视频| 国产一区二区三区免费播放| 激情综合网av| 青娱乐精品视频在线| 青青草国产成人av片免费| 秋霞国产午夜精品免费视频| 亚洲一区二区精品视频| 一区二区三区不卡视频| 欧美日韩一二三| 在线综合视频播放| 亚洲高清三级视频| 亚洲综合在线五月| 性做久久久久久| 国产精品你懂的在线欣赏| 国产欧美一区二区三区网站| 日韩欧美一级二级三级久久久 | 亚洲欧洲三级电影| 亚洲国产精品成人综合| 1000精品久久久久久久久| 亚洲少妇30p| 成人欧美一区二区三区视频网页| 久久综合狠狠综合久久激情| 精品日韩欧美在线| 国产精品欧美一级免费| 亚洲国产成人私人影院tom| 亚洲综合视频网| 精品1区2区在线观看| 国产精品福利一区二区| 三级成人在线视频| 日韩高清不卡一区二区| 成人激情综合网站| 日本怡春院一区二区| 成人18视频在线播放| 欧美理论电影在线| 欧美不卡在线视频| 1024成人网色www| 国产精品日韩成人| 一区二区三区小说| 国产福利91精品| 色8久久精品久久久久久蜜| 欧美大胆一级视频| 久久久久久久久久久99999| 亚洲人成影院在线观看| 一区二区三区成人在线视频 | 99视频国产精品| 欧美四级电影在线观看| 精品欧美黑人一区二区三区| 日韩美女在线视频 | 日韩视频在线你懂得| 一区二区三区中文字幕精品精品 |