1 /* idtest.c - ber decoding test program using isode libraries */
3 * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7 * Copyright (c) 1990 Regents of the University of Michigan.
10 * Redistribution and use in source and binary forms are permitted
11 * provided that this notice is preserved and that due credit is given
12 * to the University of Michigan at Ann Arbor. The name of the University
13 * may not be used to endorse or promote products derived from this
14 * software without specific prior written permission. This software
15 * is provided ``as is'' without express or implied warranty.
25 #include <quipu/attr.h>
29 main( int argc, char **argv )
33 PS psin, psout, pserr;
35 /* read the pe from standard in */
36 if ( (psin = ps_alloc( std_open )) == NULLPS ) {
40 if ( std_setup( psin, stdin ) == NOTOK ) {
41 perror( "std_setup" );
44 /* write the pe to standard out */
45 if ( (psout = ps_alloc( std_open )) == NULLPS ) {
49 if ( std_setup( psout, stdout ) == NOTOK ) {
50 perror( "std_setup" );
53 /* pretty print it to standard error */
54 if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
58 if ( std_setup( pserr, stderr ) == NOTOK ) {
59 perror( "std_setup" );
63 while ( (pe = ps2pe( psin )) != NULLPE ) {
70 fprintf(stderr, "requires ISODE X.500 distribution.\n");
71 return( EXIT_FAILURE );