]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/tmpltest.c
ITS#897 Internal connection that is closed on one end and about to
[openldap] / libraries / libldap / tmpltest.c
index 0ddfb49dbcad3c9695e4aa255a1e5b3386836881..711884d9ac64db3126b2c8f372e2d70854bb42f3 100644 (file)
@@ -1,23 +1,24 @@
+/* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+
+#include <ac/stdlib.h>
 
 #include <ac/socket.h>
 #include <ac/time.h>
 
 #ifdef HAVE_CONSOLE_H
 #include <console.h>
-#endif /* MACOS */
+#endif /* HAVE_CONSOLE_H */
 
-#include "lber.h"
-#include "ldap.h"
-#include "disptmpl.h"
-#include "srchpref.h"
+#include <ldap.h>
+#include <disptmpl.h>
+#include <srchpref.h>
 
 static void dump_tmpl   ( struct ldap_disptmpl *tmpl );
 static void dump_srchpref( struct ldap_searchobj *sp );
@@ -42,13 +43,13 @@ main( int argc, char **argv )
     if (( err = ldap_init_templates( "ldaptemplates.conf", &templates ))
            != 0 ) {
        fprintf( stderr, "ldap_init_templates failed (%d)\n", err );
-       exit( 1 );
+       exit( EXIT_FAILURE );
     }
 
     if (( err = ldap_init_searchprefs( "ldapsearchprefs.conf", &so ))
            != 0 ) {
        fprintf( stderr, "ldap_init_searchprefs failed (%d)\n", err );
-       exit( 1 );
+       exit( EXIT_FAILURE );
     }
 
     if ( argc == 1 ) {
@@ -78,7 +79,7 @@ main( int argc, char **argv )
     ldap_free_templates( templates );
     ldap_free_searchprefs( so );
 
-    exit( 0 );
+    exit( EXIT_SUCCESS );
 }
 
 
@@ -107,7 +108,7 @@ static const unsigned long item_opt_vals[] = {
 };
 
 
-void
+static void
 dump_tmpl( struct ldap_disptmpl *tmpl )
 {
     struct ldap_tmplitem       *rowp, *colp;
@@ -225,7 +226,7 @@ dump_tmpl( struct ldap_disptmpl *tmpl )
 }
 
 
-void
+static void
 dump_srchpref( struct ldap_searchobj *so )
 {
     int i;