]> git.sur5r.net Git - openldap/blobdiff - include/disptmpl.h
Update copyright (including with or without modification clarification)
[openldap] / include / disptmpl.h
index 7c592109b1ac5669cca2e15efcb7f12d3bb8a047..e59e87de8667e89e8c016df134fa0714387b911f 100644 (file)
@@ -1,4 +1,15 @@
+/* $OpenLDAP$ */
 /*
+ * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
+ * 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 at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
+ */
+/* Portions
  * Copyright (c) 1993, 1994 Regents of the University of Michigan.
  * All rights reserved.
  *
 #ifndef _DISPTMPL_H
 #define _DISPTMPL_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <ldap_cdefs.h>
 
+LDAP_BEGIN_DECL
 
 #define LDAP_TEMPLATE_VERSION  1
 
@@ -123,8 +133,6 @@ struct ldap_tmplitem {
 };
 
 
-#define NULLTMPLITEM   ((struct ldap_tmplitem *)0)
-
 #define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
        ( (ti)->ti_appdata = (void *)(datap) )
 
@@ -143,8 +151,6 @@ struct ldap_oclist {
     struct ldap_oclist *oc_next;
 };
 
-#define NULLOCLIST     ((struct ldap_oclist *)0)
-
 
 /*
  * add defaults list
@@ -158,8 +164,6 @@ struct ldap_adddeflist {
     struct ldap_adddeflist     *ad_next;
 };
 
-#define NULLADLIST     ((struct ldap_adddeflist *)0)
-
 
 /*
  * display template global options
@@ -199,8 +203,6 @@ struct ldap_disptmpl {
     struct ldap_disptmpl       *dt_next;
 };
 
-#define NULLDISPTMPL   ((struct ldap_disptmpl *)0)
-
 #define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
        ( (dt)->dt_appdata = (void *)(datap) )
 
@@ -221,110 +223,96 @@ struct ldap_disptmpl {
 #define LDAP_DTMPL_BUFSIZ      8192
 
 
-#ifndef NEEDPROTOS
-
-typedef int (*writeptype)();
+typedef int (*ldap_writeptype) LDAP_P((
+       void *writeparm, char *p, ber_len_t len ));
 
-int ldap_init_templates();
-int ldap_init_templates_buf();
-void ldap_free_templates();
-struct ldap_disptmpl *ldap_first_disptmpl();
-struct ldap_disptmpl *ldap_next_disptmpl();
-struct ldap_disptmpl *ldap_name2template();
-struct ldap_disptmpl *ldap_oc2template();
-char **ldap_tmplattrs();
-struct ldap_tmplitem *ldap_first_tmplrow();
-struct ldap_tmplitem *ldap_next_tmplrow();
-struct ldap_tmplitem *ldap_first_tmplcol();
-struct ldap_tmplitem *ldap_next_tmplcol();
-int ldap_entry2text_search();
-int ldap_entry2text();
-int ldap_vals2text();
-int ldap_entry2html_search();
-int ldap_entry2html();
-int ldap_vals2html();
+LDAP_F( int )
+ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
 
-#else /* !NEEDPROTOS */
+LDAP_F( int )
+ldap_init_templates_buf LDAP_P(( char *buf,
+       ber_len_t buflen,
+       struct ldap_disptmpl **tmpllistp ));
 
-typedef int (*writeptype)( void *writeparm, char *p, int len );
+LDAP_F( void )
+ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist ));
 
-LDAPFUNCDECL int
-ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp );
+LDAP_F( struct ldap_disptmpl * )
+ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist ));
 
-LDAPFUNCDECL int
-ldap_init_templates_buf( char *buf, long buflen,
-       struct ldap_disptmpl **tmpllistp );
+LDAP_F( struct ldap_disptmpl * )
+ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist,
+       struct ldap_disptmpl *tmpl ));
 
