mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibC: Turn regex_t and regmatch_t into typedefs
According to POSIX.1-2001 these should be anonymous structs with a typedef.
This commit is contained in:
parent
546fa8cfb5
commit
5a4206ef2e
1 changed files with 4 additions and 4 deletions
|
@ -33,9 +33,9 @@ __BEGIN_DECLS
|
||||||
|
|
||||||
typedef ssize_t regoff_t;
|
typedef ssize_t regoff_t;
|
||||||
|
|
||||||
struct regex_t {
|
typedef struct {
|
||||||
void* __data;
|
void* __data;
|
||||||
};
|
} regex_t;
|
||||||
|
|
||||||
enum __Regex_Error {
|
enum __Regex_Error {
|
||||||
__Regex_NoError,
|
__Regex_NoError,
|
||||||
|
@ -76,11 +76,11 @@ enum ReError {
|
||||||
REG_NOMATCH, // regexec() failed to match.
|
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_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_eo; // byte offset from start of string of the first character after the end of substring
|
||||||
regoff_t rm_cnt; // number of matches
|
regoff_t rm_cnt; // number of matches
|
||||||
};
|
} regmatch_t;
|
||||||
|
|
||||||
enum __RegexAllFlags {
|
enum __RegexAllFlags {
|
||||||
__Regex_Global = 1, // All matches (don't return after first match)
|
__Regex_Global = 1, // All matches (don't return after first match)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue