]>
git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/c++-lib/inc/snacc.h
4124e9db42b6c805e00e3ba90932aa2c91aa8f55
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
23 * ------------------------------------------------------------------------
24 * - J.G. Van Dyke & Associates, Inc. Modification History of SNACC 1.3 -
25 * ------------------------------------------------------------------------
27 * All modification are relative to the v1.3 of SNACC. We used SunOS 4.1.3's
28 * SCCS. The revision #'s start at 1.1, which is the original version from
34 * D 1.3 98/04/24 22:30:19 pleonber 3 2 00002/00000/00157
35 * added INSERT_VDA_COMMENTS comment for script that adds SCCS history.
37 * D 1.2 97/11/07 08:01:08 pleonber 2 1 00004/00000/00153
38 * added #ifndef _gVDADER_RULES extern int gVDADER_RULES #endif
40 * D 1.1 97/10/30 13:09:44 cmmaster 1 0 00153/00000/00000
41 * date and time created 97/10/30 13:09:44 by cmmaster
43 * ----------------------- End of VDA Modifications ---------------------------
47 * $Header: /cvs/Darwin/Security/SecuritySNACCRuntime/c++-lib/inc/snacc.h,v 1.1.1.1 2001/05/18 23:14:06 mb Exp $
49 * Revision 1.1.1.1 2001/05/18 23:14:06 mb
50 * Move from private repository to open source repository
52 * Revision 1.2 2001/05/05 00:59:18 rmurphy
53 * Adding darwin license headers
55 * Revision 1.1 2000/06/15 18:47:21 dmitch
56 * Files duplicated or copied from elsewhere. See Apple_README for gory details.
58 * Revision 1.1.1.1 2000/03/09 01:00:04 rmurphy
59 * Base Fortissimo Tree
61 * Revision 1.1 1999/02/25 05:32:31 mb
62 * Added public headers.
64 * Revision 1.7 1997/04/07 13:13:18 wan
65 * Made more C++ readable (credits to Steve Walker)
67 * Revision 1.6 1997/02/28 13:39:35 wan
68 * Modifications collected for new version 1.3: Bug fixes, tk4.2.
70 * Revision 1.5 1997/02/15 20:38:48 rj
71 * In member functions, return *this after calling abort() for stupid compilers that don't seem to know about volatile abort() (they would otherwise abort with an error).
73 * Revision 1.4 1995/07/24 15:06:52 rj
74 * configure checks for mem* functions. define replacements using b* functions, if necessary.
94 #if HAVE_MEMCMP /* memcmp(3) returns <0, 0 and 0, bcmp(3) returns only 0 and !0 */
95 #define memcmpeq( a, b, len) memcmp (a, b, len)
97 #define memcmpeq( a, b, len) bcmp (a, b, len)
100 #define memzero( p, len) memset (p, 0, len)
102 #define memzero( p, len) bzero (p, len)
105 #define memcpy( dst, src, len) bcopy (src, dst, len)
110 #ifdef VOLATILE_RETRUN
111 # define RETURN_THIS_FOR_COMPILERS_WITHOUT_VOLATILE_FUNCTIONS return *this;
113 # define RETURN_THIS_FOR_COMPILERS_WITHOUT_VOLATILE_FUNCTIONS
118 // enum bool { false, true };
119 // the above looks elegant, but leads to anachronisms (<, ==, !=, ... return value of type int, not enum bool), therefore:
121 enum { false , true };
125 #else /* !__cplusplus */
134 #endif /* __cplusplus */
137 * Inspired by gdb 4.0, for better or worse...
138 * (grabbed from Barry Brachman - MS)
140 * These macros munge C routine declarations such
141 * that they work for ANSI or non-ANSI C compilers
143 #ifdef __USE_ANSI_C__
146 #define PARAMS( arglist, args) (args)
147 #define NOPARAMS() (void)
151 #else /* !__USE_ANSI_C__ */
154 #define PARAMS( arglist, args) arglist args;
155 #define NOPARAMS() ()
160 #endif /* __USE_ANSI_C__ */
165 #define TCL (HAVE_TCL && !NO_TCL)
166 #define META (TCL && !NO_META)
194 #define if_IBM_ENC( code) code
196 #define if_IBM_ENC( code)
200 #define if_META( code) code
202 #define if_META( code)
206 #define if_TCL( code) code
208 #define if_TCL( code)
211 #ifndef _gVDADER_RULES
212 extern int gVDADER_RULES
;
215 #endif /* _SNACC_H_ */