Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3e48c661
Commit
3e48c661
authored
May 05, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code to work when isalpha and friends are macros, not functions.
parent
72a3902a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
8 deletions
+63
-8
src/backend/regex/regcomp.c
src/backend/regex/regcomp.c
+63
-8
No files found.
src/backend/regex/regcomp.c
View file @
3e48c661
...
@@ -124,8 +124,13 @@ static void findmust(struct parse * p, struct re_guts * g);
...
@@ -124,8 +124,13 @@ static void findmust(struct parse * p, struct re_guts * g);
static
sopno
pluscount
(
struct
parse
*
p
,
struct
re_guts
*
g
);
static
sopno
pluscount
(
struct
parse
*
p
,
struct
re_guts
*
g
);
static
int
pg_isdigit
(
int
c
);
static
int
pg_isdigit
(
int
c
);
static
int
pg_isalpha
(
int
c
);
static
int
pg_isalpha
(
int
c
);
static
int
pg_isalnum
(
int
c
);
static
int
pg_isupper
(
int
c
);
static
int
pg_isupper
(
int
c
);
static
int
pg_islower
(
int
c
);
static
int
pg_islower
(
int
c
);
static
int
pg_iscntrl
(
int
c
);
static
int
pg_isgraph
(
int
c
);
static
int
pg_isprint
(
int
c
);
static
int
pg_ispunct
(
int
c
);
static
pg_wchar
nuls
[
10
];
/* place to point scanner in event of
static
pg_wchar
nuls
[
10
];
/* place to point scanner in event of
* error */
* error */
...
@@ -1709,6 +1714,16 @@ pg_isalpha(int c)
...
@@ -1709,6 +1714,16 @@ pg_isalpha(int c)
#endif
#endif
}
}
static
int
pg_isalnum
(
int
c
)
{
#ifdef MULTIBYTE
return
(
c
>=
0
&&
c
<=
UCHAR_MAX
&&
isalnum
((
unsigned
char
)
c
));
#else
return
(
isalnum
((
unsigned
char
)
c
));
#endif
}
static
int
static
int
pg_isupper
(
int
c
)
pg_isupper
(
int
c
)
{
{
...
@@ -1729,6 +1744,46 @@ pg_islower(int c)
...
@@ -1729,6 +1744,46 @@ pg_islower(int c)
#endif
#endif
}
}
static
int
pg_iscntrl
(
int
c
)
{
#ifdef MULTIBYTE
return
(
c
>=
0
&&
c
<=
UCHAR_MAX
&&
iscntrl
((
unsigned
char
)
c
));
#else
return
(
iscntrl
((
unsigned
char
)
c
));
#endif
}
static
int
pg_isgraph
(
int
c
)
{
#ifdef MULTIBYTE
return
(
c
>=
0
&&
c
<=
UCHAR_MAX
&&
isgraph
((
unsigned
char
)
c
));
#else
return
(
isgraph
((
unsigned
char
)
c
));
#endif
}
static
int
pg_isprint
(
int
c
)
{
#ifdef MULTIBYTE
return
(
c
>=
0
&&
c
<=
UCHAR_MAX
&&
isprint
((
unsigned
char
)
c
));
#else
return
(
isprint
((
unsigned
char
)
c
));
#endif
}
static
int
pg_ispunct
(
int
c
)
{
#ifdef MULTIBYTE
return
(
c
>=
0
&&
c
<=
UCHAR_MAX
&&
ispunct
((
unsigned
char
)
c
));
#else
return
(
ispunct
((
unsigned
char
)
c
));
#endif
}
static
struct
cclass
*
static
struct
cclass
*
cclass_init
(
void
)
cclass_init
(
void
)
{
{
...
@@ -1756,17 +1811,17 @@ cclass_init(void)
...
@@ -1756,17 +1811,17 @@ cclass_init(void)
char
*
chars
;
char
*
chars
;
}
cclass_factories
[]
=
}
cclass_factories
[]
=
{
{
{
"alnum"
,
isalnum
,
NULL
},
{
"alnum"
,
pg_
isalnum
,
NULL
},
{
"alpha"
,
isalpha
,
NULL
},
{
"alpha"
,
pg_
isalpha
,
NULL
},
{
"blank"
,
NULL
,
"
\t
"
},
{
"blank"
,
NULL
,
"
\t
"
},
{
"cntrl"
,
iscntrl
,
NULL
},
{
"cntrl"
,
pg_
iscntrl
,
NULL
},
{
"digit"
,
NULL
,
"0123456789"
},
{
"digit"
,
NULL
,
"0123456789"
},
{
"graph"
,
isgraph
,
NULL
},
{
"graph"
,
pg_
isgraph
,
NULL
},
{
"lower"
,
islower
,
NULL
},
{
"lower"
,
pg_
islower
,
NULL
},
{
"print"
,
isprint
,
NULL
},
{
"print"
,
pg_
isprint
,
NULL
},
{
"punct"
,
ispunct
,
NULL
},
{
"punct"
,
pg_
ispunct
,
NULL
},
{
"space"
,
NULL
,
"
\t\n\v\f\r
"
},
{
"space"
,
NULL
,
"
\t\n\v\f\r
"
},
{
"upper"
,
isupper
,
NULL
},
{
"upper"
,
pg_
isupper
,
NULL
},
{
"xdigit"
,
NULL
,
"0123456789ABCDEFabcdef"
},
{
"xdigit"
,
NULL
,
"0123456789ABCDEFabcdef"
},
{
NULL
,
NULL
,
NULL
}
{
NULL
,
NULL
,
NULL
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment