* GSWeb.framework/GSWBaseParser.m

(-[lineAndColumnIndexesFromIndex:returnsLineIndex:columnIndex:])
	Treat '\r' as a regualar character when counting lines as '\n'
	is the actual line break.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@21764 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2005-10-02 12:22:36 +00:00
parent 46daf448b6
commit 8e5df9662a
3 changed files with 12 additions and 14 deletions

View file

@ -1,4 +1,12 @@
2005-10-02 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWBaseParser.m
(-[lineAndColumnIndexesFromIndex:returnsLineIndex:columnIndex:])
Treat '\r' as a regualar character when counting lines as '\n'
is the actual line break.
2005-09-30 David Wetzel <dave@turbocat.de>
* GSWeb.framework/GSWDynamicURLString.m
added dataUsingEncoding: allowLossyConversion:
* GSWeb.framework/GSWRequest.m

View file

@ -103,6 +103,7 @@ RCS_ID("$Id$")
int lineIndex=0;
int columnIndex=0;
int i=0;
if (index>=_length)
{
lineIndex=999999;
@ -110,18 +111,7 @@ RCS_ID("$Id$")
};
for(i=0;i<index && i<_length;i++)
{
if (_uniBuf[i]=='\r')
{
if (i+1<_length
&& _uniBuf[i+1]=='\n')
i++;
else
{
lineIndex++;
columnIndex=0;
};
}
else if (_uniBuf[i+1]=='\n')
if (_uniBuf[i]=='\n')
{
lineIndex++;
columnIndex=0;

View file

@ -62,9 +62,9 @@ static int gzHeaderSize=10;
memset (&c_stream, 0, sizeof(c_stream));
err = deflateInit2(&c_stream, /* z_streamp strm */
4, /* int level */
4, /* int level */
Z_DEFLATED, /* int method */
-15, /* int windowBits */
-15, /* int windowBits */
8, /* int memLevel */
Z_DEFAULT_STRATEGY); /* int strategy */
if (err!=Z_OK)