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
c9ec78a6
Commit
c9ec78a6
authored
Jun 29, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix quotes in /* */ comments in psql.
parent
43ba1b44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
src/bin/psql/mainloop.c
src/bin/psql/mainloop.c
+18
-19
No files found.
src/bin/psql/mainloop.c
View file @
c9ec78a6
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.3
0 2000/05/12 16:13:44 petere
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.3
1 2000/06/29 16:27:57 momjian
Exp $
*/
#include "postgres.h"
#include "mainloop.h"
...
...
@@ -18,9 +18,7 @@
#ifndef WIN32
#include <setjmp.h>
sigjmp_buf
main_loop_jmp
;
#endif
...
...
@@ -298,18 +296,13 @@ MainLoop(FILE *source)
bslash_count
=
0
;
rescan:
/*
in quote
? */
if
(
in_quote
)
/*
start of extended comment
? */
if
(
line
[
i
]
==
'/'
&&
line
[
i
+
thislen
]
==
'*'
)
{
/* end of quote */
if
(
line
[
i
]
==
in_quote
&&
bslash_count
%
2
==
0
)
in_quote
=
'\0'
;
xcomment
=
true
;
ADVANCE_1
;
}
/* start of quote */
else
if
(
!
was_bslash
&&
(
line
[
i
]
==
'\''
||
line
[
i
]
==
'"'
))
in_quote
=
line
[
i
];
/* in extended comment? */
else
if
(
xcomment
)
{
...
...
@@ -320,13 +313,6 @@ MainLoop(FILE *source)
}
}
/* start of extended comment? */
else
if
(
line
[
i
]
==
'/'
&&
line
[
i
+
thislen
]
==
'*'
)
{
xcomment
=
true
;
ADVANCE_1
;
}
/* single-line comment? truncate line */
else
if
(
line
[
i
]
==
'-'
&&
line
[
i
+
thislen
]
==
'-'
)
{
...
...
@@ -334,6 +320,19 @@ MainLoop(FILE *source)
break
;
}
/* in quote? */
else
if
(
in_quote
)
{
/* end of quote */
if
(
line
[
i
]
==
in_quote
&&
bslash_count
%
2
==
0
)
in_quote
=
'\0'
;
}
/* start of quote */
else
if
(
!
was_bslash
&&
(
line
[
i
]
==
'\''
||
line
[
i
]
==
'"'
))
in_quote
=
line
[
i
];
/* count nested parentheses */
else
if
(
line
[
i
]
==
'('
)
paren_level
++
;
...
...
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