⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgptimebomb.c

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 C
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpTimeBomb.c,v 1.3 2002/08/06 20:11:15 dallen Exp $
____________________________________________________________________________*/
#include "pgpConfig.h"
#include "pgpTimeBomb.h"

#if PGP_TIME_BOMB	/* [ */

#include <time.h>
#include "pgpMem.h"

	PGPBoolean
pgpTimeBombHasExpired( void )
{
	time_t		currentTime	= time( NULL );
	time_t		expirationTime;
	struct tm	tm;
	
	pgpAssert( kPGPTimeBombMonth >= 1 && kPGPTimeBombMonth <= 12 );
	pgpAssert( kPGPTimeBombYear >= 1997 );
	pgpAssert( kPGPTimeBombDay >= 0 && kPGPTimeBombDay <= 31 );
	
	pgpClearMemory( &tm, sizeof( tm ) );
	tm.tm_year	= kPGPTimeBombYear - 1900;	/* API requires just "97" */
	tm.tm_mon	= kPGPTimeBombMonth - 1;	/* months are [0,11] */
	tm.tm_mday	= kPGPTimeBombDay;
	
	expirationTime	= mktime( &tm );
	
	return ( currentTime >= expirationTime );
}


#endif	/* ] */


/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/

⌨️ 快捷键说明

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