Is this correct?  What about the case where you have a field which ends 
in \\, such as
\\,more data
which is two fields separated by a comma.

On 2009-08-14 08:17, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
> In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11440
>
> Modified Files:
>       tablet.mx
> Log Message:
> Only start looking at the escape if you really have to.
>
>
> U tablet.mx
> Index: tablet.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/tablet.mx,v
> retrieving revision 1.226
> retrieving revision 1.227
> diff -u -d -r1.226 -r1.227
> --- tablet.mx 14 Aug 2009 05:50:11 -0000      1.226
> +++ tablet.mx 14 Aug 2009 06:17:10 -0000      1.227
> @@ -2278,21 +2278,21 @@
>                       /* we split based on simple character separators for 
> speed */
>                       if ( rseplen == 1 ){
>                               for (; *e; e++)
> -                             if ( *e == '\\')
> -                                     e++;
> -                             else
> -                             if ( *e == *rsep)
> +                             if ( *e == *rsep) {
> +                                     if ( e>  s&&  *(e-1) == '\\')
> +                                             continue;
>                                       break;
> +                             }
>                               if (*e == 0)
>                                       e = 0;
>                       } else
>                       do {
>                               for ( ; *e ; e++)
> -                             if ( *e == '\\')
> -                                     e++;
> -                             else
> -                             if ( *e == *rsep&&  strncmp(e,rsep,rseplen) == 
> 0 )
> +                             if ( *e == *rsep&&  strncmp(e,rsep,rseplen) == 
> 0 ) {
> +                                     if ( e>  s&&  *(e-1) == '\\')
> +                                             continue;
>                                       break;
> +                             }
>
>                               if ( *e ) break;
>                               e = 0;
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Monetdb-checkins mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins


-- 
Sjoerd Mullender

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers

Reply via email to