Update of /cvsroot/mahogany/M/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv10346/src/util
Modified Files:
matchurl.cpp
Log Message:
misdetect less wrapped URLs
Index: matchurl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/matchurl.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -u -2 -r1.13 -r1.14
--- matchurl.cpp 3 May 2002 17:01:08 -0000 1.13
+++ matchurl.cpp 3 May 2002 23:17:08 -0000 1.14
@@ -496,13 +496,26 @@
}
+ // even with all the checks below we still get too many false
+ // positives so consider that only "long" URLs are wrapped where long
+ // URLs are defined as the ones containing the CGI script parameters
+ if ( strcspn(start + len, "?&\r") == p - start - len )
+ {
+ // no CGI parameters, suppose it can't wrap
+ break;
+ }
+
// Check that the beginning of next line is not the start of
- // another URL. Note that '@' alone is recognized as the beginning
+ // another URL.
+ //
+ // Note that although '@' alone is recognized as the beginning
// of an URL: here it should not be the case.
int nextlen = 0;
- int nextpos = scan(p+2, nextlen);
+ int nextpos = scan(p + 2, nextlen);
if ( nextlen && nextpos == 0 && p[2] != '@')
+ {
// The start of the next line being the start of an URL on its own,
// do not join the two.
break;
+ }
// it might be a wrapped URL but it might be not: it seems like we
@@ -521,5 +534,5 @@
break;
- // it did occur at the start, suppose the URL is wrapped ans so
+ // it did occur at the start, suppose the URL is wrapped and so
// continue on the next line (no need to test the first character,
// it had been already done above)
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates