X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdisptmpl.h;h=1ab3449b1b2dfdbaf7b517f4666b2bd12cbf6e86;hb=bc44910534a09b0764081c78ec38b2785aba0394;hp=7c592109b1ac5669cca2e15efcb7f12d3bb8a047;hpb=b978170b1a98751af42e971ee8214492cba307f5;p=openldap diff --git a/include/disptmpl.h b/include/disptmpl.h index 7c592109b1..1ab3449b1b 100644 --- a/include/disptmpl.h +++ b/include/disptmpl.h @@ -1,4 +1,13 @@ /* + * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA + * All rights reserved. + * + * Redistribution and use in source and binary forms 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. * @@ -16,10 +25,9 @@ #ifndef _DISPTMPL_H #define _DISPTMPL_H -#ifdef __cplusplus -extern "C" { -#endif +#include +LDAP_BEGIN_DECL #define LDAP_TEMPLATE_VERSION 1 @@ -221,110 +229,95 @@ struct ldap_disptmpl { #define LDAP_DTMPL_BUFSIZ 8192 -#ifndef NEEDPROTOS - -typedef int (*writeptype)(); +typedef int (*writeptype) LDAP_P(( void *writeparm, char *p, int 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, + long 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 ); + unsigned long opts )); -LDAPFUNCDECL int -ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, +LDAP_F int +ldap_vals2text LDAP_P(( LDAP *ld, + char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount ); + char *eol, int rdncount )); -LDAPFUNCDECL int -ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, +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 ); + 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 ); + unsigned long opts, char *urlprefix, char *base )); -LDAPFUNCDECL int -ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth, +LDAP_F int +ldap_vals2html LDAP_P(( LDAP *ld, + char *buf, char **vals, char *label, int labelwidth, unsigned long syntaxid, writeptype writeproc, void *writeparm, - char *eol, int rdncount, char *urlprefix ); + char *eol, int rdncount, char *urlprefix )); -LDAPFUNCDECL int -ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry, +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 */ - + unsigned long opts, char *urlprefix )); -#ifdef __cplusplus -} -#endif +LDAP_END_DECL #endif /* _DISPTMPL_H */