-/*
- shellutil.h
+/* shellutil.h */
+/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2007 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 Copyright (c) 1995 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * 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).
+ */
- Copyright (c) 1995 Regents of the University of Michigan.
- All rights reserved.
+#ifndef SHELLUTIL_H
+#define SHELLUTIL_H
- Redistribution and use in source and binary forms are permitted
- provided that this notice is preserved and that due credit is given
- to the University of Michigan at Ann Arbor. The name of the University
- may not be used to endorse or promote products derived from this
- software without specific prior written permission. This software
- is provided ``as is'' without express or implied warranty.
-*/
+#include <ldap_cdefs.h>
+LDAP_BEGIN_DECL
#define MAXLINELEN 512
#define LDOP_SEARCH 0x01
char **ldop_suffixes;
char *ldop_dn;
- union {
+ union ldapop_params_u {
struct ldsrchparms LDsrchparams;
} ldop_params;
#define ldop_srch ldop_params.LDsrchparams
#ifdef LDAP_DEBUG
-void debug_printf();
+void debug_printf(const char *, ...) LDAP_GCCATTR((format(printf, 1, 2)));
#else /* LDAP_DEBUG */
-#define debug_printf()
+#define debug_printf (void) /* Ignore "arguments" */
#endif /* LDAP_DEBUG */
/*
char *ecalloc( unsigned nelem, unsigned elsize );
void *erealloc( void *s, unsigned size );
char *estrdup( char *s );
+extern void dump_ldop (struct ldop *op);
+
/*
* global variables
*/
extern int debugflg;
extern char *progname;
+
+LDAP_END_DECL
+#endif