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.
20 * print.c - library routines for printing ASN.1 values.
22 * Copyright (C) 1992 Michael Sample and the University of British Columbia
24 * This library is free software; you can redistribute it and/or
25 * modify it provided that this copyright/license information is retained
28 * If you modify this file, you must clearly indicate your changes.
30 * This source code is distributed in the hope that it will be
31 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
32 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34 * $Header: /cvs/Darwin/src/live/Security/SecuritySNACCRuntime/c-lib/src/print.c,v 1.1.1.1 2001/05/18 23:14:08 mb Exp $
36 * Revision 1.1.1.1 2001/05/18 23:14:08 mb
37 * Move from private repository to open source repository
39 * Revision 1.2 2001/05/05 00:59:25 rmurphy
40 * Adding darwin license headers
42 * Revision 1.1.1.1 1999/03/16 18:06:32 aram
43 * Originals from SMIME Free Library.
45 * Revision 1.3 1997/03/13 09:15:19 wan
46 * Improved dependency generation for stupid makedepends.
47 * Corrected PeekTag to peek into buffer only as far as necessary.
48 * Added installable error handler.
49 * Fixed small glitch in idl-code generator (Markku Savela <msa@msa.tte.vtt.fi>).
51 * Revision 1.2 1995/07/24 21:04:55 rj
52 * changed `_' to `-' in file names.
54 * Revision 1.1 1994/08/28 09:46:08 rj
55 * first check-in. for a list of changes to the snacc-1.1 distribution please refer to the ChangeLog.
59 #include "asn-config.h"
62 unsigned short int stdIndentG
= 4;
66 Indent
PARAMS ((f
, i
),
71 fputc (' ', f
); /* this may be slow */
74 void Asn1DefaultErrorHandler
PARAMS ((str
, severity
),
78 fprintf(stderr
,"%s",str
);
81 static Asn1ErrorHandler asn1CurrentErrorHandler
= Asn1DefaultErrorHandler
;
84 Asn1Error
PARAMS ((str
),
87 (*asn1CurrentErrorHandler
)(str
,1);
91 Asn1Warning
PARAMS ((str
),
94 (*asn1CurrentErrorHandler
)(str
,0);
98 Asn1InstallErrorHandler
PARAMS ((handler
),
99 Asn1ErrorHandler handler
)
101 Asn1ErrorHandler former
= asn1CurrentErrorHandler
;
102 asn1CurrentErrorHandler
= handler
;