Diff for /libraries/liblber/idtest.c between versions 1.7 and 1.18.2.5

version 1.7, 1999/05/18 23:12:36 version 1.18.2.5, 2010/04/13 20:22:54
Line 1 Line 1
 /* idtest.c - ber decoding test program using isode libraries */  /* idtest.c - ber decoding test program using isode libraries */
 /*  /* $OpenLDAP: pkg/ldap/libraries/liblber/idtest.c,v 1.18.2.4 2009/01/22 00:00:53 kurt Exp $ */
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file   *
    * Copyright 1998-2010 The OpenLDAP Foundation.
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted only as authorized by the OpenLDAP
    * Public License.
    *
    * A copy of this license is available in the file LICENSE in the
    * top-level directory of the distribution or, alternatively, at
    * <http://www.OpenLDAP.org/license.html>.
  */   */
 /* Portions  /* Portions Copyright (c) 1990 Regents of the University of Michigan.
  * Copyright (c) 1990 Regents of the University of Michigan.  
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms are permitted   * Redistribution and use in source and binary forms are permitted
Line 14 Line 23
  * software without specific prior written permission. This software   * software without specific prior written permission. This software
  * is provided ``as is'' without express or implied warranty.   * is provided ``as is'' without express or implied warranty.
  */   */
   /* ACKNOWLEDGEMENTS:
    * This work was originally developed by the University of Michigan
    * (as part of U-MICH LDAP).
    */
   
 #include "portable.h"  #include "portable.h"
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  
   #include <ac/stdlib.h>
   
 #ifdef HAVE_PSAP_H  #ifdef HAVE_PSAP_H
 #include <psap.h>  #include <psap.h>
Line 35  main( int argc, char **argv ) Line 49  main( int argc, char **argv )
         /* read the pe from standard in */          /* read the pe from standard in */
         if ( (psin = ps_alloc( std_open )) == NULLPS ) {          if ( (psin = ps_alloc( std_open )) == NULLPS ) {
                 perror( "ps_alloc" );                  perror( "ps_alloc" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
         if ( std_setup( psin, stdin ) == NOTOK ) {          if ( std_setup( psin, stdin ) == NOTOK ) {
                 perror( "std_setup" );                  perror( "std_setup" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
         /* write the pe to standard out */          /* write the pe to standard out */
         if ( (psout = ps_alloc( std_open )) == NULLPS ) {          if ( (psout = ps_alloc( std_open )) == NULLPS ) {
                 perror( "ps_alloc" );                  perror( "ps_alloc" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
         if ( std_setup( psout, stdout ) == NOTOK ) {          if ( std_setup( psout, stdout ) == NOTOK ) {
                 perror( "std_setup" );                  perror( "std_setup" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
         /* pretty print it to standard error */          /* pretty print it to standard error */
         if ( (pserr = ps_alloc( std_open )) == NULLPS ) {          if ( (pserr = ps_alloc( std_open )) == NULLPS ) {
                 perror( "ps_alloc" );                  perror( "ps_alloc" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
         if ( std_setup( pserr, stderr ) == NOTOK ) {          if ( std_setup( pserr, stderr ) == NOTOK ) {
                 perror( "std_setup" );                  perror( "std_setup" );
                 exit( 1 );                  exit( EXIT_FAILURE );
         }          }
   
         while ( (pe = ps2pe( psin )) != NULLPE ) {          while ( (pe = ps2pe( psin )) != NULLPE ) {
Line 65  main( int argc, char **argv ) Line 79  main( int argc, char **argv )
                 pe2ps( psout, pe );                  pe2ps( psout, pe );
         }          }
   
         exit( 0 );          exit( EXIT_SUCCESS );
 #else  #else
         fprintf(stderr, "requires ISODE X.500 distribution.\n");          fprintf(stderr, "requires ISODE X.500 distribution.\n");
         return( EXIT_FAILURE );          return( EXIT_FAILURE );

Removed from v.1.7  
changed lines
  Added in v.1.18.2.5


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org