Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ae4245

Browse files
committed
Fix multiline C comments in psql.
1 parente5f5e73 commit5ae4245

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

‎src/bin/psql/mainloop.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.53 2003/03/2006:43:35 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.54 2003/03/2022:08:50 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"mainloop.h"
@@ -272,21 +272,24 @@ MainLoop(FILE *source)
272272

273273
/* start of extended comment? */
274274
elseif (line[i]=='/'&&line[i+thislen]=='*')
275-
{
275+
{
276276
in_xcomment++;
277277
if (in_xcomment==1)
278-
ADVANCE_1;
279-
}
278+
ADVANCE_1;
279+
}
280280

281-
/* end of extended comment? */
282-
elseif (line[i]=='*'&&line[i+thislen]=='/')
281+
/*in orend of extended comment? */
282+
elseif (in_xcomment)
283283
{
284-
in_xcomment--;
285-
if (in_xcomment <=0)
284+
if (line[i]=='*'&&line[i+thislen]=='/')
286285
{
287-
in_xcomment=0;
288-
ADVANCE_1;
289-
}
286+
in_xcomment--;
287+
if (in_xcomment <=0)
288+
{
289+
in_xcomment=0;
290+
ADVANCE_1;
291+
}
292+
}
290293
}
291294

292295
/* start of quote? */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp