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
3fd5faed
Commit
3fd5faed
authored
Apr 13, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second try at avoiding conflicts with system isblank().
parent
ff5456fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+11
-16
No files found.
src/backend/libpq/hba.c
View file @
3fd5faed
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.9
7 2003/04/12 22:28:33
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.9
8 2003/04/13 04:07:17
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -69,16 +69,11 @@ static List *tokenize_file(FILE *file);
static
char
*
tokenize_inc_file
(
const
char
*
inc_filename
);
/*
* Some standard C libraries, including GNU, have an isblank() function.
* Others, including Solaris, do not. So we have our own. Watch out for
* macro-ized versions, too.
* isblank() exists in the ISO C99 spec, but it's not very portable yet,
* so provide our own version.
*/
#ifdef isblank
#undef isblank
#endif
static
bool
isblank
(
const
char
c
)
pg_
isblank
(
const
char
c
)
{
return
c
==
' '
||
c
==
'\t'
||
c
==
'\r'
;
}
...
...
@@ -104,7 +99,7 @@ next_token(FILE *fp, char *buf, const int bufsz)
bool
was_quote
=
false
;
/* Move over initial whitespace and commas */
while
((
c
=
getc
(
fp
))
!=
EOF
&&
(
isblank
(
c
)
||
c
==
','
))
while
((
c
=
getc
(
fp
))
!=
EOF
&&
(
pg_
isblank
(
c
)
||
c
==
','
))
;
if
(
c
!=
EOF
&&
c
!=
'\n'
)
...
...
@@ -114,7 +109,7 @@ next_token(FILE *fp, char *buf, const int bufsz)
* unquoted comma, or unquoted whitespace.
*/
while
(
c
!=
EOF
&&
c
!=
'\n'
&&
(
!
isblank
(
c
)
||
in_quote
==
true
))
(
!
pg_
isblank
(
c
)
||
in_quote
==
true
))
{
/* skip comments to EOL */
if
(
c
==
'#'
&&
!
in_quote
)
...
...
@@ -141,7 +136,7 @@ next_token(FILE *fp, char *buf, const int bufsz)
*
buf
++
=
c
;
/* We pass back the comma so the caller knows there is more */
if
((
isblank
(
c
)
||
c
==
','
)
&&
!
in_quote
)
if
((
pg_
isblank
(
c
)
||
c
==
','
)
&&
!
in_quote
)
break
;
/* Literal double-quote is two double-quotes */
...
...
@@ -1050,14 +1045,14 @@ interpret_ident_response(char *ident_response,
int
i
;
/* Index into *response_type */
cursor
++
;
/* Go over colon */
while
(
isblank
(
*
cursor
))
while
(
pg_
isblank
(
*
cursor
))
cursor
++
;
/* skip blanks */
i
=
0
;
while
(
*
cursor
!=
':'
&&
*
cursor
!=
'\r'
&&
!
isblank
(
*
cursor
)
&&
while
(
*
cursor
!=
':'
&&
*
cursor
!=
'\r'
&&
!
pg_
isblank
(
*
cursor
)
&&
i
<
(
int
)
(
sizeof
(
response_type
)
-
1
))
response_type
[
i
++
]
=
*
cursor
++
;
response_type
[
i
]
=
'\0'
;
while
(
isblank
(
*
cursor
))
while
(
pg_
isblank
(
*
cursor
))
cursor
++
;
/* skip blanks */
if
(
strcmp
(
response_type
,
"USERID"
)
!=
0
)
return
false
;
...
...
@@ -1083,7 +1078,7 @@ interpret_ident_response(char *ident_response,
int
i
;
/* Index into *ident_user */
cursor
++
;
/* Go over colon */
while
(
isblank
(
*
cursor
))
while
(
pg_
isblank
(
*
cursor
))
cursor
++
;
/* skip blanks */
/* Rest of line is user name. Copy it over. */
i
=
0
;
...
...
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