]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/charset.c
Remove a few typos in comments
[openldap] / libraries / libldap / charset.c
index 8371c62e3b172803d6be23bd3796959333b76587..5a324ed2df7c6e09777caf1b148c4cdfed0bb31a 100644 (file)
@@ -1,4 +1,8 @@
 /*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+/*  Portions
  *  Copyright (c) 1995 Regents of the University of Michigan.
  *  All rights reserved.
  *
@@ -9,10 +13,6 @@
 
 #ifdef STR_TRANSLATION
 
-#ifndef lint 
-static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of Michigan.\nAll rights reserved.\n";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -24,8 +24,6 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of
 #include <sys/param.h>
 #endif
 
-#include "lber.h"
-#include "ldap.h"
 #include "ldap-int.h"
 
 
@@ -41,7 +39,7 @@ ldap_set_string_translators( LDAP *ld, BERTranslateProc encode_proc,
 void
 ldap_enable_translation( LDAP *ld, LDAPMessage *entry, int enable )
 {
-       char    *optionsp;
+       short   *optionsp;
 
        optionsp = ( entry == NULLMSG ) ? &ld->ld_lberoptions :
            &entry->lm_ber->ber_options;
@@ -58,7 +56,7 @@ int
 ldap_translate_from_t61( LDAP *ld, char **bufp, unsigned long *lenp,
     int free_input )
 {
-       if ( ld->ld_lber_decode_translate_proc == NULL ) {
+       if ( ld->ld_lber_decode_translate_proc == 0 ) {
                return( LDAP_SUCCESS );
        }
            
@@ -70,7 +68,7 @@ int
 ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
     int free_input )
 {
-       if ( ld->ld_lber_encode_translate_proc == NULL ) {
+       if ( ld->ld_lber_encode_translate_proc == 0 ) {
                return( LDAP_SUCCESS );
        }
            
@@ -162,10 +160,12 @@ ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
 typedef unsigned char  Byte;
 typedef struct { Byte  a, b; } Couple;
 
-static Byte *c_to_hh LDAP_P(( Byte *o, Byte c ));
-static Byte *c_to_cc LDAP_P(( Byte *o, Couple *cc, Byte c ));
-static int hh_to_c LDAP_P(( Byte *h ));
-static Byte *cc_to_t61 LDAP_P(( Byte *o, Byte *s ));
+/* Prototypes without LDAP_P():
+ * 'Byte' in definition incompatible with unprototyped declaration. */
+static Byte *c_to_hh   ( Byte *o, Byte c );
+static Byte *c_to_cc   ( Byte *o, Couple *cc, Byte c );
+static int   hh_to_c   ( Byte *h );
+static Byte *cc_to_t61 ( Byte *o, Byte *s );
 
 /*
    Character choosed as base in diacritics alone: NO-BREAK SPACE.
@@ -1676,7 +1676,7 @@ char      *s;
 
   while ( *s ) {
     if ( *s == '\\' ) {
-      if ( (c = hh_to_c( ++s )) != -1 ) {
+      if ( (c = hh_to_c( (Byte *) ++s )) != -1 ) {
        *o++ = c;
        s += 2;
       } else