Skip to content

libacl

A config library

Types

  • Some opaque types; mirrors internal structure
    1
    2
    3
    4
    typedef struct AclValue AclValue;
    typedef struct AclField AclField;
    typedef struct AclBlock AclBlock;
    typedef struct AclError AclError;
    

Functions

  • Lifecycle (no-op for now)
    int acl_init(void);
    void acl_shutdown(void);
    
  • Parse from file or in-memory string.
    Returns a heap-allocated AclBlock* (linked list of top-level blocks) on success,
    or NULL on failure (in which case an error may have been printed to stderr).
    AclBlock *acl_parse_file(const char *path);
    AclBlock *acl_parse_string(const char *text);
    
  • Resolve references in-place. Returns 1 on success, 0 on failure.
    int acl_resolve_all(AclBlock *root);
    
  • Utilities
    void acl_print(AclBlock *root, FILE *out);
    
  • Free tree returned by parser
    void acl_free(AclBlock *root);