From cc60686c0df3e653c57f50edf0d72e5180599415 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 2 Jan 2002 21:59:26 +0000 Subject: [PATCH] Renamed parse_numericoid to ldap_int_parse_numericoid since it is no longer static. Moved declaration to ldap-int.h and removed extern from getdn.c --- libraries/libldap/getdn.c | 5 +---- libraries/libldap/ldap-int.h | 5 +++++ libraries/libldap/schema.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 76bc499463..5c3e042ed9 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -27,9 +27,6 @@ #define DC_IN_UFN /* #define PRETTY_ESCAPE */ -/* from libraries/libldap/schema.c */ -extern char * parse_numericoid(const char **sp, int *code, const int flags); - /* parsing/printing routines */ static int str2strval( const char *str, struct berval *val, const char **next, unsigned flags, unsigned *retFlags ); @@ -882,7 +879,7 @@ ldap_str2rdn( const char *str, LDAPRDN **rdn, const char **n, unsigned flags ) case B4OIDATTRTYPE: { int err = LDAP_SUCCESS; - attrType.bv_val = parse_numericoid( &p, &err, + attrType.bv_val = ldap_int_parse_numericoid( &p, &err, LDAP_SCHEMA_SKIP); if ( err != LDAP_SUCCESS ) { diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index e8c7ab08bf..552855e6f8 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -576,6 +576,11 @@ LDAP_F (int) ldap_int_sasl_bind LDAP_P(( LDAP_SASL_INTERACT_PROC *interact, void *defaults )); +/* in schema.c */ +LDAP_F (char *) ldap_int_parse_numericoid LDAP_P(( + const char **sp, + int *code, + const int flags )); /* * in tls.c diff --git a/libraries/libldap/schema.c b/libraries/libldap/schema.c index 5e33d6e1ce..e77f063328 100644 --- a/libraries/libldap/schema.c +++ b/libraries/libldap/schema.c @@ -798,7 +798,7 @@ parse_whsp(const char **sp) /* Parse a sequence of dot-separated decimal strings */ char * -parse_numericoid(const char **sp, int *code, const int flags) +ldap_int_parse_numericoid(const char **sp, int *code, const int flags) { char * res = NULL; const char * start = *sp; @@ -953,7 +953,7 @@ parse_noidlen(const char **sp, int *code, int *len, int allow_quoted) quoted = 1; (*sp)++; } - sval = parse_numericoid(sp, code, 0); + sval = ldap_int_parse_numericoid(sp, code, 0); if ( !sval ) { return NULL; } @@ -1183,7 +1183,7 @@ ldap_str2syntax( LDAP_CONST char * s, } parse_whsp(&ss); - syn->syn_oid = parse_numericoid(&ss,code,0); + syn->syn_oid = ldap_int_parse_numericoid(&ss,code,0); if ( !syn->syn_oid ) { *errp = ss; ldap_syntax_free(syn); @@ -1329,7 +1329,7 @@ ldap_str2matchingrule( LDAP_CONST char * s, parse_whsp(&ss); savepos = ss; - mr->mr_oid = parse_numericoid(&ss,code,flags); + mr->mr_oid = ldap_int_parse_numericoid(&ss,code,flags); if ( !mr->mr_oid ) { if ( flags & LDAP_SCHEMA_ALLOW_NO_OID ) { /* Backtracking */ @@ -1430,7 +1430,7 @@ ldap_str2matchingrule( LDAP_CONST char * s, seen_syntax = 1; parse_whsp(&ss); mr->mr_syntax_oid = - parse_numericoid(&ss,code,flags); + ldap_int_parse_numericoid(&ss,code,flags); if ( !mr->mr_syntax_oid ) { *errp = ss; ldap_matchingrule_free(mr); @@ -1523,7 +1523,7 @@ ldap_str2matchingruleuse( LDAP_CONST char * s, parse_whsp(&ss); savepos = ss; - mru->mru_oid = parse_numericoid(&ss,code,flags); + mru->mru_oid = ldap_int_parse_numericoid(&ss,code,flags); if ( !mru->mru_oid ) { if ( flags & LDAP_SCHEMA_ALLOW_NO_OID ) { /* Backtracking */ @@ -1732,7 +1732,7 @@ ldap_str2attributetype( LDAP_CONST char * s, */ parse_whsp(&ss); savepos = ss; - at->at_oid = parse_numericoid(&ss,code,0); + at->at_oid = ldap_int_parse_numericoid(&ss,code,0); if ( !at->at_oid ) { if ( ( flags & ( LDAP_SCHEMA_ALLOW_NO_OID | LDAP_SCHEMA_ALLOW_OID_MACRO ) ) @@ -2109,7 +2109,7 @@ ldap_str2objectclass( LDAP_CONST char * s, */ parse_whsp(&ss); savepos = ss; - oc->oc_oid = parse_numericoid(&ss,code,0); + oc->oc_oid = ldap_int_parse_numericoid(&ss,code,0); if ( !oc->oc_oid ) { if ( (flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos) ) { /* Backtracking */