Bug 1546364 - Reformat to Google coding style (again) in LDAP. rs=reformat a=jorgk
authorJorg K <jorgk@jorgk.com>
Wed, 06 Nov 2019 18:49:51 +0100
changeset 36391 056d8cc39c8b91c735da616caee4335e5f3d7c4d
parent 36390 ccbcf47c5673534d79f39eeb5058145685f4c839
child 36392 d040a773e7ad648eaca582cb85a88c61fef82d52
push id2523
push usermozilla@jorgk.com
push dateThu, 07 Nov 2019 13:59:32 +0000
treeherdercomm-beta@4c356f38873a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersreformat, jorgk
bugs1546364
Bug 1546364 - Reformat to Google coding style (again) in LDAP. rs=reformat a=jorgk # ignore-this-changeset
ldap/c-sdk/include/disptmpl.h
ldap/c-sdk/include/lber.h
ldap/c-sdk/include/lcache.h
ldap/c-sdk/include/srchpref.h
--- a/ldap/c-sdk/include/disptmpl.h
+++ b/ldap/c-sdk/include/disptmpl.h
@@ -45,188 +45,187 @@
  * 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.
  *
  * disptmpl.h:  display template library defines
  */
 
 #ifndef _DISPTMPL_H
-#  define _DISPTMPL_H
+#define _DISPTMPL_H
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-#  endif
+#endif
 
 /* calling conventions used by library */
-#  ifndef LDAP_CALL
-#    if defined(_WINDOWS) || defined(_WIN32)
-#      define LDAP_C __cdecl
-#      ifndef _WIN32
-#        define __stdcall _far _pascal
-#        define LDAP_CALLBACK _loadds
-#      else
-#        define LDAP_CALLBACK
-#      endif /* _WIN32 */
-#      define LDAP_PASCAL __stdcall
-#      define LDAP_CALL LDAP_PASCAL
-#    else /* _WINDOWS */
-#      define LDAP_C
+#ifndef LDAP_CALL
+#  if defined(_WINDOWS) || defined(_WIN32)
+#    define LDAP_C __cdecl
+#    ifndef _WIN32
+#      define __stdcall _far _pascal
+#      define LDAP_CALLBACK _loadds
+#    else
 #      define LDAP_CALLBACK
-#      define LDAP_PASCAL
-#      define LDAP_CALL
-#    endif /* _WINDOWS */
-#  endif   /* LDAP_CALL */
+#    endif /* _WIN32 */
+#    define LDAP_PASCAL __stdcall
+#    define LDAP_CALL LDAP_PASCAL
+#  else /* _WINDOWS */
+#    define LDAP_C
+#    define LDAP_CALLBACK
+#    define LDAP_PASCAL
+#    define LDAP_CALL
+#  endif /* _WINDOWS */
+#endif   /* LDAP_CALL */
 
-#  define LDAP_TEMPLATE_VERSION 1
+#define LDAP_TEMPLATE_VERSION 1
 
 /*
  * general types of items (confined to most significant byte)
  */
-#  define LDAP_SYN_TYPE_TEXT 0x01000000L
-#  define LDAP_SYN_TYPE_IMAGE 0x02000000L
-#  define LDAP_SYN_TYPE_BOOLEAN 0x04000000L
-#  define LDAP_SYN_TYPE_BUTTON 0x08000000L
-#  define LDAP_SYN_TYPE_ACTION 0x10000000L
+#define LDAP_SYN_TYPE_TEXT 0x01000000L
+#define LDAP_SYN_TYPE_IMAGE 0x02000000L
+#define LDAP_SYN_TYPE_BOOLEAN 0x04000000L
+#define LDAP_SYN_TYPE_BUTTON 0x08000000L
+#define LDAP_SYN_TYPE_ACTION 0x10000000L
 
 /*
  * syntax options (confined to second most significant byte)
  */
-#  define LDAP_SYN_OPT_DEFER 0x00010000L
+#define LDAP_SYN_OPT_DEFER 0x00010000L
 
 /*
  * display template item syntax ids (defined by common agreement)
  * these are the valid values for the ti_syntaxid of the tmplitem
  * struct (defined below).  A general type is encoded in the
  * most-significant 8 bits, and some options are encoded in the next
  * 8 bits.  The lower 16 bits are reserved for the distinct types.
  */
-#  define LDAP_SYN_CASEIGNORESTR (1 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_MULTILINESTR (2 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_DN (3 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_BOOLEAN (4 | LDAP_SYN_TYPE_BOOLEAN)
-#  define LDAP_SYN_JPEGIMAGE (5 | LDAP_SYN_TYPE_IMAGE)
-#  define LDAP_SYN_JPEGBUTTON (6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
-#  define LDAP_SYN_FAXIMAGE (7 | LDAP_SYN_TYPE_IMAGE)
-#  define LDAP_SYN_FAXBUTTON (8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
-#  define LDAP_SYN_AUDIOBUTTON (9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
-#  define LDAP_SYN_TIME (10 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_DATE (11 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_LABELEDURL (12 | LDAP_SYN_TYPE_TEXT)
-#  define LDAP_SYN_SEARCHACTION (13 | LDAP_SYN_TYPE_ACTION)
-#  define LDAP_SYN_LINKACTION (14 | LDAP_SYN_TYPE_ACTION)
-#  define LDAP_SYN_ADDDNACTION (15 | LDAP_SYN_TYPE_ACTION)
-#  define LDAP_SYN_VERIFYDNACTION (16 | LDAP_SYN_TYPE_ACTION)
-#  define LDAP_SYN_RFC822ADDR (17 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_CASEIGNORESTR (1 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_MULTILINESTR (2 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_DN (3 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_BOOLEAN (4 | LDAP_SYN_TYPE_BOOLEAN)
+#define LDAP_SYN_JPEGIMAGE (5 | LDAP_SYN_TYPE_IMAGE)
+#define LDAP_SYN_JPEGBUTTON (6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
+#define LDAP_SYN_FAXIMAGE (7 | LDAP_SYN_TYPE_IMAGE)
+#define LDAP_SYN_FAXBUTTON (8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
+#define LDAP_SYN_AUDIOBUTTON (9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
+#define LDAP_SYN_TIME (10 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_DATE (11 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_LABELEDURL (12 | LDAP_SYN_TYPE_TEXT)
+#define LDAP_SYN_SEARCHACTION (13 | LDAP_SYN_TYPE_ACTION)
+#define LDAP_SYN_LINKACTION (14 | LDAP_SYN_TYPE_ACTION)
+#define LDAP_SYN_ADDDNACTION (15 | LDAP_SYN_TYPE_ACTION)
+#define LDAP_SYN_VERIFYDNACTION (16 | LDAP_SYN_TYPE_ACTION)
+#define LDAP_SYN_RFC822ADDR (17 | LDAP_SYN_TYPE_TEXT)
 
 /*
  * handy macros
  */
-#  define LDAP_GET_SYN_TYPE(syid) ((syid)&0xFF000000UL)
-#  define LDAP_GET_SYN_OPTIONS(syid) ((syid)&0x00FF0000UL)
+#define LDAP_GET_SYN_TYPE(syid) ((syid)&0xFF000000UL)
+#define LDAP_GET_SYN_OPTIONS(syid) ((syid)&0x00FF0000UL)
 
 /*
  * display options for output routines (used by entry2text and friends)
  */
 /*
  * use calculated label width (based on length of longest label in
  * template) instead of constant width
  */
-#  define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001L
-#  define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002L
+#define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001L
+#define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002L
 
 /*
  * perform search actions (applies to ldap_entry2text_search only)
  */
-#  define LDAP_DISP_OPT_DOSEARCHACTIONS 0x00000002L
+#define LDAP_DISP_OPT_DOSEARCHACTIONS 0x00000002L
 
 /*
  * include additional info. relevant to "non leaf" entries only
  * used by ldap_entry2html and ldap_entry2html_search to include "Browse"
  * and "Move Up" HREFs
  */
-#  define LDAP_DISP_OPT_NONLEAF 0x00000004L
+#define LDAP_DISP_OPT_NONLEAF 0x00000004L
 
 /*
  * display template item options (may not apply to all types)
  * if this bit is set in ti_options, it applies.
  */