-LDAPFUNCDECL void
-ldap_free_templates( struct ldap_disptmpl *tmpllist );
+LDAP_F( struct ldap_disptmpl * )
+ldap_name2template LDAP_P(( char *name,
+       struct ldap_disptmpl *tmpllist ));
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_first_disptmpl( struct ldap_disptmpl *tmpllist );
+LDAP_F( struct ldap_disptmpl * )
+ldap_oc2template LDAP_P(( char **oclist,
+       struct ldap_disptmpl *tmpllist ));
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_next_disptmpl( struct ldap_disptmpl *tmpllist,
-       struct ldap_disptmpl *tmpl );
+LDAP_F( char ** )
+ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl,
+       char **includeattrs,
+       int exclude,
+       unsigned long syntaxmask ));
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_name2template( char *name, struct ldap_disptmpl *tmpllist );
+LDAP_F( struct ldap_tmplitem * )
+ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl ));
 
-LDAPFUNCDECL struct ldap_disptmpl *
-ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist );
+LDAP_F( struct ldap_tmplitem * )
+ldap_next_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl,
+       struct ldap_tmplitem *row ));
 
-LDAPFUNCDECL char **
-ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude,
-        unsigned long syntaxmask );
+LDAP_F( struct ldap_tmplitem * )
+ldap_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
+       struct ldap_tmplitem *row ));
 
-LDAPFUNCDECL struct ldap_tmplitem *
-ldap_first_tmplrow( struct ldap_disptmpl *tmpl );
+LDAP_F( struct ldap_tmplitem * )
+ldap_next_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
+       struct ldap_tmplitem *row,
+       struct ldap_tmplitem *col ));
 
-LDAPFUNCDECL struct ldap_tmplitem *
-ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
-
-LDAPFUNCDECL struct ldap_tmplitem *
-ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
-
-LDAPFUNCDECL struct ldap_tmplitem *
-ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row,
-       struct ldap_tmplitem *col );
-
-LDAPFUNCDECL int
-ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry,
+LDAP_F( int )
+ldap_entry2text LDAP_P(( LDAP *ld,
+       char *buf, LDAPMessage *entry,
        struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
-       writeptype writeproc, void *writeparm, char *eol, int rdncount,
-       unsigned long opts );
-
-LDAPFUNCDECL int
-ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
-       unsigned long syntaxid, writeptype writeproc, void *writeparm,
-       char *eol, int rdncount );
-
-LDAPFUNCDECL int
-ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
+       ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
+       unsigned long opts ));
+
+LDAP_F( int )
+ldap_vals2text LDAP_P(( LDAP *ld,
+       char *buf, char **vals, char *label, int labelwidth,
+       unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
+       char *eol, int rdncount ));
+
+LDAP_F( int )
+ldap_entry2text_search LDAP_P(( LDAP *ld,
+       char *dn, char *base, LDAPMessage *entry,
        struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
-       writeptype writeproc, void *writeparm, char *eol, int rdncount,
-       unsigned long opts );
+       ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
+       unsigned long opts ));
 
-LDAPFUNCDECL int
-ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry,
+LDAP_F( int )
+ldap_entry2html LDAP_P(( LDAP *ld,
+       char *buf, LDAPMessage *entry,
        struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
-       writeptype writeproc, void *writeparm, char *eol, int rdncount,
-       unsigned long opts, char *urlprefix, char *base );
-
-LDAPFUNCDECL int
-ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
-       unsigned long syntaxid, writeptype writeproc, void *writeparm,
-       char *eol, int rdncount, char *urlprefix );
-
-LDAPFUNCDECL int
-ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
+       ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
+       unsigned long opts, char *urlprefix, char *base ));
+
+LDAP_F( int )
+ldap_vals2html LDAP_P(( LDAP *ld,
+       char *buf, char **vals, char *label, int labelwidth,
+       unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
+       char *eol, int rdncount, char *urlprefix ));
+
+LDAP_F( int )
+ldap_entry2html_search LDAP_P(( LDAP
+       *ld, char *dn, char *base, LDAPMessage *entry,
        struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
-       writeptype writeproc, void *writeparm, char *eol, int rdncount,
-       unsigned long opts, char *urlprefix );
-#endif /* !NEEDPROTOS */
-
+       ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
+       unsigned long opts, char *urlprefix ));
 
-#ifdef __cplusplus
-}
-#endif
+LDAP_END_DECL
 #endif /* _DISPTMPL_H */