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.
16 #include <quipu/attr.h>
18 static usage( char *name )
20 fprintf( stderr, "usage: %s\n", name );
23 main( int argc, char **argv )
26 PS psin, psout, pserr;
28 /* read the pe from standard in */
29 if ( (psin = ps_alloc( std_open )) == NULLPS ) {
33 if ( std_setup( psin, stdin ) == NOTOK ) {
34 perror( "std_setup" );
37 /* write the pe to standard out */
38 if ( (psout = ps_alloc( std_open )) == NULLPS ) {
42 if ( std_setup( psout, stdout ) == NOTOK ) {
43 perror( "std_setup" );
46 /* pretty print it to standard error */
47 if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
51 if ( std_setup( pserr, stderr ) == NOTOK ) {
52 perror( "std_setup" );
56 while ( (pe = ps2pe( psin )) != NULLPE ) {