-#  define LDAP_DITEM_OPT_READONLY 0x00000001L
-#  define LDAP_DITEM_OPT_SORTVALUES 0x00000002L
-#  define LDAP_DITEM_OPT_SINGLEVALUED 0x00000004L
-#  define LDAP_DITEM_OPT_HIDEIFEMPTY 0x00000008L
-#  define LDAP_DITEM_OPT_VALUEREQUIRED 0x00000010L
-#  define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */
+#define LDAP_DITEM_OPT_READONLY 0x00000001L
+#define LDAP_DITEM_OPT_SORTVALUES 0x00000002L
+#define LDAP_DITEM_OPT_SINGLEVALUED 0x00000004L
+#define LDAP_DITEM_OPT_HIDEIFEMPTY 0x00000008L
+#define LDAP_DITEM_OPT_VALUEREQUIRED 0x00000010L
+#define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */
 
 /*
  * display template item structure
  */
 struct ldap_tmplitem {
   unsigned long ti_syntaxid;
   unsigned long ti_options;
   char *ti_attrname;
   char *ti_label;
   char **ti_args;
   struct ldap_tmplitem *ti_next_in_row;
   struct ldap_tmplitem *ti_next_in_col;
   void *ti_appdata;
 };
 
-#  define NULLTMPLITEM ((struct ldap_tmplitem *)0)
+#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
 
-#  define LDAP_SET_TMPLITEM_APPDATA(ti, datap) \
-    (ti)->ti_appdata = (void *)(datap)
+#define LDAP_SET_TMPLITEM_APPDATA(ti, datap) (ti)->ti_appdata = (void *)(datap)
 
-#  define LDAP_GET_TMPLITEM_APPDATA(ti, type) (type)((ti)->ti_appdata)
+#define LDAP_GET_TMPLITEM_APPDATA(ti, type) (type)((ti)->ti_appdata)
 
-#  define LDAP_IS_TMPLITEM_OPTION_SET(ti, option) \
-    (((ti)->ti_options & option) != 0)
+#define LDAP_IS_TMPLITEM_OPTION_SET(ti, option) \
+  (((ti)->ti_options & option) != 0)
 
 /*
  * object class array structure
  */
 struct ldap_oclist {
   char **oc_objclasses;
   struct ldap_oclist *oc_next;
 };
 
-#  define NULLOCLIST ((struct ldap_oclist *)0)
+#define NULLOCLIST ((struct ldap_oclist *)0)
 
 /*
  * add defaults list
  */
 struct ldap_adddeflist {
   int ad_source;
-#  define LDAP_ADSRC_CONSTANTVALUE 1
-#  define LDAP_ADSRC_ADDERSDN 2
+#define LDAP_ADSRC_CONSTANTVALUE 1
+#define LDAP_ADSRC_ADDERSDN 2
   char *ad_attrname;
   char *ad_value;
   struct ldap_adddeflist *ad_next;
 };
 
-#  define NULLADLIST ((struct ldap_adddeflist *)0)
+#define NULLADLIST ((struct ldap_adddeflist *)0)
 
 /*
  * display template global options
  * if this bit is set in dt_options, it applies.
  */
 /*
  * users should be allowed to try to add objects of these entries
  */
-#  define LDAP_DTMPL_OPT_ADDABLE 0x00000001L
+#define LDAP_DTMPL_OPT_ADDABLE 0x00000001L
 
 /*
  * users should be allowed to do "modify RDN" operation of these entries
  */
-#  define LDAP_DTMPL_OPT_ALLOWMODRDN 0x00000002L
+#define LDAP_DTMPL_OPT_ALLOWMODRDN 0x00000002L
 
 /*
  * this template is an alternate view, not a primary view
  */
-#  define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L
+#define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L
 
 /*
  * display template structure
  */
 struct ldap_disptmpl {
   char *dt_name;
   char *dt_pluralname;
   char *dt_iconname;
@@ -236,35 +235,34 @@ struct ldap_disptmpl {
   char *dt_defaddlocation;
   struct ldap_oclist *dt_oclist;
   struct ldap_adddeflist *dt_adddeflist;
   struct ldap_tmplitem *dt_items;
   void *dt_appdata;
   struct ldap_disptmpl *dt_next;
 };
 
-#  define NULLDISPTMPL ((struct ldap_disptmpl *)0)
+#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
 
-#  define LDAP_SET_DISPTMPL_APPDATA(dt, datap) \
-    (dt)->dt_appdata = (void *)(datap)
+#define LDAP_SET_DISPTMPL_APPDATA(dt, datap) (dt)->dt_appdata = (void *)(datap)
 
-#  define LDAP_GET_DISPTMPL_APPDATA(dt, type) (type)((dt)->dt_appdata)
+#define LDAP_GET_DISPTMPL_APPDATA(dt, type) (type)((dt)->dt_appdata)
 
-#  define LDAP_IS_DISPTMPL_OPTION_SET(dt, option) \
-    (((dt)->dt_options & option) != 0)
+#define LDAP_IS_DISPTMPL_OPTION_SET(dt, option) \
+  (((dt)->dt_options & option) != 0)
 
-#  define LDAP_TMPL_ERR_VERSION 1
-#  define LDAP_TMPL_ERR_MEM 2
-#  define LDAP_TMPL_ERR_SYNTAX 3
-#  define LDAP_TMPL_ERR_FILE 4
+#define LDAP_TMPL_ERR_VERSION 1
+#define LDAP_TMPL_ERR_MEM 2
+#define LDAP_TMPL_ERR_SYNTAX 3
+#define LDAP_TMPL_ERR_FILE 4
 
 /*
  * buffer size needed for entry2text and vals2text
  */
-#  define LDAP_DTMPL_BUFSIZ 8192
+#define LDAP_DTMPL_BUFSIZ 8192
 
 typedef int (*writeptype)(void *writeparm, char *p, int len);
 
 LDAP_API(int)
 LDAP_CALL
 ldap_init_templates(char *file, struct ldap_disptmpl **tmpllistp);
 
 LDAP_API(int)
@@ -354,12 +352,12 @@ ldap_entry2html_search(LDAP *ld, char *d
                        char ***defvals, writeptype writeproc, void *writeparm,
                        char *eol, int rdncount, unsigned long opts,
                        char *urlprefix);
 
 LDAP_API(char *)
 LDAP_CALL
 ldap_tmplerr2string(int err);
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 }
-#  endif
+#endif
 #endif /* _DISPTMPL_H */
--- a/ldap/c-sdk/include/lber.h
+++ b/ldap/c-sdk/include/lber.h
@@ -31,152 +31,152 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 /* lber.h - header file for ber_* functions */
 #ifndef _LBER_H
-#  define _LBER_H
+#define _LBER_H
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-#  endif
+#endif
 
-#  include <stdlib.h> /* to pick up size_t typedef */
+#include <stdlib.h> /* to pick up size_t typedef */
 
 /*
  * Note that LBER_ERROR and LBER_DEFAULT are values that can never appear
  * as valid BER tags, and so it is safe to use them to report errors.  In
  * fact, any tag for which the following is true is invalid:
  *     (( tag & 0x00000080 ) != 0 ) && (( tag & 0xFFFFFF00 ) != 0 )
  */
-#  define LBER_ERROR ((ber_tag_t)-1)           /* 0xffffffffU */
-#  define LBER_DEFAULT ((ber_tag_t)-1)         /* 0xffffffffU */
-#  define LBER_END_OF_SEQORSET ((ber_tag_t)-2) /* 0xfffffffeU */
-#  define LBER_OVERFLOW ((ber_tag_t)-3)        /* 0xfffffffdU */
+#define LBER_ERROR ((ber_tag_t)-1)           /* 0xffffffffU */
+#define LBER_DEFAULT ((ber_tag_t)-1)         /* 0xffffffffU */
+#define LBER_END_OF_SEQORSET ((ber_tag_t)-2) /* 0xfffffffeU */
+#define LBER_OVERFLOW ((ber_tag_t)-3)        /* 0xfffffffdU */
 
 /* BER classes and mask */
-#  define LBER_CLASS_UNIVERSAL 0x00
-#  define LBER_CLASS_APPLICATION 0x40
-#  define LBER_CLASS_CONTEXT 0x80
-#  define LBER_CLASS_PRIVATE 0xc0
-#  define LBER_CLASS_MASK 0xc0
+#define LBER_CLASS_UNIVERSAL 0x00
+#define LBER_CLASS_APPLICATION 0x40
+#define LBER_CLASS_CONTEXT 0x80
+#define LBER_CLASS_PRIVATE 0xc0
+#define LBER_CLASS_MASK 0xc0
 
 /* BER encoding type and mask */
-#  define LBER_PRIMITIVE 0x00
-#  define LBER_CONSTRUCTED 0x20
-#  define LBER_ENCODING_MASK 0x20
+#define LBER_PRIMITIVE 0x00
+#define LBER_CONSTRUCTED 0x20
+#define LBER_ENCODING_MASK 0x20
 
