formatting
This commit is contained in:
parent
f048f4a35f
commit
7ed164201e
@ -7,7 +7,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
// ------------------
|
||||||
// ### Char tests ###
|
// ### Char tests ###
|
||||||
|
// ------------------
|
||||||
static bool is_quantifier(const char c) {
|
static bool is_quantifier(const char c) {
|
||||||
for (const char * s = "+*?"; *s != '\00'; s++) {
|
for (const char * s = "+*?"; *s != '\00'; s++) {
|
||||||
if (*s == c) {
|
if (*s == c) {
|
||||||
@ -31,7 +33,9 @@ bool is_magic(const char c) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------
|
||||||
// ### Internal Types ###
|
// ### Internal Types ###
|
||||||
|
// ----------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int in;
|
int in;
|
||||||
char input;
|
char input;
|
||||||
@ -45,7 +49,9 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------
|
||||||
// ### Regex creation/destruction ###
|
// ### Regex creation/destruction ###
|
||||||
|
// ----------------------------------
|
||||||
static int escape_1_to_1(const char c, char * whitelist) {
|
static int escape_1_to_1(const char c, char * whitelist) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 't': {
|
case 't': {
|
||||||
@ -327,8 +333,9 @@ int regex_free(regex_t * const regex) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -----------------
|
||||||
// ### Searching ###
|
// ### Searching ###
|
||||||
|
// -----------------
|
||||||
static bool regex_assert(const regex_t * const regex,
|
static bool regex_assert(const regex_t * const regex,
|
||||||
const char * const string,
|
const char * const string,
|
||||||
int state) {
|
int state) {
|
||||||
|
Loading…
Reference in New Issue
Block a user