Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restored Panther compatibility, courtesy Stuart Morgan.

  • Loading branch information...
commit f814653c0622868684a281c1bae76e897be4b281 1 parent 1c1bb3a
andym authored
Showing with 24 additions and 7 deletions.
  1. +2 −0  NSFileManager+Authentication.m
  2. +20 −5 RSS.m
  3. +2 −2 SUAppcast.h
2  NSFileManager+Authentication.m
View
@@ -14,6 +14,8 @@
#import <unistd.h>
#import <sys/stat.h>
#import <dirent.h>
+#include <sys/types.h>
+#include <sys/wait.h>
@implementation NSFileManager (SUAuthenticationAdditions)
25 RSS.m
View
@@ -42,6 +42,12 @@ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
#import "RSS.h"
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
+@interface NSError (TigerPlusMethods)
+- (NSString *)localizedFailureReason;
+@end
+#endif
+
// This comparator function is used to sort the RSS items by their published date.
int compareNewsItems(id item1, id item2, void *context)
{
@@ -154,8 +160,13 @@ - (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent: (NSString*)
if (rssData == nil)
{
+ NSString *failureReason;
+ if ([error respondsToSelector:@selector(localizedFailureReason)])
+ failureReason = [error localizedFailureReason];
+ else
+ failureReason = [error localizedDescription];
NSException *exception = [NSException exceptionWithName: @"RSSDownloadFailed"
- reason: [error localizedFailureReason] userInfo: [error userInfo] ];
+ reason: failureReason userInfo: [error userInfo] ];
[exception raise];
}
@@ -664,11 +675,15 @@ - (NSString *) getelementvalue: (CFXMLTreeRef) tree {
else if ([name isEqualTo: @"amp"])
name = @"&";
- else if ([name isEqualTo: @"rsquo"])
- name = [NSString stringWithUTF8String:"\u2019"];
+ else if ([name isEqualTo: @"rsquo"]) {
+ char rsquo[4] = { 0xe2, 0x80, 0x99, 0x0 };
+ name = [NSString stringWithUTF8String: rsquo];
+ }
- else if ([name isEqualTo: @"lsquo"])
- name = [NSString stringWithUTF8String:"\u2018"];
+ else if ([name isEqualTo: @"lsquo"]) {
+ char lsquo[4] = { 0xe2, 0x80, 0x98, 0x0 };
+ name = [NSString stringWithUTF8String: lsquo];
+ }
else if ([name isEqualTo: @"apos"])
name = @"'";
4 SUAppcast.h
View
@@ -26,5 +26,5 @@
@end
@interface NSObject (SUAppcastDelegate)
-- appcastDidFinishLoading:(SUAppcast *)appcast;
-@end
+- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
+@end
Please sign in to comment.
Something went wrong with that request. Please try again.