1 /* idtest.c - ber decoding test program using isode libraries */
3 * Copyright (c) 1990 Regents of the University of Michigan.
6 * Redistribution and use in source and binary forms are permitted
7 * provided that this notice is preserved and that due credit is given
8 * to the University of Michigan at Ann Arbor. The name of the University
9 * may not be used to endorse or promote products derived from this
10 * software without specific prior written permission. This software
11 * is provided ``as is'' without express or implied warranty.
20 #include <quipu/attr.h>
23 static usage( char *name )
25 fprintf( stderr, "usage: %s\n", name );
28 main( int argc, char **argv )
32 PS psin, psout, pserr;
34 /* read the pe from standard in */
35 if ( (psin = ps_alloc( std_open )) == NULLPS ) {
39 if ( std_setup( psin, stdin ) == NOTOK ) {
40 perror( "std_setup" );
43 /* write the pe to standard out */
44 if ( (psout = ps_alloc( std_open )) == NULLPS ) {
48 if ( std_setup( psout, stdout ) == NOTOK ) {
49 perror( "std_setup" );
52 /* pretty print it to standard error */
53 if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
57 if ( std_setup( pserr, stderr ) == NOTOK ) {
58 perror( "std_setup" );
62 while ( (pe = ps2pe( psin )) != NULLPE ) {
69 fprintf(stderr, "requires ISODE X.500 distribution.\n");