Update of /cvsroot/mahogany/M/src/modules/viewflt
In directory sc8-pr-cvs1:/tmp/cvs-serv22142/src/modules/viewflt
Modified Files:
Signature.cpp Trailer.cpp
Log Message:
minor tweaks (analyse more lines)
Index: Signature.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/Signature.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -u -2 -r1.1 -r1.2
--- Signature.cpp 30 Nov 2002 02:25:23 -0000 1.1
+++ Signature.cpp 30 Nov 2002 23:14:29 -0000 1.2
@@ -79,5 +79,5 @@
// while we're not too far from end
- for ( size_t numLinesFromEnd = 0; numLinesFromEnd < 8; numLinesFromEnd++ )
+ for ( size_t numLinesFromEnd = 0; numLinesFromEnd < 10; numLinesFromEnd++ )
{
// look for the start of this line:
@@ -116,8 +116,7 @@
// continue going backwards after skipping the new line ("\r\n")
ASSERT_MSG( *pc == '\n', _T("why did we stop then?") );
+ ASSERT_MSG( pc[-1] == '\r', _T("line doesn't end in\"\\r\\n\"?") );
- pc--;
- if ( *pc == '\r' )
- pc--;
+ pc -= 2; // '\r' as well
}
Index: Trailer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/Trailer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -u -2 -r1.2 -r1.3
--- Trailer.cpp 30 Nov 2002 02:19:24 -0000 1.2
+++ Trailer.cpp 30 Nov 2002 23:14:30 -0000 1.3
@@ -76,5 +76,5 @@
// while we're not too far from end
- for ( size_t numLinesFromEnd = 0; numLinesFromEnd < 5; numLinesFromEnd++ )
+ for ( size_t numLinesFromEnd = 0; numLinesFromEnd < 10; numLinesFromEnd++ )
{
// does this seem to be a separator line?
@@ -144,8 +144,7 @@
// continue going backwards after skipping the new line ("\r\n")
ASSERT_MSG( *pc == '\n', _T("why did we stop then?") );
+ ASSERT_MSG( pc[-1] == '\r', _T("line doesn't end in\"\\r\\n\"?") );
- pc--;
- if ( *pc == '\r' )
- pc--;
+ pc -= 2;
}
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates