Revision: 2873
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2873&view=rev
Author:   hofman
Date:     2007-09-09 16:20:10 -0700 (Sun, 09 Sep 2007)

Log Message:
-----------
Ignore escaped newlines in FDF strings. Ignore backslash if it is followed by a 
non-special character.

Modified Paths:
--------------
    trunk/SKFDFParser.m

Modified: trunk/SKFDFParser.m
===================================================================
--- trunk/SKFDFParser.m 2007-09-09 22:04:54 UTC (rev 2872)
+++ trunk/SKFDFParser.m 2007-09-09 23:20:10 UTC (rev 2873)
@@ -131,7 +131,7 @@
             while ([scanner scanFDFComment:NULL]);
             if (success = [scanner scanString:@"obj" intoString:NULL] && 
[scanner scanFDFObject:&object]) {
                 while ([scanner scanFDFComment:NULL]);
-                if (success = [object isKindOfClass:[NSDictionary class]] && 
[scanner scanString:@"stream" intoString:NULL]) {
+                if ([object isKindOfClass:[NSDictionary class]] && [scanner 
scanString:@"stream" intoString:NULL]) {
                     object = @"";
                     if ([scanner scanUpToString:@"endstream" 
intoString:&object] && [scanner scanString:@"endstream" intoString:NULL]) {
                         int end = [object length];
@@ -594,8 +594,12 @@
                             if (success = s != nil)
                                 [tmpString appendString:s];
                             [s release];
-                        } else
-                            success = NO;
+                        } else if ([[NSCharacterSet newlineCharacterSet] 
characterIsMember:ch]) {
+                            if (ch == '\r')
+                                [self scanString:@"\n" intoString:NULL];
+                        } else {
+                            [self setScanLocation:[self scanLocation] - 1];
+                        }
                     } else {
                         success = NO;
                     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to