1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-01 01:04:50 +03:00

Improve psql comment coding.

This commit is contained in:
Bruce Momjian 2003-03-21 03:28:29 +00:00
parent d72f6c7503
commit 7542f10325

View File

@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.54 2003/03/20 22:08:50 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.55 2003/03/21 03:28:29 momjian Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "mainloop.h" #include "mainloop.h"
@ -281,15 +281,9 @@ MainLoop(FILE *source)
/* in or end of extended comment? */ /* in or end of extended comment? */
else if (in_xcomment) else if (in_xcomment)
{ {
if (line[i] == '*' && line[i + thislen] == '/') if (line[i] == '*' && line[i + thislen] == '/' &&
{ !--in_xcomment)
in_xcomment--;
if (in_xcomment <= 0)
{
in_xcomment = 0;
ADVANCE_1; ADVANCE_1;
}
}
} }
/* start of quote? */ /* start of quote? */