diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-21 03:28:29 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-21 03:28:29 +0000 |
commit | 7542f103251c83d38cec18b0feefb06ef3175db3 (patch) | |
tree | 09b57bc8979a8ad52ed01fe2c426e8dba806f863 /src | |
parent | d72f6c75038d8d37e64a29a04b911f728044d83b (diff) | |
download | postgresql-7542f103251c83d38cec18b0feefb06ef3175db3.tar.gz postgresql-7542f103251c83d38cec18b0feefb06ef3175db3.zip |
Improve psql comment coding.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/mainloop.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 1d0392e96ef..32c03cf24f2 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -3,7 +3,7 @@ * * 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 "mainloop.h" @@ -281,15 +281,9 @@ MainLoop(FILE *source) /* in or end of extended comment? */ else if (in_xcomment) { - if (line[i] == '*' && line[i + thislen] == '/') - { - in_xcomment--; - if (in_xcomment <= 0) - { - in_xcomment = 0; + if (line[i] == '*' && line[i + thislen] == '/' && + !--in_xcomment) ADVANCE_1; - } - } } /* start of quote? */ |