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

📄 misc.h

📁 IBM Lotus C++ API 7.0a for IBM Lotus Notes/Domino Directory Release --------- ------------------
💻 H
📖 第 1 页 / 共 2 页
字号:

#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(P128)
#endif

/*********************************************************************/
/*                                                                   */
/* Licensed Materials - Property of IBM                              */
/*                                                                   */
/* L-GHUS-5RWNHM, L-GHUS-5RWNFH                                      */
/* (C) Copyright IBM Corp. 1989, 2005  All Rights Reserved           */
/*                                                                   */
/* US Government Users Restricted Rights - Use, duplication or       */
/* disclosure restricted by GSA ADP Schedule Contract with           */
/* IBM Corp.                                                         */
/*                                                                   */
/*********************************************************************/



/*	Miscellaneous Package Global Definitions */

#ifndef MISC_DEFS
#define MISC_DEFS


#ifdef __cplusplus
extern "C" {
#endif



/*	Some useful constants */

#define	MAXALPHANUMBER		40
#define	MAXALPHATIMEDATE	80
#define	MAXALPHATIMEDATEPAIR (80 * 2 + 3)
#define MAXSPRINTF			256
#define MAXSOUNDEX			(4+1)		/* 4 chars plus null terminator */

/*	Flags for IntlTextCompare */

#define INTL_ACCENT_SENSITIVE	0x00000001
#define INTL_CASE_SENSITIVE		0x00000002


/* time structure - NOTE: These fields MUST BE int's, NOT UNSIGNEDS! */

typedef struct {
	int year;					/* 1-32767 */
	int month;					/* 1-12 */
	int day;					/* 1-31 */
	int weekday;				/* 1-7, Sunday is 1 */
	int hour;					/* 0-23 */
	int minute;					/* 0-59 */
	int second;					/* 0-59 */
	int hundredth;				/* 0-99 */
	int dst;					/* FALSE or TRUE */
	int zone;					/* -11 to +11 */
	TIMEDATE GM;
} TIME;

/*	Special encodings for TIMEDATE fields.  Note that these are all in
	HOST-SPECIFIC format, and must be used with TimeConstruct or
	TimeExtractJulianDate or TimeExtractTicks! */

#define ALLDAY 0xffffffffL		/* put this in the TIME field */
#define ANYDAY 0xffffffffL		/* put this in the DATE field */
#define TICKS_IN_DAY 8640000L	/* 10msec ticks in a day */
#define TICKS_IN_HOUR 360000L	/* 10msec ticks in an hour */
#define TICKS_IN_MINUTE 6000L	/* 10msec ticks in a minute */
#define TICKS_IN_SECOND 100L	/* 10msec ticks in a second */
#define SECS_IN_DAY 86400L		/* seconds in a day */
#define SECS_IN_WEEK 604800L	/* seconds in a week */
#define SECS_IN_MONTH 2592000L	/* seconds in a month (30 days) */


/* DTFlags values (do not change - these values are also stored on disk!) */

#define DT_VALID		0x8000		/* Validity bit: If 1, use new DTFMT; if 0, use old TFMT */
#define	DT_4DIGITYEAR	0x0001		/* Require 4 digit year on INPUT (not output) */
#define DT_ALPHAMONTH	0x0002		/* Require months be INPUT as letters, not digits (e.g. "jan", not 01) */
#define DT_SHOWTIME		0x0004		/* Display time element on output */
#define DT_SHOWDATE		0x0008		/* Display date element on output */
#define DT_24HOUR		0x0040		/* Display time on output using 24 hour clock format */
#define DT_STYLE_YMD	1			/* Date element order:  Year, Month, Day, Day-of-week */
#define DT_STYLE_MDY	2			/* Date element order: Day-of-week, Month, Day, Year */
#define DT_STYLE_DMY	3			/* Date element order: Day-of-week, Day, Month, Year */
#define DT_STYLE_MSK	0x000f0000	/* This is where we store the style value in DTFlags */
#define DT_GET_STYLE(dwflag)		((dwflag & DT_STYLE_MSK) >> 0x10)			/* Macro to retrieve the style value from DTFlags */
#define DT_SET_STYLE(dwflag, style)	(dwflag = ((dwflag & 0xfff0ffff) | (style << 0x10)))	/* Macro to store the style value in DTFlags */

/* DTFlags2 values (do not change - these values are also stored on disk!) */

#define DT_USE_TFMT					0x0001		/* Use the 4.X format structure instead of this 5.X format structure */


/* DTYearFmt values (do not change - these values are also stored on disk!) */

#define DT_YFMT_YY		1				/* 2 digit year */
#define	DT_YFMT_YYYY	2			/* 4 digit year */
/* The following DTYearFmt values are valid only for Imperial calendars */
#define DT_YFMT_GE		3				/* Single letter (first letter ) of epoch name and 1 or 2 digit (no leading zeros) year */
#define DT_YFMT_GEE		4				/* Single letter (first letter ) of epoch name and 2 digit (with leading zeros, if necessary) year */
#define DT_YFMT_GGE		5
#define DT_YFMT_GGEE	6			/* Abbreviated spelling and 2 digit (with leading zeros, if necessary) year */
#define DT_YFMT_GGGE	7
#define DT_YFMT_GGGEE	8		/* fully spelled out epoch name and 2 digit (with leading zeros, if necessary) year */

/* DTDOWFmt values (Day-Of-Week) (do not change - these values are also stored on disk!) */

#define DT_WFMT_WWW		1
#define DT_WFMT_WWWW	2
#define DT_WFMT_WWWP	3			/* 3 letter abbreviation inside parenthesis */
#define DT_WFMT_WWWWP	4		/* Spelled out fully inside parenthesis */

/* DTMonthFmt values (do not change - these values are also stored on disk!) */

#define DT_MFMT_M		1
#define DT_MFMT_MM		2
#define DT_MFMT_MMM		3
#define DT_MFMT_MMMM	4

/* DTDayFmt values (do not change - these values are also stored on disk!) */

#define DT_DFMT_D		1
#define DT_DFMT_DD		2

/* DTDShow values (controls what is shown on OUTPUT for date) */
/* (do not change - these values are also stored on disk!) */

#define DT_DSHOW_ALL	1
#define DT_DSHOW_YM		2
#define DT_DSHOW_WMD	3
#define DT_DSHOW_W		4
#define DT_DSHOW_M		5
#define DT_DSHOW_MD		6
#define DT_DSHOW_MDY	7
#define DT_DSHOW_D		8
#define DT_DSHOW_Y		9

/* DTDSpecial bit values:  Special handling of date OUTPUT */
/* (do not change - these values are also stored on disk!) */

#define DT_DSPEC_NONE	0				/* No special handling */
#define DT_DSPEC_TODAY	0x0001			/* Use 'Today', 'Yesterday', 'Tomorrow', when possible */
#define DT_DSPEC_Y4		0x0002			/* Always display year on OUTPUT as 4 digit year */
#define DT_DSPEC_21Y4	0x0004			/* Output 2 digit year for this century; use 4 digit year for other century */
#define DT_DSPEC_CURYR	0x0008			/* Display year when not the current year */

/* DTTShow values (controls what to shown on OUTPUT for time) */
/* (do not change - these values are also stored on disk!) */

#define DT_TSHOW_H		1
#define DT_TSHOW_HM		2
#define DT_TSHOW_HMS	3
#define DT_TSHOW_ALL	4

/* Values for FTFMT "Preferences" field (do not change - these values are also stored on disk!) */

#define	NPREF_CLIENT	0		/* Get preferences from the client */
#define	NPREF_FIELD		1		/* Get preferences fromt the form or view */

/* Date/Time formatting data */

typedef struct {
	BYTE	Preferences;		/* NPREF_xxx. Get preferences from the Client or from the Form/View? */
	DWORD	DTFlags;
	DWORD	DTFlags2;			/* In case we need more room */
	BYTE	DTDOWFmt;			/* Day-of-week format choice */
	BYTE	DTYearFmt;			  /* Year format choice */
	BYTE	DTMonthFmt;			/* Month format choice */
	BYTE	DTDayFmt;			 /* Day format choice */
	BYTE	DTDShow;			/* Date display choice */
	BYTE	DTTShow;			/* Time display choice */
	BYTE	DTDSpecial;			/* Date special display choice */
	BYTE	DTTZone;			/* Time zone display choice */
	char*	DTDsep1;			/* Date field separator string #1 */
	char*	DTDsep2;			/* Date field separator string #2 */
	char*	DTDsep3;			/* Date field separator string #3 */
	char*	DTTsep;				/* Time field separator string */
} DTFMT;


/* Currency flags */

#define	NCURFMT_SYMFOLLOWS	0x0001		/* The currency symbol follows the value */
#define	NCURFMT_USESPACES	0x0002		/* Inset space between symbol and value */
#define NCURFMT_ISOSYMUSED 0x0004	/* Using 3 letter ISO for currency symbol */

/* Currency selection values */

#define NCURFMT_COMMON	0
#define NCURFMT_CUSTOM	1

/*	Number Format */

#define	NFMT_GENERAL		0		/* Number Formats */
#define	NFMT_FIXED			1
#define	NFMT_SCIENTIFIC		2
#define	NFMT_CURRENCY		3

#define	NATTR_PUNCTUATED	0x0001	/* Number Attributes */
#define	NATTR_PARENS		0x0002
#define	NATTR_PERCENT		0x0004
#define NATTR_VARYING		0x0008

⌨️ 快捷键说明

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