Skip to content

Commit 6d3b2a9

Browse files
committed
Clean for 64-bit, other changes
1 parent 387db9d commit 6d3b2a9

File tree

156 files changed

+2504
-1451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2504
-1451
lines changed

.DS_Store

0 Bytes
Binary file not shown.

AMCollectionView.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
NSColor *selectedRowColor;
3232
NSColor *secondarySelectedRowColor;
3333
BOOL am_initializing;
34-
float rowHeight;
34+
CGFloat rowHeight;
3535
BOOL am_isFirstResponder;
3636
}
3737

@@ -41,8 +41,8 @@
4141
- (NSArray *)backgroundColors;
4242
- (void)setBackgroundColors:(NSArray *)value;
4343

44-
- (float)rowHeight;
45-
- (void)setRowHeight:(float)value;
44+
- (CGFloat)rowHeight;
45+
- (void)setRowHeight:(CGFloat)value;
4646

4747
- (NSArray *)content;
4848
- (void)setContent:(NSArray *)value

AMCollectionView.m

+14-13
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import "AMCollectionView.h"
1010
#import "AMCollectionViewItem.h"
1111
#import "AMCollectionViewItemProtocol.h"
12+
#include <tgmath.h>
1213

1314

1415
@interface AMCollectionViewItem (Private)
@@ -115,12 +116,12 @@ - (void)setBackgroundColors:(NSArray *)value
115116
}
116117
}
117118

118-
- (float)rowHeight
119+
- (CGFloat)rowHeight
119120
{
120121
return rowHeight;
121122
}
122123

