]> git.xolatile.top Git - public-libhl.git/commitdiff
formatting
authoranon <anon@anon.anon>
Thu, 24 Aug 2023 13:19:35 +0000 (15:19 +0200)
committeranon <anon@anon.anon>
Thu, 24 Aug 2023 13:19:35 +0000 (15:19 +0200)
source/regex.c

index af8b24ab7b6ad0f833b30b316b27a63f78fb3b67..6fdca64312ba2629080546f8f96d457108aed229 100644 (file)
@@ -7,7 +7,9 @@
 #include <assert.h>
 #include <string.h>
 
+// ------------------
 // ### Char tests ###
+// ------------------
 static bool is_quantifier(const char c) {
        for (const char * s = "+*?"; *s != '\00'; s++) {
                if (*s == c) {
@@ -31,7 +33,9 @@ bool is_magic(const char c) {
 
 
 
+// ----------------------
 // ### Internal Types ###
+// ----------------------
 typedef struct {
        int in;
        char input;
@@ -45,7 +49,9 @@ typedef struct {
 
 
 
+// ----------------------------------
 // ### Regex creation/destruction ###
+// ----------------------------------
 static int escape_1_to_1(const char c, char * whitelist) {
        switch(c) {
                case 't': {
@@ -327,8 +333,9 @@ int regex_free(regex_t * const regex) {
 
 
 
+// -----------------
 // ### Searching ###
-
+// -----------------
 static bool regex_assert(const regex_t * const  regex,
                          const char    * const string,
                                               int              state) {