]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schemaparse.c
Add multimaster replication support (ITS#170) based upon
[openldap] / servers / slapd / schemaparse.c
index 385f8f6ab1b1f51592bec436d912954de5b3db81..42aa19d83557391bd6efd384a09beaa513ab68a0 100644 (file)
@@ -23,7 +23,14 @@ static char *err2text[] = {
        "Objectclass not found",
        "Attribute type not found",
        "Duplicate objectclass",
-       "Duplicate attributetype"
+       "Duplicate attributetype",
+       "Duplicate syntax",
+       "Duplicate matchingrule",
+       "OID or name required",
+       "Syntax or superior required",
+       "Matchingrule not found",
+       "Syntax not found",
+       "Syntax required"
 };
 
 char *
@@ -49,7 +56,7 @@ parse_oc_old(
        char            last;
        LDAP_OBJECT_CLASS       *oc;
        int             code;
-       char            *err;
+       const char      *err;
        char            **namep;
 
        oc = (LDAP_OBJECT_CLASS *) ch_calloc( 1, sizeof(LDAP_OBJECT_CLASS) );
@@ -106,7 +113,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++;
                }
@@ -118,7 +125,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++;
                }
@@ -128,7 +135,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);
 }
@@ -142,7 +149,7 @@ parse_oc(
 {
        LDAP_OBJECT_CLASS *oc;
        int             code;
-       char            *err;
+       const char      *err;
 
        oc = ldap_str2objectclass(line,&code,&err);
        if ( !oc ) {
@@ -154,7 +161,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);
 }
@@ -173,7 +180,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
@@ -182,7 +189,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
@@ -208,7 +215,7 @@ at_usage( void )
        fprintf( stderr, "                                 ; distributedOperation\n");
        fprintf( stderr, "                                 ; dSAOperation\n");
        fprintf( stderr, "whsp \")\"\n");
-       exit( 1 );
+       exit( EXIT_FAILURE );
 }
 
 void
@@ -220,7 +227,7 @@ parse_at(
 {
        LDAP_ATTRIBUTE_TYPE *at;
        int             code;
-       char            *err;
+       const char      *err;
 
        at = ldap_str2attributetype(line,&code,&err);
        if ( !at ) {
@@ -232,7 +239,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);
 }