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>
24 main( int argc, char **argv )
28 PS psin, psout, pserr;
30 /* read the pe from standard in */
31 if ( (psin = ps_alloc( std_open )) == NULLPS ) {
35 if ( std_setup( psin, stdin ) == NOTOK ) {
36 perror( "std_setup" );
39 /* write the pe to standard out */
40 if ( (psout = ps_alloc( std_open )) == NULLPS ) {
44 if ( std_setup( psout, stdout ) == NOTOK ) {
45 perror( "std_setup" );
48 /* pretty print it to standard error */
49 if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
53 if ( std_setup( pserr, stderr ) == NOTOK ) {
54 perror( "std_setup" );
58 while ( (pe = ps2pe( psin )) != NULLPE ) {
65 fprintf(stderr, "requires ISODE X.500 distribution.\n");