Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the build break on osx10.8 xcode4.6.2 #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BookmarksController.m
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColu
ctrlCharStr = [[NSString stringWithCharacters:&ch length:1] retain];
}

return [NSString stringWithFormat:@"%@%@%@ %d", rowIndex > 17 ? ctrlCharStr : @"", rowIndex > 8 ? shiftCharStr : @"", cmdCharStr, (rowIndex % 9) + 1];
return [NSString stringWithFormat:@"%@%@%@ %l", rowIndex > 17 ? ctrlCharStr : @"", rowIndex > 8 ? shiftCharStr : @"", cmdCharStr, (rowIndex % 9) + 1];
}

- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView {
Expand Down
2 changes: 1 addition & 1 deletion BufferUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ CFStringRef CreateRandomizedFileName() {
}

CFStringRef name = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(".%lu%lu-%d-%d"),
psn.highLongOfPSN, psn.lowLongOfPSN, (int)CFAbsoluteTimeGetCurrent(), sequence);
psn.highLongOfPSN, (NSUInteger)psn.lowLongOfPSN, (int)CFAbsoluteTimeGetCurrent(), sequence);

return name;
}
Expand Down
4 changes: 3 additions & 1 deletion ExternalEditorListController.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ extern NSString *ExternalEditorsChangedNotification;

@class NoteObject;

@protocol NSMenuDelegate;

