]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schemaparse.c
Add ldap_*2name() in <include,libldap>/schema, use them in slapd/schema
[openldap] / servers / slapd / schemaparse.c
index 49d95281f86ff551ff89c55e143a6ab7abc491f2..202329978f0562f97dd957ac2bf56f6b541c8940 100644 (file)
@@ -1,4 +1,8 @@
 /* schemaparse.c - routines to parse config file objectclass definitions */
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 
 #include "portable.h"
 
@@ -29,7 +33,8 @@ static char *err2text[] = {
        "OID or name required",
        "Syntax or superior required",
        "Matchingrule not found",
-       "Syntax not found"
+       "Syntax not found",
+       "Syntax required"
 };
 
 char *
@@ -112,7 +117,7 @@ parse_oc_old(
                        if ( code ) {
                                fprintf( stderr, "%s: line %d: %s %s\n",
                                         fname, lineno, scherr2str(code), *namep);
-                               exit( 1 );
+                               exit( EXIT_FAILURE );
                        }
                        namep++;
                }
@@ -124,7 +129,7 @@ parse_oc_old(
                        if ( code ) {
                                fprintf( stderr, "%s: line %d: %s %s\n",
                                         fname, lineno, scherr2str(code), *namep);
-                               exit( 1 );
+                               exit( EXIT_FAILURE );
                        }
                        namep++;
                }
@@ -134,7 +139,7 @@ parse_oc_old(
        if ( code ) {
                fprintf( stderr, "%s: line %d: %s %s\n",
                         fname, lineno, scherr2str(code), err);
-               exit( 1 );
+               exit( EXIT_FAILURE );
        }
        ldap_memfree(oc);
 }
@@ -160,7 +165,7 @@ parse_oc(
        if ( code ) {
                fprintf( stderr, "%s: line %d: %s %s\n",
                         fname, lineno, scherr2str(code), err);
-               exit( 1 );
+               exit( EXIT_FAILURE );
        }
        ldap_memfree(oc);
 }
@@ -179,7 +184,7 @@ oc_usage( void )
        fprintf( stderr, "  [ \"MUST\" oids ]      ; AttributeTypes\n");
        fprintf( stderr, "  [ \"MAY\" oids ]       ; AttributeTypes\n");
        fprintf( stderr, "whsp \")\"\n");
-       exit( 1 );
+       exit( EXIT_FAILURE );
 }
 
 static void
@@ -188,7 +193,7 @@ oc_usage_old( void )
        fprintf( stderr, "<oc clause> ::= objectclass <ocname>\n" );
        fprintf( stderr, "                [ requires <attrlist> ]\n" );
        fprintf( stderr, "                [ allows <attrlist> ]\n" );
-       exit( 1 );
+       exit( EXIT_FAILURE );
 }
 
 static void
@@ -214,7 +219,7 @@ at_usage( void )
        fprintf( stderr, "                                 ; distributedOperation\n");
        fprintf( stderr, "                                 ; dSAOperation\n");
        fprintf( stderr, "whsp \")\"\n");
-       exit( 1 );
+       exit( EXIT_FAILURE );
 }
 
 void
@@ -238,7 +243,7 @@ parse_at(
        if ( code ) {
                fprintf( stderr, "%s: line %d: %s %s\n",
                         fname, lineno, scherr2str(code), err);
-               exit( 1 );
+               exit( EXIT_FAILURE );
        }
        ldap_memfree(at);
 }