[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] Reading files with g77
From:       "amores perros" <lifelines_3_0_18 () hotmail ! com>
Date:       2005-11-25 16:51:16
Message-ID: BAY103-F387270B830D201A396D2A7E1570 () phx ! gbl
[Download RAW message or body]




>From: Keith MARSHALL
>To: mingw-users
>Subject: Re: [Mingw-users] Reading files with g77
>Date: Fri, 25 Nov 2005 15:08:26 +0000
>
>
>Granted, this argument does appear logical.  But, consider...
>
><file name="file-a" content="text/last-line-no-EOL">
>This is file-a
>....
>This is the last line of file-a
></file>
>
><file name="file-b" content="text">
>This is file-b
>...
>file-b: end of file
></file>
>
>Now, invoke `cat file-a file-b', and you will see
>
><output>
>This is file-a
>....
>This is the last line of file-aThis is file-b
>...
>file-b: end of file
></output>
>
>Not, I would suggest, what you would expect, nor hope to achieve.
>Imagine the havoc that could ensue, if `file-a' were a C++ header,
>ending in a `//' comment line, and its #include were immediately
>followed by another #include line, (or maybe worse, a #if), in the
>including source.
>

I've been bitten by this when I ran a script of mine, which
pulls a bunch of SQL scripts from a revision control system,
stored in individual files, and concatenates them all to
submit in a single call.

Some of the files did not end in line terminations of
whatever appropriate kind, and so the first line in
the next file got pulled into the end of a preceding line,
causing syntax errors.

Cordially,

Perry




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic