3 * Portions Copyright 1998 Sun Microsystems, Inc. All rights reserved.
4 * Use is subject to license terms.
7 #pragma ident "%Z%%M% %I% %E% SMI"
8 /* idtest.c - ber decoding test program using isode libraries */
10 * Copyright (c) 1990 Regents of the University of Michigan.
11 * All rights reserved.
13 * Redistribution and use in source and binary forms are permitted
14 * provided that this notice is preserved and that due credit is given
15 * to the University of Michigan at Ann Arbor. The name of the University
16 * may not be used to endorse or promote products derived from this
17 * software without specific prior written permission. This software
18 * is provided ``as is'' without express or implied warranty.
23 #include <quipu/attr.h>
25 static usage( char *name
)
27 fprintf( stderr
, "usage: %s\n", name
);
30 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
) {