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.
14 #define DISABLE_BRIDGE
19 #include <quipu/attr.h>
21 static usage( char *name )
23 fprintf( stderr, "usage: %s\n", name );
26 main( int argc, char **argv )
29 PS psin, psout, pserr;
31 /* read the pe from standard in */
32 if ( (psin = ps_alloc( std_open )) == NULLPS ) {
36 if ( std_setup( psin, stdin ) == NOTOK ) {
37 perror( "std_setup" );
40 /* write the pe to standard out */
41 if ( (psout = ps_alloc( std_open )) == NULLPS ) {
45 if ( std_setup( psout, stdout ) == NOTOK ) {
46 perror( "std_setup" );
49 /* pretty print it to standard error */
50 if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
54 if ( std_setup( pserr, stderr ) == NOTOK ) {
55 perror( "std_setup" );
59 while ( (pe = ps2pe( psin )) != NULLPE ) {