[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-common-dev
Subject: RE: [Common-dev] Ping: CR: Fixes include functionality in
From: "Eric Hyche" <ehyche () real ! com>
Date: 2007-05-07 17:16:59
Message-ID: 02b301c790cb$866d0140$db68a8c0 () EHYCHED620
[Download RAW message or body]
Not sure if anyone already reviewed this, but if not,
then this change looks good to me.
Eric
=============================================
Eric Hyche (ehyche@real.com)
Technical Lead
RealNetworks, Inc.
> -----Original Message-----
> From: common-dev-bounces@helixcommunity.org
> [mailto:common-dev-bounces@helixcommunity.org] On Behalf Of
> Timothy Knox
> Sent: Thursday, May 03, 2007 3:05 PM
> To: common-dev@helixcommunity.org
> Subject: [Common-dev] Ping: CR: Fixes include functionality
> in XMLConfigparsing
>
> Has anyone taken a look at this yet? If not, would somebody
> please do so?
>
> Many thanks. :-)
>
> Somewhere in the Real world, on Tue, May 01, 2007 at
> 04:49:25PM -0700, Timothy Knox wrote:
> > Synopsis
> > ========
> > Fixes include functionality in XMLConfig parsing
> >
> > Branches: head
> > Suggested Reviewer: anyone
> >
> >
> > Description
> > ===========
> > While recently investigating the XMLConfig code, to
> determine how to include
> > additional config files, I discovered that some include
> functionality had been
> > written into the class. However, it did not work correctly.
> The problem was
> > twofold: One, the mechanism for moving the current
> character pointer was to
> > call a function, and simply adding an offset was not
> sufficient. Two, the code
> > did not follow our guidelines w.r.t. if()s, and had the
> dangling-else problem.
> >
> >
> > Files Affected
> > ==============
> >
> > common/lang/xml/looseprs.cpp
> >
> >
> > Testing Performed
> > =================
> > Integration Tests:
> > - Reduced rmserver.cfg to an empty shell that simply
> included another. Worked fine.
> > - Included a non-existent file. Logged correctly, but
> server still started.
> > - Included a badly-formed file. Logged correctly, but
> server still started.
> >
> > Platforms Tested: linux-rhel4-i686
> > Build verified: linux-rhel4-i686, sunos-5.10-sparc-server,
> win32-i386-vc7
> >
> >
> > QA Hints
> > ===============
> >
> > Server should continue to work as expected. In addition, it
> will now be possible
> > to use includes. An example is given below:
> >
> > rmserver.cfg:
> > <?XML Version="1.0" ?>
> >
> > <!--#include "rmserver-full.cfg" -->
> >
> > rmserver-full.cfg:
> > <?XML Version="1.0" ?>
> >
> > <!-- The full contents of the real rmserver.cfg file -->
> >
> >
> > --
> > Timothy Knox <mailto:tknox@real.com>
> > "The road to Perl6 is paved with good intentions."
> > -- Peter da Silva (inspired by Yossi Kreinin)
> > on http://we.hates-software.com/
>
> > Index: common/lang/xml/looseprs.cpp
> > ===================================================================
> > RCS file: /cvsroot/common/lang/xml/looseprs.cpp,v
> > retrieving revision 1.11
> > diff -u -w -b -p -d -B -r1.11 looseprs.cpp
> > --- common/lang/xml/looseprs.cpp 4 Apr 2005 17:48:46
> -0000 1.11
> > +++ common/lang/xml/looseprs.cpp 1 May 2007 22:28:09 -0000
> > @@ -583,6 +583,9 @@ XMLParser::FindCommentClose(const char*&
> > m_comment_get_arg = 1;
> > m_comment_pos = 0;
> > strcpy(m_comment_command, "include");
> > + while ((pos = (const
> char*)xmlStr.GetNextChar(uLen)) && *pos != 'e')
> > + ; // Skip include
> > + pos = (const
> char*)xmlStr.GetNextChar(uLen); // Skip the 'e'
> > }
> > }
> > }
> > @@ -641,10 +644,18 @@ XMLParser::FindCommentClose(const char*&
> > break;
> > case 2:
> > if(*pos != '"')
> > - if (m_comment_pos < 1023)
> m_comment_arg[m_comment_pos++] = *pos;
> > + {
> > + if (m_comment_pos < 1023)
> > + {
> > + m_comment_arg[m_comment_pos++] = *pos;
> > + }
> > + }
> > else
> > {
> > - if (m_comment_pos < 1024)
> m_comment_arg[m_comment_pos] = 0;
> > + if (m_comment_pos < 1024)
> > + {
> > + m_comment_arg[m_comment_pos] = 0;
> > + }
> > m_comment_get_arg = 3;
> > }
> > break;
>
> > _______________________________________________
> > Common-dev mailing list
> > Common-dev@helixcommunity.org
> > http://lists.helixcommunity.org/mailman/listinfo/common-dev
>
>
> --
> Timothy Knox <mailto:tknox@real.com>
> "The road to Perl6 is paved with good intentions."
> -- Peter da Silva (inspired by Yossi Kreinin)
> on http://we.hates-software.com/
>
> _______________________________________________
> Common-dev mailing list
> Common-dev@helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/common-dev
>
_______________________________________________
Common-dev mailing list
Common-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/common-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic