]> git.stg.codes - stg.git/blobdiff - libs/smux/include/stg/constraints.h
Fix compilation.
[stg.git] / libs / smux / include / stg / constraints.h
index 5032345ee475564eeea0240bf73d76ae41139f6f..0bd86a96bf17ee0e532dd04ed16268eb2001aaf2 100644 (file)
@@ -1,9 +1,9 @@
 /*-
- * Copyright (c) 2004, 2006 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
  * Redistribution and modifications are permitted subject to BSD license.
  */
-#ifndef        _ASN1_CONSTRAINTS_VALIDATOR_H_
-#define        _ASN1_CONSTRAINTS_VALIDATOR_H_
+#ifndef        ASN1_CONSTRAINTS_VALIDATOR_H
+#define        ASN1_CONSTRAINTS_VALIDATOR_H
 
 #include <asn_system.h>                /* Platform-dependent types */
 
@@ -25,24 +25,23 @@ struct asn_TYPE_descriptor_s;               /* Forward declaration */
  * This function returns 0 in case all ASN.1 constraints are met
  * and -1 if one or more constraints were failed.
  */
-int
-asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor,
-       const void *struct_ptr, /* Target language's structure */
-       char *errbuf,           /* Returned error description */
-       size_t *errlen          /* Length of the error description */
-       );
+int asn_check_constraints(
+    const struct asn_TYPE_descriptor_s *type_descriptor,
+    const void *struct_ptr, /* Target language's structure */
+    char *errbuf,           /* Returned error description */
+    size_t *errlen          /* Length of the error description */
+);
 
 
 /*
  * Generic type for constraint checking callback,
  * associated with every type descriptor.
  */
-typedef int (asn_constr_check_f)(
-       struct asn_TYPE_descriptor_s *type_descriptor,
-       const void *struct_ptr,
-       asn_app_constraint_failed_f *optional_callback, /* Log the error */
-       void *optional_app_key          /* Opaque key passed to a callback */
-       );
+typedef int(asn_constr_check_f)(
+    const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr,
+    asn_app_constraint_failed_f *optional_callback, /* Log the error */
+    void *optional_app_key /* Opaque key passed to a callback */
+);
 
 /*******************************
  * INTERNALLY USEFUL FUNCTIONS *
@@ -54,10 +53,10 @@ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */
 /*
  * Invoke the callback with a complete error message.
  */
-#define        _ASN_CTFAIL     if(ctfailcb) ctfailcb
+#define        ASN__CTFAIL     if(ctfailcb) ctfailcb
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _ASN1_CONSTRAINTS_VALIDATOR_H_ */
+#endif /* ASN1_CONSTRAINTS_VALIDATOR_H */