@interface ExternalEditor : NSObject {

BOOL installCheckFailed;
Expand All @@ -49,7 +51,7 @@ extern NSString *ExternalEditorsChangedNotification;

@end

@interface ExternalEditorListController : NSObject {
@interface ExternalEditorListController : NSObject <NSMenuDelegate> {

NSMutableArray *userEditorList;
NSArray *ODBEditorList;
Expand Down
2 changes: 1 addition & 1 deletion FastListDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
NSUInteger count;
}

- (const id *)immutableObjects;
- (id *)immutableObjects;
- (NSUInteger)count;

- (NSUInteger)indexOfObjectIdenticalTo:(id)address;
Expand Down
3 changes: 3 additions & 0 deletions LinkingEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
@class NoteObject;
@class GlobalPrefs;

// From old version of NSTextFinder.h before including in OSX 10.8
enum {LAST_FIND_UNKNOWN, LAST_FIND_NO, LAST_FIND_YES};

@interface LinkingEditor : NSTextView
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
<NSLayoutManagerDelegate>
Expand Down
1 change: 0 additions & 1 deletion LinkingEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import "AppController.h"
#import "AppController_Importing.h"
#import "NotesTableView.h"
#import "NSTextFinder.h"
#import "LinkingEditor_Indentation.h"
#import "NSCollection_utils.h"
#import "AttributedPlainText.h"
Expand Down
164 changes: 0 additions & 164 deletions NSTextFinder.h

This file was deleted.

3 changes: 2 additions & 1 deletion NSTextFinder_LastFind.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* Created by Zachary Schneirov
*
*/
#import "NSTextFinder.h"
#include <AppKit/NSTextFinder.h>
#import "LinkingEditor.h"

@implementation NSTextFinder (LastFind)

Expand Down
16 changes: 7 additions & 9 deletions Notation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@
217CEBA209E9885500DF0E09 /* NotationFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotationFileManager.m; sourceTree = "<group>"; };
217D4280096545A000E84749 /* LabelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelObject.h; sourceTree = "<group>"; };
217D4281096545A000E84749 /* LabelObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelObject.m; sourceTree = "<group>"; };
217D4B570A61F42700887100 /* NSTextFinder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSTextFinder.h; sourceTree = "<group>"; };
217EB3CD0B0F62FB0041A8A9 /* NSTextFinder_LastFind.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = NSTextFinder_LastFind.m; sourceTree = "<group>"; };
2181171109F311110020A252 /* DeletedNoteObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeletedNoteObject.h; sourceTree = "<group>"; };
2181171209F311110020A252 /* DeletedNoteObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeletedNoteObject.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1018,7 +1017,6 @@
21BD2ECF10DAF31500BA3DF6 /* LinearDividerShader.m */,
2114C23B095883A600614E74 /* NSData_transformations.h */,
2114C23C095883A600614E74 /* NSData_transformations.m */,
217D4B570A61F42700887100 /* NSTextFinder.h */,
217EB3CD0B0F62FB0041A8A9 /* NSTextFinder_LastFind.m */,
214495040ADC7F4F00E2A2B6 /* SFPasswordAssistantInspectorController.h */,
213FAD510B3C6B52004C74BD /* FSExchangeObjectsCompat.h */,
Expand Down Expand Up @@ -1798,7 +1796,7 @@
GCC_PFE_FILE_C_DIALECTS = "c objective-c";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Notation_Prefix.pch;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
Expand All @@ -1818,10 +1816,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LD_GENERATE_MAP_FILE = YES;
LIBRARY_SEARCH_PATHS = "$(LIBRARY_SEARCH_PATHS)";
OTHER_CFLAGS = (
"-pg",
"-whatsloaded",
);
OTHER_CFLAGS = "-pg";
OTHER_LDFLAGS = (
"-pg",
"-whatsloaded",
Expand All @@ -1830,6 +1825,7 @@
);
PREBINDING = NO;
PRODUCT_NAME = "Notational Velocity";
SDKROOT = macosx;
STRIP_STYLE = "non-global";
WARNING_CFLAGS = "-pg";
WARNING_LDFLAGS = "-pg";
Expand Down Expand Up @@ -1863,7 +1859,7 @@
GCC_PFE_FILE_C_DIALECTS = "c objective-c";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Notation_Prefix.pch;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
Expand All @@ -1886,6 +1882,7 @@
OTHER_LDFLAGS = "";
PREBINDING = NO;
PRODUCT_NAME = "Notational Velocity";
SDKROOT = macosx;
"SDKROOT[arch=x86_64]" = macosx10.5;
SECTORDER_FLAGS = (
"-sectorder",
Expand Down Expand Up @@ -1924,7 +1921,7 @@
GCC_PFE_FILE_C_DIALECTS = "c objective-c";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Notation_Prefix.pch;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
Expand All @@ -1946,6 +1943,7 @@
PDFKit,
);
PRODUCT_NAME = "Notational Velocity";
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
name = Default;
Expand Down
2 changes: 1 addition & 1 deletion NotationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ - (NSNumber*)verifyDataAtTemporaryFSRef:(NSValue*)fsRefValue withFinalName:(NSSt
}
}

NSLog(@"verified %u notes in %g s", [notesToVerify count], (float)[[NSDate date] timeIntervalSinceDate:date]);
NSLog(@"verified %lu notes in %g s", (unsigned long)[notesToVerify count], (float)[[NSDate date] timeIntervalSinceDate:date]);
returnResult:
if (notesData) free(notesData);
return [NSNumber numberWithInt:result];
Expand Down
1 change: 1 addition & 0 deletions NotationFileManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#import "NSData_transformations.h"
#include <sys/param.h>
#include <sys/mount.h>
#include <openssl/md5.h>

NSString *NotesDatabaseFileName = @"Notes & Settings";

Expand Down
3 changes: 2 additions & 1 deletion NoteObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ typedef struct _NoteFilterContext {
} NoteFilterContext;

@interface NoteObject : NSObject <NSCoding, SynchronizedNote> {
@public
NSAttributedString *tableTitleString;
NSString *titleString, *labelString;
NSMutableAttributedString *contentString;
Expand All @@ -52,7 +53,7 @@ typedef struct _NoteFilterContext {
NSString *dateModifiedString, *dateCreatedString;

id delegate; //the notes controller

//for syncing to text file
NSString *filename;
UInt32 nodeID;
Expand Down
2 changes: 1 addition & 1 deletion TemporaryFileCachePreparer.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ - (void)_attachRAMDiskOfCapacity:(NSUInteger)numberOfMegabytes {

[self retain];
[(attachTask = [NSTask new]) setLaunchPath:@"/usr/bin/hdiutil"];
[attachTask setArguments:[NSArray arrayWithObjects:@"attach", @"-nomount", @"-nobrowse", [NSString stringWithFormat:@"ram://%u", (2 * 1024 * numberOfMegabytes)], nil]];
[attachTask setArguments:[NSArray arrayWithObjects:@"attach", @"-nomount", @"-nobrowse", [NSString stringWithFormat:@"ram://%lu", (unsigned long)(2 * 1024 * numberOfMegabytes)], nil]];
[attachTask setStandardOutput:[NSPipe pipe]];
[attachTask launch];
}
Expand Down
4 changes: 3 additions & 1 deletion URLGetter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#import <Cocoa/Cocoa.h>

@interface URLGetter : NSObject
@protocol NSURLDownloadDelegate;

@interface URLGetter : NSObject <NSURLDownloadDelegate>
{
IBOutlet NSButton *cancelButton;
IBOutlet NSTextField *objectURLStatus;
Expand Down