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

📄 pgpmacutils.c

📁 著名的加密软件的应用于电子邮件中
💻 C
字号:
/*
* pgpMacUtils.c -- Various Macintosh utilities
*
* Copyright (C) 1997 Pretty Good Privacy, Inc. All rights reserved.
*
* $Id: pgpMacUtils.c,v 1.2.2.1 1997/06/07 09:50:09 mhw Exp $
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "pgpErr.h"
#include "pgpMacUtils.h"

typedef struct MacErrorEntry_
{
	OSErr	 	macError;
	PGPError	pgpError;
	} MacErrorEntry;

static MacErrorEntry	macErrorTable[] = {
	{ opWrErr,			PGPERR_FILE_WRITELOCKED },
	{ permErr,			PGPERR_FILE_PERMISSIONS },
	{ afpAccessDenied,	PGPERR_FILE_PERMISSIONS },
{ 0, 0 }
};

	PGPError
pgpErrorFromMacError(
	OSErr	 	macError,
	PGPError	defaultError)
{
	int		i;
	
	if (macError == noErr)
		return PGPERR_OK;
	for (i = 0; macErrorTable[i].macError != 0; i++)
		if (macErrorTable[i].macError == macError)
			return macErrorTable[i].pgpError;
	return defaultError;
}

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

⌨️ 快捷键说明

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