-#  define LBER_BIG_TAG_MASK 0x1f
-#  define LBER_MORE_TAG_MASK 0x80
+#define LBER_BIG_TAG_MASK 0x1f
+#define LBER_MORE_TAG_MASK 0x80
 
 /* general BER types we know about */
-#  define LBER_BOOLEAN 0x01
-#  define LBER_INTEGER 0x02
-#  define LBER_BITSTRING 0x03
-#  define LBER_OCTETSTRING 0x04
-#  define LBER_NULL 0x05
-#  define LBER_ENUMERATED 0x0a
-#  define LBER_SEQUENCE 0x30
-#  define LBER_SET 0x31
+#define LBER_BOOLEAN 0x01
+#define LBER_INTEGER 0x02
+#define LBER_BITSTRING 0x03
+#define LBER_OCTETSTRING 0x04
+#define LBER_NULL 0x05
+#define LBER_ENUMERATED 0x0a
+#define LBER_SEQUENCE 0x30
+#define LBER_SET 0x31
 
 /* BerElement set/get options */
-#  define LBER_OPT_REMAINING_BYTES 0x01
-#  define LBER_OPT_TOTAL_BYTES 0x02
-#  define LBER_OPT_USE_DER 0x04
-#  define LBER_OPT_TRANSLATE_STRINGS 0x08
-#  define LBER_OPT_BYTES_TO_WRITE 0x10
-#  define LBER_OPT_MEMALLOC_FN_PTRS 0x20
-#  define LBER_OPT_DEBUG_LEVEL 0x40
-#  define LBER_OPT_BUFSIZE 0x80
+#define LBER_OPT_REMAINING_BYTES 0x01
+#define LBER_OPT_TOTAL_BYTES 0x02
+#define LBER_OPT_USE_DER 0x04
+#define LBER_OPT_TRANSLATE_STRINGS 0x08
+#define LBER_OPT_BYTES_TO_WRITE 0x10
+#define LBER_OPT_MEMALLOC_FN_PTRS 0x20
+#define LBER_OPT_DEBUG_LEVEL 0x40
+#define LBER_OPT_BUFSIZE 0x80
 
 /*
  * LBER_USE_DER is defined for compatibility with the C LDAP API RFC.
  * In our implementation, we recognize it (instead of the numerically
  * identical LBER_OPT_REMAINING_BYTES) in calls to ber_alloc_t() and
  * ber_init_w_nullchar() only.  Callers of ber_set_option() or
  * ber_get_option() must use LBER_OPT_USE_DER instead.  Sorry!
  */
-#  define LBER_USE_DER 0x01
+#define LBER_USE_DER 0x01
 
 /* Sockbuf set/get options */
-#  define LBER_SOCKBUF_OPT_TO_FILE 0x001
-#  define LBER_SOCKBUF_OPT_TO_FILE_ONLY 0x002
-#  define LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE 0x004
-#  define LBER_SOCKBUF_OPT_NO_READ_AHEAD 0x008
-#  define LBER_SOCKBUF_OPT_DESC 0x010
-#  define LBER_SOCKBUF_OPT_COPYDESC 0x020
-#  define LBER_SOCKBUF_OPT_READ_FN 0x040
-#  define LBER_SOCKBUF_OPT_WRITE_FN 0x080
-#  define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100
-#  define LBER_SOCKBUF_OPT_VALID_TAG 0x200
-#  define LBER_SOCKBUF_OPT_SOCK_ARG 0x400
+#define LBER_SOCKBUF_OPT_TO_FILE 0x001
+#define LBER_SOCKBUF_OPT_TO_FILE_ONLY 0x002
+#define LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE 0x004
+#define LBER_SOCKBUF_OPT_NO_READ_AHEAD 0x008
+#define LBER_SOCKBUF_OPT_DESC 0x010
+#define LBER_SOCKBUF_OPT_COPYDESC 0x020
+#define LBER_SOCKBUF_OPT_READ_FN 0x040
+#define LBER_SOCKBUF_OPT_WRITE_FN 0x080
+#define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100
+#define LBER_SOCKBUF_OPT_VALID_TAG 0x200
+#define LBER_SOCKBUF_OPT_SOCK_ARG 0x400
 
