~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/interfaces/ecpg/preproc/output.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.24 2008/03/20 15:56:59 meskes Exp $ */
 
1
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/output.c,v 1.25 2009/06/11 14:49:13 momjian Exp $ */
2
2
 
3
3
#include "postgres_fe.h"
4
4
 
194
194
                        fputs("\\\n", yyout);
195
195
                else if (str[i] == '\\')
196
196
                {
197
 
                        int j = i;
198
 
                        
199
 
                        /* check whether this is a continuation line 
200
 
                         * if it is, do not output anything because newlines are escaped anyway */
 
197
                        int                     j = i;
 
198
 
 
199
                        /*
 
200
                         * check whether this is a continuation line if it is, do not
 
201
                         * output anything because newlines are escaped anyway
 
202
                         */
201
203
 
202
204
                        /* accept blanks after the '\' as some other compilers do too */
203
 
                        do { j++; } while (str[j] == ' ' || str[j] == '\t');
 
205
                        do
 
206
                        {
 
207
                                j++;
 
208
                        } while (str[j] == ' ' || str[j] == '\t');
204
209
 
205
 
                        if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a newline */
 
210
                        if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n'))         /* not followed by a
 
211
                                                                                                                                                                 * newline */
206
212
                                fputs("\\\\", yyout);
207
213
                }
208
214
                else if (str[i] == '\r' && str[i + 1] == '\n')