Article View: borland.public.cppbuilder.nativeapi
Article #6415Re: memory stream parsing
From: xa
Date: Mon, 16 May 2005 03:39
Date: Mon, 16 May 2005 03:39
33 lines
1855 bytes
1855 bytes
Thanks Vladimir. "Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote in message news:4287a37a@newsgroups.borland.com... > To extend the code to search for sequences "\r\n", you can do > something like this (untested again): > > > for ( int i=0; i<MS_OLD->Size ; i++ ) > > for ( int i=0; i<MS_OLD->Size-1; i++ ) > > > if ( > > (((char*)(MS_OLD->Memory))[i] != '\r') && > > (((char*)(MS_OLD->Memory))[i] != '\n') > > ) > > if ( > (((char*)(MS_OLD->Memory))[i] != '\r') && > (((char*)(MS_OLD->Memory))[i+1] != '\n') > ) > > > MS_NEW->WriteBuffer( &((char*)(MS_OLD->Memory))[i] , 1 ); > > MS_NEW->WriteBuffer( &((char*)(MS_OLD->Memory))[i] , 1 ); > ++i; //<--- THIS IS ADDED > > > > -- > Best regards, > Vladimir Stefanovic > >
Technical Details
Message-ID:
<428815f8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42878a87$1@newsgroups.borland.com> <4287a0a4$1@newsgroups.borland.com> <4287a37a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cb77108e6b3d9403 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "xa" <pageme@ntlworld.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <42878a87$1@newsgroups.borland.com> <4287a0a4$1@newsgroups.borland.com> <4287a37a@newsgroups.borland.com> Subject: Re: memory stream parsing Date: Mon, 16 May 2005 04:39:44 +0100 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300 NNTP-Posting-Host: 81.103.71.97 Message-ID: <428815f8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116214776 81.103.71.97 (15 May 2005 20:39:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail