From 5a4206ef2ea8cfe7b40d1eac67221f22ce5ecf39 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 11 Apr 2021 23:05:06 +0200 Subject: [PATCH] LibC: Turn regex_t and regmatch_t into typedefs According to POSIX.1-2001 these should be anonymous structs with a typedef. --- Userland/Libraries/LibC/regex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibC/regex.h b/Userland/Libraries/LibC/regex.h index 3aa838eaad..07fda9d889 100644 --- a/Userland/Libraries/LibC/regex.h +++ b/Userland/Libraries/LibC/regex.h @@ -33,9 +33,9 @@ __BEGIN_DECLS typedef ssize_t regoff_t; -struct regex_t { +typedef struct { void* __data; -}; +} regex_t; enum __Regex_Error { __Regex_NoError, @@ -76,11 +76,11 @@ enum ReError { REG_NOMATCH, // regexec() failed to match. }; -struct regmatch_t { +typedef struct { regoff_t rm_so; // byte offset from start of string to start of substring regoff_t rm_eo; // byte offset from start of string of the first character after the end of substring regoff_t rm_cnt; // number of matches -}; +} regmatch_t; enum __RegexAllFlags { __Regex_Global = 1, // All matches (don't return after first match)