]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/acl/Gadgets.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / acl / Gadgets.h
index 792d0fd9ef687d04c0a1db31b8a26bf24092da3b..ca1cb8695741016ddc5536674f8b126cc466d4ab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -10,7 +10,7 @@
 #define SQUID_ACL_GADGETS_H
 
 #include "acl/forward.h"
-#include "err_type.h"
+#include "error/forward.h"
 
 #include <sstream>
 
@@ -33,16 +33,16 @@ void aclDestroyAclList(ACLList **);
 void aclParseAccessLine(const char *directive, ConfigParser &parser, Acl::Tree **);
 /// Parses a single line of a "some context followed by acls" directive (e.g., note n v).
 /// The label parameter identifies the context (for debugging).
-/// \ingroup ACLAPI
-void aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label);
-/// Template to convert various context lables to strings. \ingroup ACLAPI
+/// \returns the number of parsed ACL names
+size_t aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label);
+/// Template to convert various context labels to strings. \ingroup ACLAPI
 template <class Any>
-inline
-void aclParseAclList(ConfigParser &parser, Acl::Tree **tree, const Any any)
+inline size_t
+aclParseAclList(ConfigParser &parser, Acl::Tree **tree, const Any any)
 {
     std::ostringstream buf;
     buf << any;
-    aclParseAclList(parser, tree, buf.str().c_str());
+    return aclParseAclList(parser, tree, buf.str().c_str());
 }
 
 /// \ingroup ACLAPI