123-
- (void)setRowHeight:(float)value
124+
- (void)setRowHeight:(CGFloat)value
124125
{
125126
if (rowHeight != value) {
126127
rowHeight = value;
@@ -173,7 +174,7 @@ - (void)setContent:(NSArray *)value
173174
- (NSIndexSet *)selectionIndexes
174175
{
175176
NSMutableIndexSet *result = [[[NSMutableIndexSet alloc] init] autorelease];
176-
int index = 0;
177+
NSInteger index = 0;
177178
NSEnumerator *enumerator = [content objectEnumerator];
178179
id object;
179180
AMCollectionViewItem *item;
@@ -191,7 +192,7 @@ - (void)setSelectionIndexes:(NSIndexSet *)indexSet
191192
{
192193
// change selection for items
193194
AMCollectionViewItem *item = nil;
194-
int index = 0;
195+
NSInteger index = 0;
195196
NSEnumerator *enumerator = [content objectEnumerator];
196197
id object;
197198
while (object = [enumerator nextObject]) {
@@ -369,9 +370,9 @@ - (void)drawRect:(NSRect)rect
369370
[[bgColors objectAtIndex:0] set];
370371
NSRectFill(rect);
371372

372-
int colorCount = [bgColors count];
373-
int colorIndex;
374-
int index = 0;
373+
NSInteger colorCount = [bgColors count];
374+
NSInteger colorIndex;
375+
NSInteger index = 0;
375376
id object;
376377
AMCollectionViewItem *item;
377378
NSRect itemFrame;
@@ -421,7 +422,7 @@ - (BOOL)isFlipped
421422

422423
- (void)setFrameSize:(NSSize)newSize
423424
{
424-
BOOL didChangeWidth = (fabsf([self frame].size.width - newSize.width) > 0.1);
425+
BOOL didChangeWidth = (fabs([self frame].size.width - newSize.width) > 0.1);
425426
[super setFrameSize:newSize];
426427
if (am_itemRespondsToSizeForViewWithProposedSize && didChangeWidth) {
427428
[self setNeedsLayout:YES];
@@ -455,7 +456,7 @@ - (void)moveUp:(id)sender
455456
AMCollectionViewItem *item;
456457
id object;
457458
id previousObject = nil;
458-
int row, selectedRow = NSNotFound;;
459+
NSInteger row, selectedRow = NSNotFound;;
459460
for (row = 0; row < [objects count]; row++) {
460461
object = [objects objectAtIndex:row];
461462
item = [self itemForObject:object];
@@ -479,7 +480,7 @@ - (void)moveDown:(id)sender
479480
AMCollectionViewItem *item;
480481
id object;
481482
id previousObject = nil;
482-
int row, selectedRow = NSNotFound;;
483+
NSInteger row, selectedRow = NSNotFound;;
483484
for (row = [objects count]-1; row >= 0 ; row--) {
484485
object = [objects objectAtIndex:row];
485486
item = [self itemForObject:object];
@@ -658,7 +659,7 @@ - (void)kick
658659
// [self removeAllSubviews];
659660
NSEnumerator *enumerator = [[self content] objectEnumerator];
660661
id object;
661-
float y = 0.0;
662+
CGFloat y = 0.0;
662663
AMCollectionViewItem *item;
663664
NSView *view;
664665
NSSize viewSize;
@@ -685,7 +686,7 @@ - (void)doLayout
685686
// [self removeAllSubviews];
686687
NSEnumerator *enumerator = [[self content] objectEnumerator];
687688
id object;
688-
float y = 0.0;
689+
CGFloat y = 0.0;
689690
AMCollectionViewItem *item;
690691
NSView *view;
691692
NSSize viewSize;
@@ -757,7 +758,7 @@ - (AMCollectionViewItem *)itemAtPoint:(NSPoint)point
757758
}
758759
} else {
759760
// fixed row height
760-
int index = (point.y / [self rowHeight]);
761+
NSInteger index = (point.y / [self rowHeight]);
761762
if (index < [[self content] count]) {
762763
result = [self itemForObject:[[self content] objectAtIndex:index]];
763764
} else {

CIPAppleScriptHelper.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ - (NSAppleEventDescriptor *)callInResource: (NSString *)resourcePath script: (NS
5858
// usleep(10000); //Delay 0.001 seconds to not overrun the display
5959
// }
6060

61-
int pid = [[NSProcessInfo processInfo] processIdentifier];
61+
NSInteger pid = [[NSProcessInfo processInfo] processIdentifier];
6262

6363
NSDictionary *theError = [NSDictionary dictionary];
6464
NSURL *theURL = [[NSURL alloc] initFileURLWithPath:resourcePath];

GCUndoManager.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ - (BOOL) submitUndoTask:(GCConcreteUndoTask*) aTask
817817
// if necessary and groups by Event is YES. This is invoked by -forwardInvocation: and -registerUndoWithTarget:selector:object:
818818
// returns YES if the task was added, NO if it was not (coalesced away).
819819

820-
THROW_IF_FALSE( aTask != nil, @"invalid task was nil in -submitUndoTask:");
820+
THROW_IF_FALSE( aTask != nil, @"invalid task was nil in -submitUndoTask:");
821821

822822
// if coalescing, reject invocation that matches an already registered target and selector within the current group.
823823
// Coalescing is never done while redoing or undoing. Because this matches any already-registered action, not just the
@@ -1085,7 +1085,7 @@ - (void) explodeTopUndoAction
10851085
else
10861086
selString = @"<subgroup>";
10871087

1088-
[newTaskGroup setActionName:[NSString stringWithFormat:@"%@ (%lu: %@)", [topGroup actionName], ++suffix, selString ]];
1088+
[newTaskGroup setActionName:[NSString stringWithFormat:@"%@ (%lu: %@)", [topGroup actionName], (long)++suffix, selString ]];
10891089
[self pushGroupOntoUndoStack:newTaskGroup];
10901090
[newTaskGroup release];
10911091
}
@@ -1155,7 +1155,7 @@ - (BOOL) respondsToSelector:(SEL) aSelector
11551155

11561156
- (NSString*) description
11571157
{
1158-
return [NSString stringWithFormat:@"%@ g-level = %ld, state = %d, u-stack: %@, r-stack: %@", [super description], [self groupingLevel], [self undoManagerState], [self undoStack], [self redoStack]];
1158+
return [NSString stringWithFormat:@"%@ g-level = %ld, state = %ld, u-stack: %@, r-stack: %@", [super description], (long)[self groupingLevel], (long)[self undoManagerState], [self undoStack], [self redoStack]];
11591159
}
11601160

11611161

@@ -1203,7 +1203,7 @@ - (void) addTask:(GCUndoTask*) aTask
12031203

12041204
- (GCUndoTask*) taskAtIndex:(NSUInteger) indx
12051205
{
1206-
THROW_IF_FALSE2( indx < [[self tasks] count], @"invalid task index (%lu) in group %@", indx, self );
1206+
THROW_IF_FALSE2( indx < [[self tasks] count], @"invalid task index (%lu) in group %@", (long)indx, self );
12071207

12081208
return [[self tasks] objectAtIndex:indx];
12091209
}
@@ -1389,7 +1389,7 @@ - (void) dealloc
13891389

13901390
- (NSString*) description
13911391
{
1392-
return [NSString stringWithFormat:@"%@ '%@' %lu tasks: %@", [super description], [self actionName], [mTasks count], mTasks];
1392+
return [NSString stringWithFormat:@"%@ '%@' %lu tasks: %@", [super description], [self actionName], (long)[mTasks count], mTasks];
13931393
}
13941394

13951395
@end

GnudoManager.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ extern NSString* const NSUndoManagerWillUndoChangeNotification;
7676
BOOL _isUndoing;
7777
BOOL _groupsByEvent;
7878
BOOL _runLoopGroupingPending;
79-
unsigned _disableCount;
80-
unsigned _levelsOfUndo;
79+
NSUInteger _disableCount;
80+
NSUInteger _levelsOfUndo;
8181
}
8282

8383
- (void) beginUndoGrouping;//
@@ -87,12 +87,12 @@ extern NSString* const NSUndoManagerWillUndoChangeNotification;
8787
- (void) enableUndoRegistration;//
8888
- (void) endUndoGrouping;//
8989
- (void) forwardInvocation: (NSInvocation*)anInvocation;
90-
- (int) groupingLevel;//
90+
- (NSInteger) groupingLevel;//
9191
- (BOOL) groupsByEvent;//
9292
- (BOOL) isRedoing;//
9393
- (BOOL) isUndoing;//
9494
- (BOOL) isUndoRegistrationEnabled;//
95-
- (unsigned int) levelsOfUndo;//
95+
- (NSUInteger) levelsOfUndo;//
9696
- (id) prepareWithInvocationTarget: (id)target;//
9797
- (void) redo;//
9898
- (NSString*) redoActionName;//
@@ -106,7 +106,7 @@ extern NSString* const NSUndoManagerWillUndoChangeNotification;
106106
- (NSArray*) runLoopModes;//
107107
- (void) setActionName: (NSString*)name;//
108108
- (void) setGroupsByEvent: (BOOL)flag;//
109-
- (void) setLevelsOfUndo: (unsigned)num;//
109+
- (void) setLevelsOfUndo: (NSUInteger)num;//
110110
- (void) setRunLoopModes: (NSArray*)newModes;//
111111
- (void) undo;//
112112
- (NSString*) undoActionName;//

GnudoManager.m

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ - (void) addInvocation: (NSInvocation*)inv
4646

4747
- (NSString*)longDescription {
4848
NSMutableString* d = [NSMutableString stringWithFormat:
49-
@"%@: %p with %d invocations:",
49+
@"%@: %p with %ld invocations:",
5050
[self className],
5151
self,
52-
[[self actions] count]] ;
52+
(long)[[self actions] count]] ;
5353
for (NSInvocation* action in [self actions]) {
5454
[d appendFormat:
5555
@"\n %@",
@@ -94,7 +94,7 @@ - (void) perform
9494
{
9595
if (actions != nil)
9696
{
97-
unsigned i = [actions count];
97+
NSUInteger i = [actions count];
9898

9999
while (i-- > 0)
100100
{
@@ -107,7 +107,7 @@ - (BOOL) removeActionsForTarget: (id)target
107107
{
108108
if (actions != nil)
109109
{
110-
unsigned i = [actions count];
110+
NSUInteger i = [actions count];
111111

112112
while (i-- > 0)
113113
{
@@ -359,7 +359,7 @@ - (void) endUndoGrouping
359359
else if ([g actions] != nil)
360360
{
361361
NSArray *a = [g actions];
362-
unsigned i;
362+
NSUInteger i;
363363

364364
for (i = 0; i < [a count]; i++)
365365
{
@@ -464,10 +464,10 @@ - (NSMethodSignature*) methodSignatureForSelector: (SEL)selector
464464
* groupings which can be nested, not the number of of groups on either
465465
* the undo or redo stack.
466466
*/
467-
- (int) groupingLevel
467+
- (NSInteger) groupingLevel
468468
{
469469
GnudoGroup *g = (GnudoGroup*)m_group;
470-
int level = 0;
470+
NSInteger level = 0;
471471

472472
while (g != nil)
473473
{
@@ -482,7 +482,7 @@ - (void)logGroupLineage
482482
{
483483
GnudoGroup *g = (GnudoGroup*)m_group;
484484
NSMutableString* lineage = [NSMutableString string] ;
485-
[lineage appendFormat:@"\nCurrently, %d Undo Groups Nested:\n", [self groupingLevel]] ;
485+
[lineage appendFormat:@"\nCurrently, %ld Undo Groups Nested:\n", (long)[self groupingLevel]] ;
486486

487487
while (g != nil)
488488
{
@@ -556,7 +556,7 @@ - (BOOL) isUndoRegistrationEnabled
556556
* The default value is 0 meaning the number is only limited by
557557
* memory availability.
558558
*/
559-
- (unsigned int) levelsOfUndo
559+
- (NSUInteger) levelsOfUndo
560560
{
561561
return _levelsOfUndo;
562562
}
@@ -783,7 +783,7 @@ - (void) removeAllActions
783783
*/
784784
- (void) removeAllActionsWithTarget: (id)target
785785
{
786-
unsigned i;
786+
NSUInteger i;
787787

788788
i = [_redoStack count];
789789
while (i-- > 0)
@@ -854,7 +854,7 @@ - (void) setGroupsByEvent: (BOOL)flag
854854
* When set to 0 the stack size is limited by the range of a unsigned int,
855855
* available memory.
856856
*/
857-
- (void) setLevelsOfUndo: (unsigned)num
857+
- (void) setLevelsOfUndo: (NSUInteger)num
858858
{
859859
_levelsOfUndo = num;
860860
if (num > 0)

IFVerticallyExpandingTextField.m

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@interface IFViewMaskPair : NSObject
3232
{
3333
NSView *view;
34-
unsigned int savedAutoresizingMask;
34+
NSUInteger savedAutoresizingMask;
3535
}
3636

3737
- (id) initWithView: (NSView *)aView;
@@ -61,7 +61,7 @@ - (void) restoreAutoresizingMask {
6161
@interface IFVerticallyExpandingTextField (PRIVATE)
6262

6363
- (void) autosizeHeight: (NSTextView *)fieldEditor;
64-
- (void) autosizeSuperviewOfView: (NSView *)originView withGrowth: (float)growth;
64+
- (void) autosizeSuperviewOfView: (NSView *)originView withGrowth: (CGFloat)growth;
6565

6666
- (void) alterAutoresizeMasksForViews: (NSArray *)sibViews
6767
surroundingView: (NSView *)originView;
@@ -134,9 +134,9 @@ - (void) forceAutosize {
134134

135135
- (void) autosizeHeight: (NSTextView *)fieldEditor {
136136
NSRect newFrame = [self frame];
137-
float oldHeight = newFrame.size.height;
138-
float newHeight;
139-
float fieldGrowth;
137+
CGFloat oldHeight = newFrame.size.height;
138+
CGFloat newHeight;
139+
CGFloat fieldGrowth;
140140

141141
if ([self isHidden])
142142
newHeight = 0;
@@ -167,14 +167,14 @@ - (void) autosizeHeight: (NSTextView *)fieldEditor {
167167
[[NSNotificationCenter defaultCenter] postNotificationName: @"IFTextFieldDidExpandNotification"
168168
object: self
169169
userInfo:
170-
[NSDictionary dictionaryWithObject: [NSNumber numberWithFloat: fieldGrowth]
170+
[NSDictionary dictionaryWithObject: [NSNumber numberWithDouble:fieldGrowth]
171171
forKey: @"IFTextFieldNotificationFieldGrowthItem"]];
172172
}
173173
}
174174

175175

176176

177-
- (void) autosizeSuperviewOfView: (NSView *)originView withGrowth: (float)growth {
177+
- (void) autosizeSuperviewOfView: (NSView *)originView withGrowth: (CGFloat)growth {
178178

179179
// Recursively autosize superviews until we get to a window or scroll view
180180

@@ -241,7 +241,7 @@ - (void) alterAutoresizeMasksForViews: (NSArray *)siblingViews
241241

242242
NSEnumerator *enumerator = [siblingViews objectEnumerator];
243243
NSView *sibView;
244-
unsigned int mask;
244+
NSUInteger mask;
245245

246246
while (sibView = [enumerator nextObject]) {
247247
if (sibView != originView) {

0 commit comments

Comments
 (0)