-#  define LBER_OPT_ON ((void *)1)
-#  define LBER_OPT_OFF ((void *)0)
+#define LBER_OPT_ON ((void *)1)
+#define LBER_OPT_OFF ((void *)0)
 
 typedef unsigned int ber_len_t;  /* for BER len */
 typedef unsigned int ber_tag_t;  /* for BER tags */
 typedef int ber_int_t;           /* for BER ints, enums, and Booleans */
 typedef unsigned int ber_uint_t; /* unsigned equivalent of ber_int_t */
 typedef int ber_slen_t;          /* signed equivalent of ber_len_t */
 
 typedef struct berval {
   ber_len_t bv_len;
   char *bv_val;
 } BerValue;
 
 typedef struct berelement BerElement;
 typedef struct sockbuf Sockbuf;
 typedef int (*BERTranslateProc)(char **bufp, ber_uint_t *buflenp,
                                 int free_input);
-#  ifndef macintosh
-#    if defined(_WINDOWS) || defined(_WIN32) || defined(_CONSOLE)
-#      include <winsock.h> /* for SOCKET */
+#ifndef macintosh
+#  if defined(_WINDOWS) || defined(_WIN32) || defined(_CONSOLE)
+#    include <winsock.h> /* for SOCKET */
 typedef SOCKET LBER_SOCKET;
-#    else
+#  else
 typedef long LBER_SOCKET;
-#    endif /* _WINDOWS */
-#  else    /* macintosh */
+#  endif /* _WINDOWS */
+#else    /* macintosh */
 typedef void *LBER_SOCKET;
-#  endif   /* macintosh */
+#endif   /* macintosh */
 
 /* calling conventions used by library */
-#  ifndef LDAP_CALL
-#    if defined(_WINDOWS) || defined(_WIN32)
-#      define LDAP_C __cdecl
-#      ifndef _WIN32
-#        define __stdcall _far _pascal
-#        define LDAP_CALLBACK _loadds
-#      else
-#        define LDAP_CALLBACK
-#      endif /* _WIN32 */
-#      define LDAP_PASCAL __stdcall
-#      define LDAP_CALL LDAP_PASCAL
-#    else /* _WINDOWS */
-#      define LDAP_C
+#ifndef LDAP_CALL
+#  if defined(_WINDOWS) || defined(_WIN32)
+#    define LDAP_C __cdecl
+#    ifndef _WIN32
+#      define __stdcall _far _pascal
+#      define LDAP_CALLBACK _loadds
+#    else
 #      define LDAP_CALLBACK
-#      define LDAP_PASCAL
-#      define LDAP_CALL
-#    endif /* _WINDOWS */
-#  endif   /* LDAP_CALL */
+#    endif /* _WIN32 */
+#    define LDAP_PASCAL __stdcall
+#    define LDAP_CALL LDAP_PASCAL
+#  else /* _WINDOWS */
+#    define LDAP_C
+#    define LDAP_CALLBACK
+#    define LDAP_PASCAL
+#    define LDAP_CALL
+#  endif /* _WINDOWS */
+#endif   /* LDAP_CALL */
 
 /*
  * function prototypes for lber library
  */
 
-#  ifndef LDAP_API
-#    if defined(_WINDOWS) || defined(_WIN32)
-#      define LDAP_API(rt) rt
-#    else /* _WINDOWS */
-#      define LDAP_API(rt) rt
-#    endif /* _WINDOWS */
-#  endif   /* LDAP_API */
+#ifndef LDAP_API
+#  if defined(_WINDOWS) || defined(_WIN32)
+#    define LDAP_API(rt) rt
+#  else /* _WINDOWS */
+#    define LDAP_API(rt) rt
+#  endif /* _WINDOWS */
+#endif   /* LDAP_API */
 
 struct lextiof_socket_private;  /* Defined by the extended I/O */
                                 /* callback functions */
 struct lextiof_session_private; /* Defined by the extended I/O */
                                 /* callback functions */
 
 /* This is modeled after the PRIOVec that is passed to the NSPR
    writev function! The void* is a char* in that struct */
