*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.96 1997/09/18 20:22:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.97 1997/09/19 03:42:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
for (i = 0; i < len; i++)
{
+ if (line[i] == '\\')
+ {
+ char hold_char = line[i];
+
+ line[i] = '\0';
+ if (query_start[0] != '\0')
+ {
+ if (query[0] != '\0')
+ {
+ strcat(query, "\n");
+ strcat(query, query_start);
+ }
+ else
+ {
+ strcpy(query, query_start);
+ };
+ }
+ line[i] = hold_char;
+ query_start = line + i;
+ break; /* handle command */
+
+ /* start an extended comment? */
+ }
+
if (querySent && !isspace(line[i]))
{
query[0] = '\0';
/* possible backslash command? */
}
- else if (line[i] == '\\')
- {
- char hold_char = line[i];
-
- line[i] = '\0';
- if (query_start[0] != '\0')
- {
- if (query[0] != '\0')
- {
- strcat(query, "\n");
- strcat(query, query_start);
- }
- else
- {
- strcpy(query, query_start);
- };
- }
- line[i] = hold_char;
- query_start = line + i;
- break; /* handle command */
-
- /* start an extended comment? */
- }
else if (line[i] == '/' && line[i + 1] == '*')
{
xcomment = line + i;