@@ -209,17 +209,17 @@ typedef int(LDAP_C LDAP_CALLBACK LDAP_X_
 struct lber_x_ext_io_fns {
   /* lbextiofn_size should always be set to LBER_X_EXTIO_FNS_SIZE */
   int lbextiofn_size;
   LDAP_X_EXTIOF_READ_CALLBACK *lbextiofn_read;
   LDAP_X_EXTIOF_WRITE_CALLBACK *lbextiofn_write;
   struct lextiof_socket_private *lbextiofn_socket_arg;
   LDAP_X_EXTIOF_WRITEV_CALLBACK *lbextiofn_writev;
 };
-#  define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns)
+#define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns)
 
 /*
  * liblber memory allocation callback functions.  These are global to all
  *  Sockbufs and BerElements.  Install your own functions by using a call
  *  like this: ber_set_option( NULL, LBER_OPT_MEMALLOC_FN_PTRS, &memalloc_fns );
  */
 typedef void *(LDAP_C LDAP_CALLBACK LDAP_MALLOC_CALLBACK)(size_t size);
 typedef void *(LDAP_C LDAP_CALLBACK LDAP_CALLOC_CALLBACK)(size_t nelem,
@@ -329,12 +329,12 @@ LDAP_API(int)
 LDAP_CALL ber_get_option(BerElement *ber, int option, void *value);
 LDAP_API(Sockbuf *) LDAP_CALL ber_sockbuf_alloc(void);
 LDAP_API(void) LDAP_CALL ber_sockbuf_free(Sockbuf *p);
 LDAP_API(int)
 LDAP_CALL ber_sockbuf_set_option(Sockbuf *sb, int option, void *value);
 LDAP_API(int)
 LDAP_CALL ber_sockbuf_get_option(Sockbuf *sb, int option, void *value);
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 }
-#  endif
+#endif
 #endif /* _LBER_H */
--- a/ldap/c-sdk/include/lcache.h
+++ b/ldap/c-sdk/include/lcache.h
@@ -32,41 +32,41 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 /* lcache.h - ldap persistent cache */
 #ifndef _LCACHE_H
-#  define _LCACHE_H
+#define _LCACHE_H
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-#  endif
+#endif
 
 /* calling conventions used by library */
-#  ifndef LDAP_CALL
-#    if defined(_WINDOWS) || defined(_WIN32)
-#      define LDAP_C __cdecl
-#      ifndef _WIN32
-#        define __stdcall _far _pascal
-#        define LDAP_CALLBACK _loadds
-#      else
-#        define LDAP_CALLBACK
-#      endif /* _WIN32 */
-#      define LDAP_PASCAL __stdcall
-#      define LDAP_CALL LDAP_PASCAL
-#    else /* _WINDOWS */
-#      define LDAP_C
+#ifndef LDAP_CALL
+#  if defined(_WINDOWS) || defined(_WIN32)
+#    define LDAP_C __cdecl
+#    ifndef _WIN32
+#      define __stdcall _far _pascal
+#      define LDAP_CALLBACK _loadds
+#    else
 #      define LDAP_CALLBACK
-#      define LDAP_PASCAL
-#      define LDAP_CALL
-#    endif /* _WINDOWS */
-#  endif   /* LDAP_CALL */
+#    endif /* _WIN32 */
+#    define LDAP_PASCAL __stdcall
+#    define LDAP_CALL LDAP_PASCAL
+#  else /* _WINDOWS */
+#    define LDAP_C
+#    define LDAP_CALLBACK
+#    define LDAP_PASCAL
+#    define LDAP_CALL
+#  endif /* _WINDOWS */
+#endif   /* LDAP_CALL */
 
 LDAP_API(int) LDAP_C lcache_init(LDAP *ld, void *arg);
 LDAP_API(int)
 LDAP_C lcache_bind(LDAP *ld, int msgid, unsigned long tag, const char *dn,
                    struct berval *cred, int method);
 LDAP_API(int) LDAP_C lcache_unbind(LDAP *ld, int msgid, unsigned long tag);
 LDAP_API(int)
 LDAP_C
@@ -90,13 +90,13 @@ LDAP_C lcache_modify(LDAP *ld, int msgid
 LDAP_API(int)
 LDAP_C lcache_modrdn(LDAP *ld, int msgid, unsigned long tag, const char *dn,
                      const char *newrdn, int deleteoldrdn);
 LDAP_API(int)
 LDAP_C lcache_result(LDAP *ld, int msgid, int all, struct timeval *timeout,
                      LDAPMessage **result);
 LDAP_API(int) LDAP_C lcache_flush(LDAP *ld, char *dn, char *filter);
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 }
-#  endif
+#endif
 
 #endif /* _LCACHE_H */
--- a/ldap/c-sdk/include/srchpref.h
+++ b/ldap/c-sdk/include/srchpref.h
@@ -45,41 +45,41 @@
  * 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.
  *
  * searchpref.h:  display template library defines
  */
 
 #ifndef _SRCHPREF_H
-#  define _SRCHPREF_H
+#define _SRCHPREF_H
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
-#  endif
+#endif
 
 /* calling conventions used by library */
-#  ifndef LDAP_CALL
-#    if defined(_WINDOWS) || defined(_WIN32)
-#      define LDAP_C __cdecl
-#      ifndef _WIN32
-#        define __stdcall _far _pascal
-#        define LDAP_CALLBACK _loadds
-#      else
-#        define LDAP_CALLBACK
-#      endif /* _WIN32 */
-#      define LDAP_PASCAL __stdcall
-#      define LDAP_CALL LDAP_PASCAL
-#    else /* _WINDOWS */
-#      define LDAP_C
+#ifndef LDAP_CALL
+#  if defined(_WINDOWS) || defined(_WIN32)
+#    define LDAP_C __cdecl
+#    ifndef _WIN32
+#      define __stdcall _far _pascal
+#      define LDAP_CALLBACK _loadds
+#    else
 #      define LDAP_CALLBACK
-#      define LDAP_PASCAL
-#      define LDAP_CALL
-#    endif /* _WINDOWS */
-#  endif   /* LDAP_CALL */
+#    endif /* _WIN32 */
+#    define LDAP_PASCAL __stdcall
+#    define LDAP_CALL LDAP_PASCAL
+#  else /* _WINDOWS */
+#    define LDAP_C
+#    define LDAP_CALLBACK
+#    define LDAP_PASCAL
+#    define LDAP_CALL
+#  endif /* _WINDOWS */
+#endif   /* LDAP_CALL */
 
 struct ldap_searchattr {
   char *sa_attrlabel;
   char *sa_attr;
   /* max 32 matchtypes for now */
   unsigned long sa_matchtypebitmap;
   char *sa_selectattr;
   char *sa_selecttext;
@@ -101,33 +101,33 @@ struct ldap_searchobj {
   char *so_filtertag;
   char *so_defaultselectattr;
   char *so_defaultselecttext;
   struct ldap_searchattr *so_salist;
   struct ldap_searchmatch *so_smlist;
   struct ldap_searchobj *so_next;
 };
 
-#  define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
+#define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
 
 /*
  * global search object options
  */
-#  define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
+#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
 
-#  define LDAP_IS_SEARCHOBJ_OPTION_SET(so, option) \
-    (((so)->so_options & option) != 0)
+#define LDAP_IS_SEARCHOBJ_OPTION_SET(so, option) \
+  (((so)->so_options & option) != 0)
 
-#  define LDAP_SEARCHPREF_VERSION_ZERO 0
-#  define LDAP_SEARCHPREF_VERSION 1
+#define LDAP_SEARCHPREF_VERSION_ZERO 0
+#define LDAP_SEARCHPREF_VERSION 1
 
-#  define LDAP_SEARCHPREF_ERR_VERSION 1
-#  define LDAP_SEARCHPREF_ERR_MEM 2
-#  define LDAP_SEARCHPREF_ERR_SYNTAX 3
-#  define LDAP_SEARCHPREF_ERR_FILE 4
+#define LDAP_SEARCHPREF_ERR_VERSION 1
+#define LDAP_SEARCHPREF_ERR_MEM 2
+#define LDAP_SEARCHPREF_ERR_SYNTAX 3
+#define LDAP_SEARCHPREF_ERR_FILE 4
 
 LDAP_API(int)
 LDAP_CALL
 ldap_init_searchprefs(char *file, struct ldap_searchobj **solistp);
 
 LDAP_API(int)
 LDAP_CALL
 ldap_init_searchprefs_buf(char *buf, long buflen,
@@ -140,12 +140,12 @@ ldap_free_searchprefs(struct ldap_search
 LDAP_API(struct ldap_searchobj *)
 LDAP_CALL
 ldap_first_searchobj(struct ldap_searchobj *solist);
 
 LDAP_API(struct ldap_searchobj *)
 LDAP_CALL
 ldap_next_searchobj(struct ldap_searchobj *sollist, struct ldap_searchobj *so);
 
-#  ifdef __cplusplus
+#ifdef __cplusplus
 }
-#  endif
+#endif
 #endif /* _SRCHPREF_H */