r1438 - in trunk: CompactDisc Configs Controllers CueSheet Decoders Drive FileConversion Metadata Preferences Preferences/EncoderSettingsSheets Tasks/EncoderTasks Tasks/RipperTasks Utilities

5 views
Skip to first unread message

noti...@svn.sbooth.org

unread,
Jan 20, 2011, 1:33:31 AM1/20/11
to max-c...@googlegroups.com
Author: stephen_booth
Date: 2011-01-19 22:33:31 -0800 (Wed, 19 Jan 2011)
New Revision: 1438

Modified:
trunk/CompactDisc/CompactDiscDocument.h
trunk/CompactDisc/CompactDiscDocument.m
trunk/CompactDisc/Track.h
trunk/CompactDisc/Track.m
trunk/Configs/Base.xcconfig
trunk/Controllers/AcknowledgmentsController.m
trunk/Controllers/ApplicationController.m
trunk/Controllers/ComponentVersionsController.mm
trunk/Controllers/EncoderController.m
trunk/Controllers/FormatsController.m
trunk/Controllers/LogController.m
trunk/Controllers/MediaController.m
trunk/Controllers/RipperController.m
trunk/CueSheet/CueSheetDocument.h
trunk/CueSheet/CueSheetDocument.m
trunk/CueSheet/CueSheetTrack.m
trunk/Decoders/CircularBuffer.h
trunk/Decoders/CircularBuffer.m
trunk/Decoders/Decoder.m
trunk/Drive/Drive.h
trunk/Drive/Drive.m
trunk/Drive/SectorRange.h
trunk/Drive/SectorRange.m
trunk/FileConversion/FileArrayController.m
trunk/Metadata/AudioMetadata.mm
trunk/Preferences/EncoderSettingsSheets/EncoderSettingsSheet.m
trunk/Preferences/FormatsPreferencesController.m
trunk/Preferences/OutputPreferencesController.m
trunk/Preferences/PreferencesController.m
trunk/Tasks/EncoderTasks/EncoderTask.m
trunk/Tasks/RipperTasks/RipperTask.m
trunk/Utilities/CoreAudioUtilities.m
trunk/Utilities/Genres.m
trunk/Utilities/ImageAndTextCell.m
trunk/Utilities/UtilityFunctions.m
Log:
Changed use of unsigned to NSUInteger

Modified: trunk/CompactDisc/CompactDiscDocument.h
===================================================================
--- trunk/CompactDisc/CompactDiscDocument.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CompactDisc/CompactDiscDocument.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -155,8 +155,8 @@
- (NSDate *) albumArtDownloadDate;
- (void) setAlbumArtDownloadDate:(NSDate *)albumArtDownloadDate;

-- (unsigned) albumArtWidth;
-- (unsigned) albumArtHeight;
+- (NSUInteger) albumArtWidth;
+- (NSUInteger) albumArtHeight;

- (NSNumber *) discNumber;
- (void) setDiscNumber:(NSNumber *)discNumber;
@@ -177,11 +177,11 @@
- (void) setMusicbrainzAlbumId:(NSString *)musicbrainzAlbumId;

// KVC methods
-- (unsigned) countOfTracks;
-- (Track *) objectInTracksAtIndex:(unsigned)index;
+- (NSUInteger) countOfTracks;
+- (Track *) objectInTracksAtIndex:(NSUInteger)index;

-- (void) insertObject:(Track *)track inTracksAtIndex:(unsigned)index;
-- (void) removeObjectFromTracksAtIndex:(unsigned)index;
+- (void) insertObject:(Track *)track inTracksAtIndex:(NSUInteger)index;
+- (void) removeObjectFromTracksAtIndex:(NSUInteger)index;

@end

Modified: trunk/CompactDisc/CompactDiscDocument.m
===================================================================
--- trunk/CompactDisc/CompactDiscDocument.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CompactDisc/CompactDiscDocument.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -42,7 +42,7 @@
- (void) didEndQueryMusicBrainzSheet:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
- (void) openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;

-- (void) updateMetadataFromMusicBrainz:(unsigned)index;
+- (void) updateMetadataFromMusicBrainz:(NSUInteger)index;
@end

@implementation CompactDiscDocument
@@ -180,7 +180,7 @@
NSString *error = nil;
NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:10];
NSMutableArray *tracks = [NSMutableArray arrayWithCapacity:[self countOfTracks]];
- unsigned i;
+ NSUInteger i;

[result setValue:[self title] forKey:@"title"];
[result setValue:[self artist] forKey:@"artist"];
@@ -225,7 +225,7 @@

dictionary = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error];
if(nil != dictionary) {
- unsigned i;
+ NSUInteger i;
NSArray *tracks = [dictionary valueForKey:@"tracks"];

if([self discInDrive] && [tracks count] != [self countOfTracks]) {
@@ -333,7 +333,7 @@

- (BOOL) ripInProgress
{
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfTracks]; ++i) {
if([[self objectInTracksAtIndex:i] ripInProgress]) {
@@ -346,7 +346,7 @@

- (BOOL) encodeInProgress
{
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfTracks]; ++i) {
if([[self objectInTracksAtIndex:i] encodeInProgress]) {
@@ -361,7 +361,7 @@

- (IBAction) selectAll:(id)sender
{
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfTracks]; ++i)
[[self objectInTracksAtIndex:i] setSelected:YES];
@@ -369,7 +369,7 @@

- (IBAction) selectNone:(id)sender
{
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfTracks]; ++i)
[[self objectInTracksAtIndex:i] setSelected:NO];
@@ -395,7 +395,7 @@

// Verify at least one output format is selected
if(0 == [encoders count]) {
- int result;
+ NSInteger result;

NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle: NSLocalizedStringFromTable(@"OK", @"General", @"")];
@@ -544,7 +544,7 @@

[_mbHelper performQuery:sender];

- unsigned matchCount = [_mbHelper matchCount];
+ NSUInteger matchCount = [_mbHelper matchCount];
NSAssert(0 != matchCount, NSLocalizedStringFromTable(@"No matching discs were found.", @"Exceptions", @""));

// If only match was found, update ourselves
@@ -554,7 +554,7 @@
MusicBrainzMatchSheet *sheet = [[MusicBrainzMatchSheet alloc] init];
NSMutableArray *matches = [[NSMutableArray alloc] init];

- unsigned i;
+ NSUInteger i;
for(i = 0; i < matchCount; ++i)
[matches addObject:[_mbHelper matchAtIndex:i]];

@@ -606,7 +606,7 @@

- (NSArray *) selectedTracks
{
- unsigned i;
+ NSUInteger i;
NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self countOfTracks]];
Track *track;

@@ -635,8 +635,8 @@

- (NSImage *) albumArt { return [[_albumArt retain] autorelease]; }
- (NSDate *) albumArtDownloadDate { return [[_albumArtDownloadDate retain] autorelease]; }
-- (unsigned) albumArtWidth { return (unsigned)[[self albumArt] size].width; }
-- (unsigned) albumArtHeight { return (unsigned)[[self albumArt] size].height; }
+- (NSUInteger) albumArtWidth { return (NSUInteger)[[self albumArt] size].width; }
+- (NSUInteger) albumArtHeight { return (NSUInteger)[[self albumArt] size].height; }

- (NSNumber *) discNumber { return [[_discNumber retain] autorelease]; }
- (NSNumber *) discTotal { return [[_discTotal retain] autorelease]; }
@@ -647,14 +647,14 @@

- (NSString *) MCN { return [[_MCN retain] autorelease]; }

-- (unsigned) countOfTracks { return [_tracks count]; }
-- (Track *) objectInTracksAtIndex:(unsigned)idx { return [_tracks objectAtIndex:idx]; }
+- (NSUInteger) countOfTracks { return [_tracks count]; }
+- (Track *) objectInTracksAtIndex:(NSUInteger)idx { return [_tracks objectAtIndex:idx]; }

#pragma mark Mutators

- (void) setDisc:(CompactDisc *)disc
{
- unsigned i;
+ NSUInteger i;

if(NO == [[self disc] isEqual:disc]) {

@@ -809,8 +809,8 @@
- (void) setMusicbrainzAlbumId:(NSString *)musicbrainzAlbumId
{ [_musicbrainzAlbumId release]; _musicbrainzAlbumId = [musicbrainzAlbumId retain]; }

-- (void) insertObject:(Track *)track inTracksAtIndex:(unsigned)idx { [_tracks insertObject:track atIndex:idx]; }
-- (void) removeObjectFromTracksAtIndex:(unsigned)idx { [_tracks removeObjectAtIndex:idx]; }
+- (void) insertObject:(Track *)track inTracksAtIndex:(NSUInteger)idx { [_tracks insertObject:track atIndex:idx]; }
+- (void) removeObjectFromTracksAtIndex:(NSUInteger)idx { [_tracks removeObjectAtIndex:idx]; }

@end

@@ -859,8 +859,8 @@
{
if(NSOKButton == returnCode) {
NSArray *filesToOpen = [sheet filenames];
- unsigned count = [filesToOpen count];
- unsigned i;
+ NSUInteger count = [filesToOpen count];
+ NSUInteger i;
NSImage *image = nil;

for(i = 0; i < count; ++i) {
@@ -872,7 +872,7 @@
}
}

-- (void) updateMetadataFromMusicBrainz:(unsigned)index
+- (void) updateMetadataFromMusicBrainz:(NSUInteger)index
{
NSDictionary *releaseDictionary = [_mbHelper matchAtIndex:index];

@@ -889,7 +889,7 @@

NSArray *tracksArray = [releaseDictionary valueForKey:@"tracks"];

- unsigned i;
+ NSUInteger i;
for(i = 0; i < [tracksArray count]; ++i) {
NSDictionary *trackDictionary = [tracksArray objectAtIndex:i];
Track *track = [self objectInTracksAtIndex:i];

Modified: trunk/CompactDisc/Track.h
===================================================================
--- trunk/CompactDisc/Track.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CompactDisc/Track.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -29,7 +29,7 @@
CompactDiscDocument *_document;

BOOL _ripInProgress;
- unsigned _activeEncoders;
+ NSUInteger _activeEncoders;

// View properties
BOOL _selected;
@@ -47,10 +47,10 @@
NSString *_musicbrainzArtistId;

// Physical track properties
- unsigned _number;
- unsigned _firstSector;
- unsigned _lastSector;
- unsigned _channels;
+ NSUInteger _number;
+ NSUInteger _firstSector;
+ NSUInteger _lastSector;
+ NSUInteger _channels;
BOOL _preEmphasis;
BOOL _copyPermitted;
NSString *_ISRC;
@@ -90,23 +90,23 @@
- (NSString *) comment;
- (void) setComment:(NSString *)comment;

-- (unsigned) byteSize;
+- (NSUInteger) byteSize;

-- (unsigned) minute;
-- (unsigned) second;
-- (unsigned) frame;
+- (NSUInteger) minute;
+- (NSUInteger) second;
+- (NSUInteger) frame;

-- (unsigned) number;
-- (void) setNumber:(unsigned)number;
+- (NSUInteger) number;
+- (void) setNumber:(NSUInteger)number;

-- (unsigned) firstSector;
-- (void) setFirstSector:(unsigned)firstSector;
+- (NSUInteger) firstSector;
+- (void) setFirstSector:(NSUInteger)firstSector;

-- (unsigned) lastSector;
-- (void) setLastSector:(unsigned)lastSector;
+- (NSUInteger) lastSector;
+- (void) setLastSector:(NSUInteger)lastSector;

-- (unsigned) channels;
-- (void) setChannels:(unsigned)channels;
+- (NSUInteger) channels;
+- (void) setChannels:(NSUInteger)channels;

- (BOOL) preEmphasis;
- (void) setPreEmphasis:(BOOL)preEmphasis;

Modified: trunk/CompactDisc/Track.m
===================================================================
--- trunk/CompactDisc/Track.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CompactDisc/Track.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -90,28 +90,28 @@

#pragma mark Accessors

-- (unsigned) minute
+- (NSUInteger) minute
{
- unsigned sector = [self firstSector];
- unsigned offset = [self lastSector] - sector + 1;
+ NSUInteger sector = [self firstSector];
+ NSUInteger offset = [self lastSector] - sector + 1;

- return (unsigned) (offset / (60 * 75));
+ return (NSUInteger) (offset / (60 * 75));
}

-- (unsigned) second
+- (NSUInteger) second
{
- unsigned sector = [self firstSector];
- unsigned offset = [self lastSector] - sector + 1;
+ NSUInteger sector = [self firstSector];
+ NSUInteger offset = [self lastSector] - sector + 1;

- return (unsigned) ((offset / 75) % 60);
+ return (NSUInteger) ((offset / 75) % 60);
}

-- (unsigned) frame
+- (NSUInteger) frame
{
- unsigned sector = [self firstSector];
- unsigned offset = [self lastSector] - sector + 1;
+ NSUInteger sector = [self firstSector];
+ NSUInteger offset = [self lastSector] - sector + 1;

- return (unsigned) (offset % 75);
+ return (NSUInteger) (offset % 75);
}

- (NSString *) length { return [NSString stringWithFormat:@"%i:%02i", [self minute], [self second]]; }
@@ -129,15 +129,15 @@
- (NSString *) composer { return [[_composer retain] autorelease]; }
- (NSString *) comment { return [[_comment retain] autorelease]; }

-- (unsigned) byteSize { return (([self lastSector] - [self firstSector]) * kCDSectorSizeCDDA); }
+- (NSUInteger) byteSize { return (([self lastSector] - [self firstSector]) * kCDSectorSizeCDDA); }

- (NSString *) musicbrainzTrackId { return [[_musicbrainzTrackId retain] autorelease]; }
- (NSString *) musicbrainzArtistId { return [[_musicbrainzArtistId retain] autorelease]; }

-- (unsigned) number { return _number; }
-- (unsigned) firstSector { return _firstSector; }
-- (unsigned) lastSector { return _lastSector; }
-- (unsigned) channels { return _channels; }
+- (NSUInteger) number { return _number; }
+- (NSUInteger) firstSector { return _firstSector; }
+- (NSUInteger) lastSector { return _lastSector; }
+- (NSUInteger) channels { return _channels; }
- (BOOL) preEmphasis { return _preEmphasis; }
- (BOOL) copyPermitted { return _copyPermitted; }
- (NSString *) ISRC { return [[_ISRC retain] autorelease]; }
@@ -156,10 +156,10 @@
- (void) setMusicbrainzArtistId:(NSString *)musicbrainzArtistId
{ [_musicbrainzArtistId release]; _musicbrainzArtistId = [musicbrainzArtistId retain]; }

-- (void) setNumber:(unsigned)number { _number = number; }
-- (void) setFirstSector:(unsigned)firstSector { _firstSector = firstSector; }
-- (void) setLastSector:(unsigned)lastSector { _lastSector = lastSector; }
-- (void) setChannels:(unsigned)channels { _channels = channels; }
+- (void) setNumber:(NSUInteger)number { _number = number; }
+- (void) setFirstSector:(NSUInteger)firstSector { _firstSector = firstSector; }
+- (void) setLastSector:(NSUInteger)lastSector { _lastSector = lastSector; }
+- (void) setChannels:(NSUInteger)channels { _channels = channels; }
- (void) setPreEmphasis:(BOOL)preEmphasis { _preEmphasis = preEmphasis; }
- (void) setCopyPermitted:(BOOL)copyPermitted { _copyPermitted = copyPermitted; }
- (void) setISRC:(NSString *)ISRC { [_ISRC release]; _ISRC = [ISRC retain]; }
@@ -296,8 +296,8 @@
_musicbrainzArtistId = [[properties valueForKey:@"musicbrainzArtistId"] retain];

_number = [[properties valueForKey:@"number"] unsignedIntValue];
- _firstSector = [[properties valueForKey:@"firstSector"] unsignedLongValue];
- _lastSector = [[properties valueForKey:@"lastSector"] unsignedLongValue];
+ _firstSector = [[properties valueForKey:@"firstSector"] unsignedIntegerValue];
+ _lastSector = [[properties valueForKey:@"lastSector"] unsignedIntegerValue];
_channels = [[properties valueForKey:@"channels"] unsignedIntValue];
_preEmphasis = [[properties valueForKey:@"preEmphasis"] boolValue];
_copyPermitted = [[properties valueForKey:@"copyPermitted"] boolValue];
@@ -377,12 +377,12 @@
return [result autorelease];
}

-#pragma Scripting
+#pragma mark Scripting

- (NSScriptObjectSpecifier *) objectSpecifier
{
NSArray *tracks = [[self document] valueForKey:@"tracks"];
- unsigned idx = [tracks indexOfObjectIdenticalTo:self];
+ NSUInteger idx = [tracks indexOfObjectIdenticalTo:self];

if(NSNotFound != idx) {
NSScriptObjectSpecifier *containerRef = [[self document] objectSpecifier];

Modified: trunk/Configs/Base.xcconfig
===================================================================
--- trunk/Configs/Base.xcconfig 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Configs/Base.xcconfig 2011-01-20 06:33:31 UTC (rev 1438)
@@ -33,6 +33,6 @@
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
-GCC_WARN_UNUSED_PARAMETER = YES
+//GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNUSED_VARIABLE = YES

Modified: trunk/Controllers/AcknowledgmentsController.m
===================================================================
--- trunk/Controllers/AcknowledgmentsController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/AcknowledgmentsController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -69,7 +69,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Controllers/ApplicationController.m
===================================================================
--- trunk/Controllers/ApplicationController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/ApplicationController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -108,7 +108,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

@@ -228,14 +228,10 @@

- (void) encodeFiles:(NSArray *)filenames
{
- NSEnumerator *enumerator = nil;
- NSString *filename = nil;
-
[[FileConversionController sharedController] showWindow:self];

- for(filename in filenames) {
+ for(NSString *filename in filenames)
[[FileConversionController sharedController] addFile:filename];
- }
}

- (IBAction) toggleRipperWindow:(id)sender

Modified: trunk/Controllers/ComponentVersionsController.mm
===================================================================
--- trunk/Controllers/ComponentVersionsController.mm 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/ComponentVersionsController.mm 2011-01-20 06:33:31 UTC (rev 1438)
@@ -94,7 +94,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Controllers/EncoderController.m
===================================================================
--- trunk/Controllers/EncoderController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/EncoderController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -76,7 +76,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

@@ -131,7 +131,7 @@
TaskInfo *taskInfo = [TaskInfo taskInfoWithSettings:settings metadata:metadata];
NSArray *outputFormats = [settings objectForKey:@"encoders"];
NSDictionary *format = nil;
- unsigned i = 0;
+ NSUInteger i = 0;

[taskInfo setInputFilenames:filenames];
[taskInfo setInputTracks:inputTracks];
@@ -211,7 +211,7 @@
_freeze = NO;
}

-#pragma Action Methods
+#pragma mark mark Action Methods

- (IBAction) stopSelectedTasks:(id)sender
{
@@ -346,7 +346,7 @@

#pragma mark Task Management

-- (unsigned) countOfTasks { return [_tasks count]; }
+- (NSUInteger) countOfTasks { return [_tasks count]; }
- (BOOL) hasTasks { return (0 != [_tasks count]); }

@end
@@ -386,9 +386,9 @@

- (void) spawnThreads
{
- unsigned maxThreads = (unsigned) [[NSUserDefaults standardUserDefaults] integerForKey:@"maximumEncoderThreads"];
- unsigned i;
- unsigned limit;
+ NSUInteger maxThreads = (NSUInteger) [[NSUserDefaults standardUserDefaults] integerForKey:@"maximumEncoderThreads"];
+ NSUInteger i;
+ NSUInteger limit;

if(0 == [_tasks count] || _freeze)
return;

Modified: trunk/Controllers/FormatsController.m
===================================================================
--- trunk/Controllers/FormatsController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/FormatsController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -69,7 +69,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Controllers/LogController.m
===================================================================
--- trunk/Controllers/LogController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/LogController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -77,7 +77,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

@@ -217,7 +217,7 @@
nil];
}

-- (unsigned) countOfLogEntries { return [_logEntries count]; }
+- (NSUInteger) countOfLogEntries { return [_logEntries count]; }
- (NSDictionary *) objectInLogEntriesAtIndex:(unsigned)index { return [_logEntries objectAtIndex:index]; }

@end

Modified: trunk/Controllers/MediaController.m
===================================================================
--- trunk/Controllers/MediaController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/MediaController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -195,7 +195,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Controllers/RipperController.m
===================================================================
--- trunk/Controllers/RipperController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Controllers/RipperController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -69,7 +69,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

@@ -212,7 +212,7 @@
_freeze = NO;
}

-#pragma Action Methods
+#pragma mark Action Methods

- (IBAction) stopSelectedTasks:(id)sender
{
@@ -316,7 +316,7 @@

#pragma mark Task Management

-- (unsigned) countOfTasks { return [_tasks count]; }
+- (NSUInteger) countOfTasks { return [_tasks count]; }
- (BOOL) hasTasks { return (0 != [_tasks count]); }

@end

Modified: trunk/CueSheet/CueSheetDocument.h
===================================================================
--- trunk/CueSheet/CueSheetDocument.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CueSheet/CueSheetDocument.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -112,8 +112,8 @@
- (NSDate *) albumArtDownloadDate;
- (void) setAlbumArtDownloadDate:(NSDate *)albumArtDownloadDate;

-- (unsigned) albumArtWidth;
-- (unsigned) albumArtHeight;
+- (NSUInteger) albumArtWidth;
+- (NSUInteger) albumArtHeight;

- (NSNumber *) discNumber;
- (void) setDiscNumber:(NSNumber *)discNumber;
@@ -131,10 +131,10 @@
- (NSString *) discID;

// KVC methods
-- (unsigned) countOfTracks;
-- (CueSheetTrack *) objectInTracksAtIndex:(unsigned)index;
+- (NSUInteger) countOfTracks;
+- (CueSheetTrack *) objectInTracksAtIndex:(NSUInteger)index;

-- (void) insertObject:(CueSheetTrack *)track inTracksAtIndex:(unsigned)index;
-- (void) removeObjectFromTracksAtIndex:(unsigned)index;
+- (void) insertObject:(CueSheetTrack *)track inTracksAtIndex:(NSUInteger)index;
+- (void) removeObjectFromTracksAtIndex:(NSUInteger)index;

@end

Modified: trunk/CueSheet/CueSheetDocument.m
===================================================================
--- trunk/CueSheet/CueSheetDocument.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CueSheet/CueSheetDocument.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -40,7 +40,7 @@
- (void) readFromCDInfoFileIfPresent;
- (void) openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
- (void) didEndQueryMusicBrainzSheet:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
-- (void) updateMetadataFromMusicBrainz:(unsigned)index;
+- (void) updateMetadataFromMusicBrainz:(NSUInteger)index;
@end

@implementation CueSheetDocument
@@ -207,7 +207,7 @@
}

// Parse each track
- int i;
+ NSUInteger i;
for(i = 1; i <= cd_get_ntrack(cd); ++i) {

struct Track *track = cd_get_track(cd, i);
@@ -359,7 +359,7 @@

FLAC__metadata_iterator_init(iterator, chain);

- unsigned i;
+ NSUInteger i;
FLAC__StreamMetadata_StreamInfo streamInfo;

do {
@@ -392,14 +392,14 @@

// Fill in frame counts
if(0 < i) {
- unsigned frameCount = (block->data.cue_sheet.tracks[i].offset - 1) - block->data.cue_sheet.tracks[i - 1].offset;
+ NSUInteger frameCount = (block->data.cue_sheet.tracks[i].offset - 1) - block->data.cue_sheet.tracks[i - 1].offset;
[[self objectInTracksAtIndex:(i - 1)] setFrameCount:frameCount];
}

// Special handling for the last audio track
// FIXME: Is it safe the assume the lead out will always be the final track in the cue sheet?
if(i == block->data.cue_sheet.num_tracks - 1 - 1) {
- unsigned frameCount = streamInfo.total_samples - block->data.cue_sheet.tracks[i].offset + 1;
+ NSUInteger frameCount = streamInfo.total_samples - block->data.cue_sheet.tracks[i].offset + 1;
[newTrack setFrameCount:frameCount];
}

@@ -461,14 +461,14 @@

- (IBAction) selectAll:(id)sender
{
- unsigned i;
+ NSUInteger i;
for(i = 0; i < [self countOfTracks]; ++i)
[[self objectInTracksAtIndex:i] setSelected:YES];
}

- (IBAction) selectNone:(id)sender
{
- unsigned i;
+ NSUInteger i;
for(i = 0; i < [self countOfTracks]; ++i)
[[self objectInTracksAtIndex:i] setSelected:NO];
}
@@ -477,7 +477,7 @@
{
NSMutableDictionary *postProcessingOptions = nil;
NSArray *applicationPaths = nil;
- unsigned i;
+ NSUInteger i;

// Do nothing if the selection is empty
NSAssert(NO == [self emptySelection], NSLocalizedStringFromTable(@"No tracks are selected for encoding.", @"Exceptions", @""));
@@ -487,7 +487,7 @@

// Verify at least one output format is selected
if(0 == [encoders count]) {
- int result;
+ NSInteger result;

NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle: NSLocalizedStringFromTable(@"OK", @"General", @"")];
@@ -607,7 +607,7 @@

[_mbHelper performQuery:sender];

- unsigned matchCount = [_mbHelper matchCount];
+ NSUInteger matchCount = [_mbHelper matchCount];
NSAssert(0 != matchCount, NSLocalizedStringFromTable(@"No matching discs were found.", @"Exceptions", @""));

// If only match was found, update ourselves
@@ -617,7 +617,7 @@
MusicBrainzMatchSheet *sheet = [[MusicBrainzMatchSheet alloc] init];
NSMutableArray *matches = [[NSMutableArray alloc] init];

- unsigned i;
+ NSUInteger i;
for(i = 0; i < matchCount; ++i)
[matches addObject:[_mbHelper matchAtIndex:i]];

@@ -666,7 +666,7 @@

- (NSArray *) selectedTracks
{
- unsigned i;
+ NSUInteger i;
NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self countOfTracks]];

for(i = 0; i < [self countOfTracks]; ++i) {
@@ -689,8 +689,8 @@

- (NSImage *) albumArt { return [[_albumArt retain] autorelease]; }
- (NSDate *) albumArtDownloadDate { return [[_albumArtDownloadDate retain] autorelease]; }
-- (unsigned) albumArtWidth { return (unsigned)[[self albumArt] size].width; }
-- (unsigned) albumArtHeight { return (unsigned)[[self albumArt] size].height; }
+- (NSUInteger) albumArtWidth { return (NSUInteger)[[self albumArt] size].width; }
+- (NSUInteger) albumArtHeight { return (NSUInteger)[[self albumArt] size].height; }

- (NSNumber *) discNumber { return [[_discNumber retain] autorelease]; }
- (NSNumber *) discTotal { return [[_discTotal retain] autorelease]; }
@@ -698,8 +698,8 @@

- (NSString *) MCN { return [[_MCN retain] autorelease]; }

-- (unsigned) countOfTracks { return [_tracks count]; }
-- (CueSheetTrack *) objectInTracksAtIndex:(unsigned)idx { return [_tracks objectAtIndex:idx]; }
+- (NSUInteger) countOfTracks { return [_tracks count]; }
+- (CueSheetTrack *) objectInTracksAtIndex:(NSUInteger)idx { return [_tracks objectAtIndex:idx]; }

- (NSString *) discID
{
@@ -711,15 +711,15 @@

int offsets[100];

- unsigned i;
+ NSUInteger i;
for(i = 0; i < [self countOfTracks]; ++i) {
CueSheetTrack *track = [self objectInTracksAtIndex:i];
- UInt32 firstSector = [track startingFrame] / ((unsigned)[track sampleRate] / 75);
+ UInt32 firstSector = [track startingFrame] / ((NSUInteger)[track sampleRate] / 75);
offsets[1 + i] = firstSector + 150;

// Use the sector immediately following the last track's last sector for lead out
if(1 + i == [self countOfTracks]) {
- UInt32 sectorCount = [track frameCount] / ((unsigned)[track sampleRate] / 75);
+ UInt32 sectorCount = [track frameCount] / ((NSUInteger)[track sampleRate] / 75);
offsets[0] = offsets[1 + i] + sectorCount;
}
}
@@ -850,8 +850,8 @@
}
}

-- (void) insertObject:(CueSheetTrack *)track inTracksAtIndex:(unsigned)idx { [_tracks insertObject:track atIndex:idx]; }
-- (void) removeObjectFromTracksAtIndex:(unsigned)idx { [_tracks removeObjectAtIndex:idx]; }
+- (void) insertObject:(CueSheetTrack *)track inTracksAtIndex:(NSUInteger)idx { [_tracks insertObject:track atIndex:idx]; }
+- (void) removeObjectFromTracksAtIndex:(NSUInteger)idx { [_tracks removeObjectAtIndex:idx]; }

@end

@@ -862,7 +862,7 @@
NSString *filename = [NSString stringWithFormat:@"%@/%@.cdinfo", getApplicationDataDirectory(), [self discID]];
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:filename];
if(nil != dictionary) {
- unsigned i;
+ NSUInteger i;

NSArray *tracks = [dictionary valueForKey:@"tracks"];
for(i = 0; i < [tracks count]; ++i) {
@@ -870,7 +870,7 @@

// Match tracks by track number
CueSheetTrack *track = nil;
- unsigned j;
+ NSUInteger j;
for(j = 0; j < [self countOfTracks]; ++j) {
track = [self objectInTracksAtIndex:j];
if([track number] == [[properties objectForKey:@"number"] unsignedIntValue])
@@ -946,8 +946,8 @@
{
if(NSOKButton == returnCode) {
NSArray *filesToOpen = [sheet filenames];
- unsigned count = [filesToOpen count];
- unsigned i;
+ NSUInteger count = [filesToOpen count];
+ NSUInteger i;
NSImage *image = nil;

for(i = 0; i < count; ++i) {
@@ -970,7 +970,7 @@
[musicBrainzMatchSheet release];
}

-- (void) updateMetadataFromMusicBrainz:(unsigned)index
+- (void) updateMetadataFromMusicBrainz:(NSUInteger)index
{
NSDictionary *releaseDictionary = [_mbHelper matchAtIndex:index];

@@ -985,7 +985,7 @@

NSArray *tracksArray = [releaseDictionary valueForKey:@"tracks"];

- unsigned i;
+ NSUInteger i;
for(i = 0; i < [tracksArray count]; ++i) {
NSDictionary *trackDictionary = [tracksArray objectAtIndex:i];
CueSheetTrack *track = [self objectInTracksAtIndex:i];

Modified: trunk/CueSheet/CueSheetTrack.m
===================================================================
--- trunk/CueSheet/CueSheetTrack.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/CueSheet/CueSheetTrack.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -277,7 +277,7 @@
{
AudioMetadata *result = [[AudioMetadata alloc] init];

- [result setTrackNumber:[NSNumber numberWithInt:[self number]]];
+ [result setTrackNumber:[NSNumber numberWithUnsignedInteger:[self number]]];
[result setTrackTitle:[self title]];
[result setTrackArtist:[self artist]];
[result setTrackDate:[self date]];
@@ -305,12 +305,12 @@
return [result autorelease];
}

-#pragma Scripting
+#pragma mark Scripting

- (NSScriptObjectSpecifier *) objectSpecifier
{
NSArray *tracks = [[self document] valueForKey:@"tracks"];
- unsigned idx = [tracks indexOfObjectIdenticalTo:self];
+ NSUInteger idx = [tracks indexOfObjectIdenticalTo:self];

if(NSNotFound != idx) {
NSScriptObjectSpecifier *containerRef = [[self document] objectSpecifier];

Modified: trunk/Decoders/CircularBuffer.h
===================================================================
--- trunk/Decoders/CircularBuffer.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Decoders/CircularBuffer.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -24,29 +24,29 @@
@interface CircularBuffer : NSObject
{
uint8_t *_buffer;
- unsigned _bufsize;
+ NSUInteger _bufsize;

uint8_t *_readPtr;
uint8_t *_writePtr;
}

-- (id) initWithSize:(unsigned)size;
+- (id) initWithSize:(NSUInteger)size;

- (void) reset;

-- (unsigned) size;
-- (void) resize:(unsigned)size;
+- (NSUInteger) size;
+- (void) resize:(NSUInteger)size;

-- (unsigned) bytesAvailable;
-- (unsigned) freeSpaceAvailable;
+- (NSUInteger) bytesAvailable;
+- (NSUInteger) freeSpaceAvailable;

-- (unsigned) putData:(const void *)data byteCount:(unsigned)byteCount;
-- (unsigned) getData:(void *)buffer byteCount:(unsigned)byteCount;
+- (NSUInteger) putData:(const void *)data byteCount:(NSUInteger)byteCount;
+- (NSUInteger) getData:(void *)buffer byteCount:(NSUInteger)byteCount;

- (const void *) exposeBufferForReading;
-- (void) readBytes:(unsigned)byteCount;
+- (void) readBytes:(NSUInteger)byteCount;

- (void *) exposeBufferForWriting;
-- (void) wroteBytes:(unsigned)byteCount;
+- (void) wroteBytes:(NSUInteger)byteCount;

@end

Modified: trunk/Decoders/CircularBuffer.m
===================================================================
--- trunk/Decoders/CircularBuffer.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Decoders/CircularBuffer.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -22,8 +22,8 @@

@interface CircularBuffer (Private)
- (void) normalizeBuffer;
-- (unsigned) contiguousBytesAvailable;
-- (unsigned) contiguousFreeSpaceAvailable;
+- (NSUInteger) contiguousBytesAvailable;
+- (NSUInteger) contiguousFreeSpaceAvailable;
@end

@implementation CircularBuffer
@@ -33,7 +33,7 @@
return [self initWithSize:10 * 1024];
}

-- (id) initWithSize:(unsigned)size
+- (id) initWithSize:(NSUInteger)size
{
NSParameterAssert(0 < size);

@@ -52,9 +52,9 @@
}

- (void) reset { _readPtr = _writePtr = _buffer; }
-- (unsigned) size { return _bufsize; }
+- (NSUInteger) size { return _bufsize; }

-- (void) resize:(unsigned)size
+- (void) resize:(NSUInteger)size
{
uint8_t *newbuf;

@@ -81,14 +81,14 @@
_bufsize = size;
}

-- (unsigned) bytesAvailable
+- (NSUInteger) bytesAvailable
{
- return (_writePtr >= _readPtr ? (unsigned)(_writePtr - _readPtr) : [self size] - (unsigned)(_readPtr - _writePtr));
+ return (_writePtr >= _readPtr ? (NSUInteger)(_writePtr - _readPtr) : [self size] - (NSUInteger)(_readPtr - _writePtr));
}

-- (unsigned) freeSpaceAvailable { return _bufsize - [self bytesAvailable]; }
+- (NSUInteger) freeSpaceAvailable { return _bufsize - [self bytesAvailable]; }

-- (unsigned) putData:(const void *)data byteCount:(unsigned)byteCount
+- (NSUInteger) putData:(const void *)data byteCount:(NSUInteger)byteCount
{
NSParameterAssert(NULL != data);
NSParameterAssert(0 < byteCount);
@@ -101,8 +101,8 @@
return byteCount;
}
else {
- unsigned blockSize = [self contiguousFreeSpaceAvailable];
- unsigned wrapSize = byteCount - blockSize;
+ NSUInteger blockSize = [self contiguousFreeSpaceAvailable];
+ NSUInteger wrapSize = byteCount - blockSize;

memcpy(_writePtr, data, blockSize);
_writePtr = _buffer;
@@ -114,7 +114,7 @@
}
}

-- (unsigned) getData:(void *)buffer byteCount:(unsigned)byteCount
+- (NSUInteger) getData:(void *)buffer byteCount:(NSUInteger)byteCount
{
NSParameterAssert(NULL != buffer);

@@ -133,8 +133,8 @@
_readPtr += byteCount;
}
else {
- unsigned blockSize = [self contiguousBytesAvailable];
- unsigned wrapSize = byteCount - blockSize;
+ NSUInteger blockSize = [self contiguousBytesAvailable];
+ NSUInteger wrapSize = byteCount - blockSize;

memcpy(buffer, _readPtr, blockSize);
_readPtr = _buffer;
@@ -148,7 +148,7 @@

- (const void *) exposeBufferForReading { [self normalizeBuffer]; return _readPtr; }

-- (void) readBytes:(unsigned)byteCount
+- (void) readBytes:(NSUInteger)byteCount
{
uint8_t *limit = _buffer + _bufsize;

@@ -161,7 +161,7 @@

- (void *) exposeBufferForWriting { [self normalizeBuffer]; return _writePtr; }

-- (void) wroteBytes:(unsigned)byteCount
+- (void) wroteBytes:(NSUInteger)byteCount
{
uint8_t *limit = _buffer + _bufsize;

@@ -176,14 +176,14 @@

@implementation CircularBuffer (Private)

-- (unsigned) contiguousBytesAvailable
+- (NSUInteger) contiguousBytesAvailable
{
uint8_t *limit = _buffer + _bufsize;

return (_writePtr >= _readPtr ? _writePtr - _readPtr : limit - _readPtr);
}

-- (unsigned) contiguousFreeSpaceAvailable
+- (NSUInteger) contiguousFreeSpaceAvailable
{
uint8_t *limit = _buffer + _bufsize;

@@ -196,8 +196,8 @@
_writePtr = _readPtr = _buffer;
}
else if(_writePtr > _readPtr) {
- unsigned count = _writePtr - _readPtr;
- unsigned delta = _readPtr - _buffer;
+ NSUInteger count = _writePtr - _readPtr;
+ NSUInteger delta = _readPtr - _buffer;

memmove(_buffer, _readPtr, count);

@@ -205,8 +205,8 @@
_writePtr -= delta;
}
else {
- unsigned chunkASize = [self contiguousBytesAvailable];
- unsigned chunkBSize = [self bytesAvailable] - [self contiguousBytesAvailable];
+ NSUInteger chunkASize = [self contiguousBytesAvailable];
+ NSUInteger chunkBSize = [self bytesAvailable] - [self contiguousBytesAvailable];
uint8_t *chunkA = NULL;
uint8_t *chunkB = NULL;

Modified: trunk/Decoders/Decoder.m
===================================================================
--- trunk/Decoders/Decoder.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Decoders/Decoder.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -82,7 +82,7 @@
else if([libsndfileExtensions containsObject:extension])
result = [[LibsndfileDecoder alloc] initWithFilename:filename];
else
- @throw [FileFormatNotSupportedException exceptionWithReason:NSLocalizedStringFromTable(@"The file's format was not recognized.", @"Exceptions", @"") userInfo:@""];
+ @throw [FileFormatNotSupportedException exceptionWithReason:NSLocalizedStringFromTable(@"The file's format was not recognized.", @"Exceptions", @"") userInfo:nil];

return [result autorelease];
}

Modified: trunk/Drive/Drive.h
===================================================================
--- trunk/Drive/Drive.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Drive/Drive.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -34,13 +34,13 @@
NSString *_deviceName;
int _fd;

- unsigned _cacheSize;
+ NSUInteger _cacheSize;

NSMutableArray *_sessions;
NSMutableArray *_tracks;

- unsigned _firstSession;
- unsigned _lastSession;
+ NSUInteger _firstSession;
+ NSUInteger _lastSession;
}

// Set up to read the drive corresponding to deviceName (will open the device and read the CDTOC)
@@ -52,37 +52,37 @@
- (void) closeDevice;

// Disc session information
-- (unsigned) firstSession;
-- (unsigned) lastSession;
+- (NSUInteger) firstSession;
+- (NSUInteger) lastSession;

-- (SessionDescriptor *) sessionNumber:(unsigned)number;
+- (SessionDescriptor *) sessionNumber:(NSUInteger)number;

-- (unsigned) firstTrackForSession:(unsigned)session;
-- (unsigned) lastTrackForSession:(unsigned)session;
+- (NSUInteger) firstTrackForSession:(NSUInteger)session;
+- (NSUInteger) lastTrackForSession:(NSUInteger)session;

// Session sector information
-- (unsigned) firstSectorForSession:(unsigned)session;
-- (unsigned) lastSectorForSession:(unsigned)session;
+- (NSUInteger) firstSectorForSession:(NSUInteger)session;
+- (NSUInteger) lastSectorForSession:(NSUInteger)session;

-- (unsigned) leadOutForSession:(unsigned)session;
+- (NSUInteger) leadOutForSession:(NSUInteger)session;

-- (unsigned) sessionContainingSector:(unsigned)sector;
-- (unsigned) sessionContainingSectorRange:(SectorRange *)sectorRange;
+- (NSUInteger) sessionContainingSector:(NSUInteger)sector;
+- (NSUInteger) sessionContainingSectorRange:(SectorRange *)sectorRange;

// Disc track information
-- (TrackDescriptor *) trackNumber:(unsigned)number;
+- (TrackDescriptor *) trackNumber:(NSUInteger)number;

// Track sector information
-- (unsigned) firstSectorForTrack:(unsigned)number;
-- (unsigned) lastSectorForTrack:(unsigned)number;
+- (NSUInteger) firstSectorForTrack:(NSUInteger)number;
+- (NSUInteger) lastSectorForTrack:(NSUInteger)number;

// Device name
- (NSString *) deviceName;

// Drive cache information
-- (unsigned) cacheSize;
-- (unsigned) cacheSectorSize;
-- (void) setCacheSize:(unsigned)cacheSize;
+- (NSUInteger) cacheSize;
+- (NSUInteger) cacheSectorSize;
+- (void) setCacheSize:(NSUInteger)cacheSize;

// Drive speed
- (uint16_t) speed;
@@ -92,39 +92,39 @@
- (void) clearCache:(SectorRange *)range;

// Read a chunk of CD-DA data (buffer should be kCDSectorSizeCDDA * sectorCount bytes)
-- (unsigned) readAudio:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readAudio:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readAudio:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readAudio:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readAudio:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readAudio:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Read Q sub-channel (buffer should be kCDSectorSizeQSubchannel * sectorCount bytes)
-- (unsigned) readQSubchannel:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readQSubchannel:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Read error flags (buffer should be kCDSectorSizeErrorFlags * sectorCount bytes)
-- (unsigned) readErrorFlags:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readErrorFlags:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readErrorFlags:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readErrorFlags:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readErrorFlags:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readErrorFlags:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Read a chunk of CD-DA data, with Q sub-channel (buffer should be (kCDSectorSizeCDDA + kCDSectorSizeQSubchannel) * sectorCount bytes)
-- (unsigned) readAudioAndQSubchannel:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readAudioAndQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readAudioAndQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Read a chunk of CD-DA data, with error flags (buffer should be (kCDSectorSizeCDDA + kCDSectorSizeErrorFlags) * sectorCount bytes)
-- (unsigned) readAudioAndErrorFlags:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readAudioAndErrorFlags:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readAudioAndErrorFlags:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Read a chunk of CD-DA data, with error flags and Q sub-channel (buffer should be (kCDSectorSizeCDDA + kCDSectorSizeErrorFlags + kCDSectorSizeQSubchannel) * sectorCount bytes)
-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sector:(unsigned)sector;
-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sector:(NSUInteger)sector;
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sectorRange:(SectorRange *)range;
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;

// Get the CD's media catalog number
- (NSString *) readMCN;

// Get the ISRC for the specified track
-- (NSString *) readISRC:(unsigned)track;
+- (NSString *) readISRC:(NSUInteger)track;

@end

Modified: trunk/Drive/Drive.m
===================================================================
--- trunk/Drive/Drive.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Drive/Drive.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -29,19 +29,19 @@
@interface Drive (Private)
- (void) logMessage:(NSString *)message;

-- (unsigned) countOfTracks;
-- (unsigned) countOfSessions;
+- (NSUInteger) countOfTracks;
+- (NSUInteger) countOfSessions;

-- (TrackDescriptor *) objectInTracksAtIndex:(unsigned)index;
-- (SessionDescriptor *) objectInSessionsAtIndex:(unsigned)index;
+- (TrackDescriptor *) objectInTracksAtIndex:(NSUInteger)index;
+- (SessionDescriptor *) objectInSessionsAtIndex:(NSUInteger)index;

-- (void) setFirstSession:(unsigned)session;
-- (void) setLastSession:(unsigned)session;
+- (void) setFirstSession:(NSUInteger)session;
+- (void) setLastSession:(NSUInteger)session;

- (void) readTOC;
- (int) fileDescriptor;

-- (unsigned) readCD:(void *)buffer sectorAreas:(uint8_t)sectorAreas startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount;
+- (NSUInteger) readCD:(void *)buffer sectorAreas:(uint8_t)sectorAreas startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount;
@end

@implementation Drive
@@ -104,23 +104,23 @@
}
}

-- (unsigned) cacheSize { return _cacheSize; }
-- (unsigned) cacheSectorSize { return (([self cacheSize] / kCDSectorSizeCDDA) + 1); }
-- (void) setCacheSize:(unsigned)cacheSize { _cacheSize = cacheSize; }
+- (NSUInteger) cacheSize { return _cacheSize; }
+- (NSUInteger) cacheSectorSize { return (([self cacheSize] / kCDSectorSizeCDDA) + 1); }
+- (void) setCacheSize:(NSUInteger)cacheSize { _cacheSize = cacheSize; }

- (NSString *) deviceName { return [[_deviceName retain] autorelease]; }

// Disc track information
-- (unsigned) sessionContainingSector:(unsigned)sector
+- (NSUInteger) sessionContainingSector:(NSUInteger)sector
{
return [self sessionContainingSectorRange:[SectorRange sectorRangeWithSector:sector]];
}

-- (unsigned) sessionContainingSectorRange:(SectorRange *)sectorRange
+- (NSUInteger) sessionContainingSectorRange:(SectorRange *)sectorRange
{
- unsigned session;
- unsigned sessionFirstSector;
- unsigned sessionLastSector;
+ NSUInteger session;
+ NSUInteger sessionFirstSector;
+ NSUInteger sessionLastSector;
SectorRange *sessionSectorRange;

for(session = [self firstSession]; session <= [self lastSession]; ++session) {
@@ -138,13 +138,13 @@
}

// Disc session information
-- (unsigned) firstSession { return _firstSession; }
-- (unsigned) lastSession { return _lastSession; }
+- (NSUInteger) firstSession { return _firstSession; }
+- (NSUInteger) lastSession { return _lastSession; }

-- (SessionDescriptor *) sessionNumber:(unsigned)number
+- (SessionDescriptor *) sessionNumber:(NSUInteger)number
{
SessionDescriptor *session = nil;
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfSessions]; ++i) {
session = [self objectInSessionsAtIndex:i];
@@ -156,17 +156,17 @@
}

// First and last track and lead out information (session-based)
-- (unsigned) firstTrackForSession:(unsigned)session { return [[self sessionNumber:session] firstTrack]; }
-- (unsigned) lastTrackForSession:(unsigned)session { return [[self sessionNumber:session] lastTrack]; }
-- (unsigned) leadOutForSession:(unsigned)session { return [[self sessionNumber:session] leadOut]; }
+- (NSUInteger) firstTrackForSession:(NSUInteger)session { return [[self sessionNumber:session] firstTrack]; }
+- (NSUInteger) lastTrackForSession:(NSUInteger)session { return [[self sessionNumber:session] lastTrack]; }
+- (NSUInteger) leadOutForSession:(NSUInteger)session { return [[self sessionNumber:session] leadOut]; }

-- (unsigned) firstSectorForSession:(unsigned)session { return [self firstSectorForTrack:[[self sessionNumber:session] firstTrack]]; }
-- (unsigned) lastSectorForSession:(unsigned)session { return [[self sessionNumber:session] leadOut] - 1; }
+- (NSUInteger) firstSectorForSession:(NSUInteger)session { return [self firstSectorForTrack:[[self sessionNumber:session] firstTrack]]; }
+- (NSUInteger) lastSectorForSession:(NSUInteger)session { return [[self sessionNumber:session] leadOut] - 1; }

-- (TrackDescriptor *) trackNumber:(unsigned)number
+- (TrackDescriptor *) trackNumber:(NSUInteger)number
{
TrackDescriptor *track = nil;
- unsigned i;
+ NSUInteger i;

for(i = 0; i < [self countOfTracks]; ++i) {
track = [self objectInTracksAtIndex:i];
@@ -178,8 +178,8 @@
}

// Track sector information
-- (unsigned) firstSectorForTrack:(unsigned)number { return [[self trackNumber:number] firstSector]; }
-- (unsigned) lastSectorForTrack:(unsigned)number
+- (NSUInteger) firstSectorForTrack:(NSUInteger)number { return [[self trackNumber:number] firstSector]; }
+- (NSUInteger) lastSectorForTrack:(NSUInteger)number
{
TrackDescriptor *thisTrack = [self trackNumber:number];
TrackDescriptor *nextTrack = [self trackNumber:number + 1];
@@ -209,12 +209,12 @@
- (void) clearCache:(SectorRange *)range
{
int16_t *buffer = NULL;
- unsigned bufferLen = 0;
- unsigned session;
- unsigned requiredReadSize;
- unsigned sessionFirstSector, sessionLastSector;
- unsigned preSectorsAvailable, postSectorsAvailable;
- unsigned sectorsRemaining, sectorsRead, boundary;
+ NSUInteger bufferLen = 0;
+ NSUInteger session;
+ NSUInteger requiredReadSize;
+ NSUInteger sessionFirstSector, sessionLastSector;
+ NSUInteger preSectorsAvailable, postSectorsAvailable;
+ NSUInteger sectorsRemaining, sectorsRead, boundary;

requiredReadSize = [self cacheSectorSize];
session = [self sessionContainingSectorRange:range];
@@ -301,92 +301,92 @@
}
}

-- (unsigned) readAudio:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readAudio:(void *)buffer sector:(NSUInteger)sector
{
return [self readAudio:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readAudio:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readAudio:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readAudio:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readAudio:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readAudio:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:kCDSectorAreaUser startSector:startSector sectorCount:sectorCount];
}

-- (unsigned) readQSubchannel:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readQSubchannel:(void *)buffer sector:(NSUInteger)sector
{
return [self readQSubchannel:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readQSubchannel:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:kCDSectorAreaSubChannelQ startSector:startSector sectorCount:sectorCount];
}

-- (unsigned) readErrorFlags:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readErrorFlags:(void *)buffer sector:(NSUInteger)sector
{
return [self readErrorFlags:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readErrorFlags:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readErrorFlags:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readErrorFlags:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readErrorFlags:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readErrorFlags:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:kCDSectorAreaErrorFlags startSector:startSector sectorCount:sectorCount];
}

-- (unsigned) readAudioAndQSubchannel:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer sector:(NSUInteger)sector
{
return [self readAudioAndQSubchannel:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readAudioAndQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readAudioAndQSubchannel:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readAudioAndQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readAudioAndQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:(kCDSectorAreaUser | kCDSectorAreaSubChannelQ) startSector:startSector sectorCount:sectorCount];
}

-- (unsigned) readAudioAndErrorFlags:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer sector:(NSUInteger)sector
{
return [self readAudioAndErrorFlags:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readAudioAndErrorFlags:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readAudioAndErrorFlags:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readAudioAndErrorFlags:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readAudioAndErrorFlags:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:(kCDSectorAreaUser | kCDSectorAreaErrorFlags) startSector:startSector sectorCount:sectorCount];
}

-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sector:(unsigned)sector
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sector:(NSUInteger)sector
{
return [self readAudioAndErrorFlagsWithQSubchannel:buffer startSector:sector sectorCount:1];
}

-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer sectorRange:(SectorRange *)range
{
return [self readAudioAndErrorFlagsWithQSubchannel:buffer startSector:[range firstSector] sectorCount:[range length]];
}

-- (unsigned) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readAudioAndErrorFlagsWithQSubchannel:(void *)buffer startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
return [self readCD:buffer sectorAreas:(kCDSectorAreaUser | kCDSectorAreaErrorFlags | kCDSectorAreaSubChannelQ) startSector:startSector sectorCount:sectorCount];
}
@@ -405,7 +405,7 @@
return [NSString stringWithCString:cd_read_mcn.mcn encoding:NSASCIIStringEncoding];
}

-- (NSString *) readISRC:(unsigned)track
+- (NSString *) readISRC:(NSUInteger)track
{
dk_cd_read_isrc_t cd_read_isrc;

@@ -435,14 +435,14 @@
[[LogController sharedController] performSelectorOnMainThread:@selector(logMessage:) withObject:message waitUntilDone:NO];
}

-- (unsigned) countOfTracks { return [_tracks count]; }
-- (unsigned) countOfSessions { return [_sessions count]; }
+- (NSUInteger) countOfTracks { return [_tracks count]; }
+- (NSUInteger) countOfSessions { return [_sessions count]; }

-- (TrackDescriptor *) objectInTracksAtIndex:(unsigned)index { return [_tracks objectAtIndex:index]; }
-- (SessionDescriptor *) objectInSessionsAtIndex:(unsigned)index { return [_sessions objectAtIndex:index]; }
+- (TrackDescriptor *) objectInTracksAtIndex:(NSUInteger)index { return [_tracks objectAtIndex:index]; }
+- (SessionDescriptor *) objectInSessionsAtIndex:(NSUInteger)index { return [_sessions objectAtIndex:index]; }

-- (void) setFirstSession:(unsigned)session { _firstSession = session; }
-- (void) setLastSession:(unsigned)session { _lastSession = session; }
+- (void) setFirstSession:(NSUInteger)session { _firstSession = session; }
+- (void) setLastSession:(NSUInteger)session { _lastSession = session; }

- (void) readTOC
{
@@ -452,7 +452,7 @@
CDTOC *toc = NULL;
CDTOCDescriptor *desc = NULL;
TrackDescriptor *track = nil;
- unsigned i, numDescriptors;
+ NSUInteger i, numDescriptors;

/* formats:
kCDTOCFormatTOC = 0x02, // CDTOC
@@ -558,11 +558,11 @@
- (int) fileDescriptor { return _fd; }

// Implementation method
-- (unsigned) readCD:(void *)buffer sectorAreas:(uint8_t)sectorAreas startSector:(unsigned)startSector sectorCount:(unsigned)sectorCount
+- (NSUInteger) readCD:(void *)buffer sectorAreas:(uint8_t)sectorAreas startSector:(NSUInteger)startSector sectorCount:(NSUInteger)sectorCount
{
int result;
dk_cd_read_t cd_read;
- unsigned blockSize = 0;
+ NSUInteger blockSize = 0;

if(kCDSectorAreaUser & sectorAreas) { blockSize += kCDSectorSizeCDDA; }
if(kCDSectorAreaErrorFlags & sectorAreas) { blockSize += kCDSectorSizeErrorFlags; }

Modified: trunk/Drive/SectorRange.h
===================================================================
--- trunk/Drive/SectorRange.h 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Drive/SectorRange.h 2011-01-20 06:33:31 UTC (rev 1438)
@@ -22,27 +22,27 @@

@interface SectorRange : NSObject
{
- unsigned _firstSector;
- unsigned _lastSector;
+ NSUInteger _firstSector;
+ NSUInteger _lastSector;
}

-+ (id) sectorRangeWithFirstSector:(unsigned)firstSector lastSector:(unsigned)lastSector;
-+ (id) sectorRangeWithFirstSector:(unsigned)firstSector sectorCount:(unsigned)sectorCount;
-+ (id) sectorRangeWithSector:(unsigned)sector;
++ (id) sectorRangeWithFirstSector:(NSUInteger)firstSector lastSector:(NSUInteger)lastSector;
++ (id) sectorRangeWithFirstSector:(NSUInteger)firstSector sectorCount:(NSUInteger)sectorCount;
++ (id) sectorRangeWithSector:(NSUInteger)sector;

-- (unsigned) firstSector;
-- (void) setFirstSector:(unsigned)sector;
+- (NSUInteger) firstSector;
+- (void) setFirstSector:(NSUInteger)sector;

-- (unsigned) lastSector;
-- (void) setLastSector:(unsigned)sector;
+- (NSUInteger) lastSector;
+- (void) setLastSector:(NSUInteger)sector;

-- (unsigned) length;
-- (unsigned) byteSize;
+- (NSUInteger) length;
+- (NSUInteger) byteSize;

-- (unsigned) indexForSector:(unsigned)sector;
-- (unsigned) sectorForIndex:(unsigned)index;
+- (NSUInteger) indexForSector:(NSUInteger)sector;
+- (NSUInteger) sectorForIndex:(NSUInteger)index;

-- (BOOL) containsSector:(unsigned)sector;
+- (BOOL) containsSector:(NSUInteger)sector;
- (BOOL) containsSectorRange:(SectorRange *)range;

@end

Modified: trunk/Drive/SectorRange.m
===================================================================
--- trunk/Drive/SectorRange.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Drive/SectorRange.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -24,7 +24,7 @@

@implementation SectorRange

-+ (id) sectorRangeWithFirstSector:(unsigned)firstSector lastSector:(unsigned)lastSector
++ (id) sectorRangeWithFirstSector:(NSUInteger)firstSector lastSector:(NSUInteger)lastSector
{
NSParameterAssert(lastSector >= firstSector);

@@ -36,7 +36,7 @@
return [range autorelease];
}

-+ (id) sectorRangeWithFirstSector:(unsigned)firstSector sectorCount:(unsigned)sectorCount
++ (id) sectorRangeWithFirstSector:(NSUInteger)firstSector sectorCount:(NSUInteger)sectorCount
{
NSParameterAssert(0 < sectorCount);

@@ -48,7 +48,7 @@
return [range autorelease];
}

-+ (id) sectorRangeWithSector:(unsigned)sector
++ (id) sectorRangeWithSector:(NSUInteger)sector
{
SectorRange *range = [[SectorRange alloc] init];

@@ -58,19 +58,19 @@
return [range autorelease];
}

-- (unsigned) firstSector { return _firstSector; }
-- (void) setFirstSector:(unsigned)sector { _firstSector = sector; }
+- (NSUInteger) firstSector { return _firstSector; }
+- (void) setFirstSector:(NSUInteger)sector { _firstSector = sector; }

-- (unsigned) lastSector { return _lastSector; }
-- (void) setLastSector:(unsigned)sector { _lastSector = sector; }
+- (NSUInteger) lastSector { return _lastSector; }
+- (void) setLastSector:(NSUInteger)sector { _lastSector = sector; }

-- (unsigned) length { return ([self lastSector] - [self firstSector] + 1); }
-- (unsigned) byteSize { return kCDSectorSizeCDDA * [self length]; }
+- (NSUInteger) length { return ([self lastSector] - [self firstSector] + 1); }
+- (NSUInteger) byteSize { return kCDSectorSizeCDDA * [self length]; }

-- (unsigned) indexForSector:(unsigned)sector { return ([self containsSector:sector] ? sector - [self firstSector] : NSNotFound); }
-- (unsigned) sectorForIndex:(unsigned)idx { return ([self length] > idx ? [self firstSector] + idx : NSNotFound); }
+- (NSUInteger) indexForSector:(NSUInteger)sector { return ([self containsSector:sector] ? sector - [self firstSector] : NSNotFound); }
+- (NSUInteger) sectorForIndex:(NSUInteger)idx { return ([self length] > idx ? [self firstSector] + idx : NSNotFound); }

-- (BOOL) containsSector:(unsigned)sector { return ([self firstSector] <= sector && [self lastSector] >= sector); }
+- (BOOL) containsSector:(NSUInteger)sector { return ([self firstSector] <= sector && [self lastSector] >= sector); }
- (BOOL) containsSectorRange:(SectorRange *)range { return ([self containsSector:[range firstSector]] && [self containsSector:[range lastSector]]); }

@end

Modified: trunk/FileConversion/FileArrayController.m
===================================================================
--- trunk/FileConversion/FileArrayController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/FileConversion/FileArrayController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -37,12 +37,12 @@
#pragma mark Data Source Overrides

// Fall back to bindings
-- (int) numberOfRowsInTableView:(NSTableView *)aTableView
+- (NSInteger) numberOfRowsInTableView:(NSTableView *)aTableView
{
return -1;
}

-- (id) tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+- (id) tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
return nil;
}
@@ -83,7 +83,7 @@
{
NSArray *rows = [self arrangedObjects];
NSMutableArray *filenames = [NSMutableArray arrayWithCapacity:[rowIndexes count]];
- unsigned index = [rowIndexes firstIndex];
+ NSUInteger index = [rowIndexes firstIndex];

while(NSNotFound != index) {
[filenames addObject:[[rows objectAtIndex:index] valueForKey:@"filename"]];
@@ -96,7 +96,7 @@
return YES;
}

-- (NSDragOperation) tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op
+- (NSDragOperation) tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)op
{
NSDragOperation dragOperation = NSDragOperationNone;

@@ -113,7 +113,7 @@
return dragOperation;
}

-- (BOOL) tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)op
+- (BOOL) tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)op
{
BOOL success = YES;

@@ -124,7 +124,7 @@
if(_tableView == [info draggingSource]) {
NSArray *filenames = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType];
NSIndexSet *indexSet = [self indexSetForRows:filenames];
- int rowsAbove;
+ NSInteger rowsAbove;
NSRange range;

[self moveObjectsInArrangedObjectsFromIndexes:indexSet toIndex:row];
@@ -169,9 +169,9 @@
- (void) moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet*)indexSet toIndex:(unsigned)insertIndex
{
NSArray *objects = [self arrangedObjects];
- unsigned index = [indexSet lastIndex];
- unsigned aboveInsertIndexCount = 0;
- unsigned removeIndex;
+ NSUInteger index = [indexSet lastIndex];
+ NSUInteger aboveInsertIndexCount = 0;
+ NSUInteger removeIndex;
id object;

while(NSNotFound != index) {
@@ -214,7 +214,7 @@
- (int) rowsAboveRow:(int)row inIndexSet:(NSIndexSet *)indexSet
{
int i = 0;
- unsigned currentIndex = [indexSet firstIndex];
+ NSUInteger currentIndex = [indexSet firstIndex];

while(NSNotFound != currentIndex) {
if(currentIndex < (unsigned)row) {

Modified: trunk/Metadata/AudioMetadata.mm
===================================================================
--- trunk/Metadata/AudioMetadata.mm 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Metadata/AudioMetadata.mm 2011-01-20 06:33:31 UTC (rev 1438)
@@ -188,84 +188,84 @@
[customPath setString:namingScheme];

if(nil == discNumber)
- [customPath replaceOccurrencesOfString:@"{discNumber}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{discNumber}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
[customPath replaceOccurrencesOfString:@"{discNumber}" withString:[NSString stringWithFormat:@"%u", [discNumber intValue]] options:0 range:NSMakeRange(0, [customPath length])];

if(nil == discTotal)
- [customPath replaceOccurrencesOfString:@"{discTotal}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{discTotal}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
[customPath replaceOccurrencesOfString:@"{discTotal}" withString:[NSString stringWithFormat:@"%u", [discTotal intValue]] options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumArtist)
- [customPath replaceOccurrencesOfString:@"{albumArtist}" withString:NSLocalizedStringFromTable(@"Unknown Artist", @"CompactDisc", @"") options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumArtist}" withString:NSLocalizedStringFromTable(@"Unknown Artist", @"CompactDisc", @"") options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumArtist}" withString:makeStringSafeForFilename(albumArtist) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumArtist}" withString:makeStringSafeForFilename(albumArtist) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumTitle)
- [customPath replaceOccurrencesOfString:@"{albumTitle}" withString:@"Unknown Disc" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumTitle}" withString:@"Unknown Disc" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumTitle}" withString:makeStringSafeForFilename(albumTitle) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumTitle}" withString:makeStringSafeForFilename(albumTitle) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumGenre)
- [customPath replaceOccurrencesOfString:@"{albumGenre}" withString:@"Unknown Genre" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumGenre}" withString:@"Unknown Genre" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumGenre}" withString:makeStringSafeForFilename(albumGenre) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumGenre}" withString:makeStringSafeForFilename(albumGenre) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumYear)
- [customPath replaceOccurrencesOfString:@"{albumDate}" withString:@"Unknown Date" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumDate}" withString:@"Unknown Date" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumDate}" withString:makeStringSafeForFilename(albumYear) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumDate}" withString:makeStringSafeForFilename(albumYear) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumComposer)
- [customPath replaceOccurrencesOfString:@"{albumComposer}" withString:@"Unknown Composer" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumComposer}" withString:@"Unknown Composer" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumComposer}" withString:makeStringSafeForFilename(albumComposer) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumComposer}" withString:makeStringSafeForFilename(albumComposer) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == albumComment)
- [customPath replaceOccurrencesOfString:@"{albumComment}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumComment}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{albumComment}" withString:makeStringSafeForFilename(albumComment) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{albumComment}" withString:makeStringSafeForFilename(albumComment) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackNumber)
- [customPath replaceOccurrencesOfString:@"{trackNumber}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackNumber}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
[customPath replaceOccurrencesOfString:@"{trackNumber}" withString:[NSString stringWithFormat:@"%u", [trackNumber intValue]] options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackTotal)
- [customPath replaceOccurrencesOfString:@"{trackTotal}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackTotal}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
[customPath replaceOccurrencesOfString:@"{trackTotal}" withString:[NSString stringWithFormat:@"%u", [trackTotal intValue]] options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackArtist)
- [customPath replaceOccurrencesOfString:@"{trackArtist}" withString:NSLocalizedStringFromTable(@"Unknown Artist", @"CompactDisc", @"") options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackArtist}" withString:NSLocalizedStringFromTable(@"Unknown Artist", @"CompactDisc", @"") options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackArtist}" withString:makeStringSafeForFilename(trackArtist) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackArtist}" withString:makeStringSafeForFilename(trackArtist) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackTitle)
- [customPath replaceOccurrencesOfString:@"{trackTitle}" withString:NSLocalizedStringFromTable(@"Unknown Track", @"CompactDisc", @"") options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackTitle}" withString:NSLocalizedStringFromTable(@"Unknown Track", @"CompactDisc", @"") options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackTitle}" withString:makeStringSafeForFilename(trackTitle) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackTitle}" withString:makeStringSafeForFilename(trackTitle) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackGenre)
- [customPath replaceOccurrencesOfString:@"{trackGenre}" withString:@"Unknown Genre" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackGenre}" withString:@"Unknown Genre" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackGenre}" withString:makeStringSafeForFilename(trackGenre) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackGenre}" withString:makeStringSafeForFilename(trackGenre) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackYear)
- [customPath replaceOccurrencesOfString:@"{trackDate}" withString:@"Unknown Date" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackDate}" withString:@"Unknown Date" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackDate}" withString:makeStringSafeForFilename(trackYear) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackDate}" withString:makeStringSafeForFilename(trackYear) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackComposer)
- [customPath replaceOccurrencesOfString:@"{trackComposer}" withString:@"Unknown Composer" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackComposer}" withString:@"Unknown Composer" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackComposer}" withString:makeStringSafeForFilename(trackComposer) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackComposer}" withString:makeStringSafeForFilename(trackComposer) options:0 range:NSMakeRange(0, [customPath length])];

if(nil == trackComment)
- [customPath replaceOccurrencesOfString:@"{trackComment}" withString:@"" options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackComment}" withString:@"" options:0 range:NSMakeRange(0, [customPath length])];
else
- [customPath replaceOccurrencesOfString:@"{trackComment}" withString:makeStringSafeForFilename(trackComment) options:nil range:NSMakeRange(0, [customPath length])];
+ [customPath replaceOccurrencesOfString:@"{trackComment}" withString:makeStringSafeForFilename(trackComment) options:0 range:NSMakeRange(0, [customPath length])];

return [customPath autorelease];
}

Modified: trunk/Preferences/EncoderSettingsSheets/EncoderSettingsSheet.m
===================================================================
--- trunk/Preferences/EncoderSettingsSheets/EncoderSettingsSheet.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Preferences/EncoderSettingsSheets/EncoderSettingsSheet.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -62,7 +62,7 @@
{
NSMutableArray *formats = nil;
NSMutableDictionary *newFormat = nil;
- unsigned index = NSNotFound;
+ NSUInteger index = NSNotFound;

// Swap out the userInfo object in this format's dictionary with the modified one
formats = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"outputFormats"] mutableCopy];

Modified: trunk/Preferences/FormatsPreferencesController.m
===================================================================
--- trunk/Preferences/FormatsPreferencesController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Preferences/FormatsPreferencesController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -283,7 +283,7 @@
[[NSApplication sharedApplication] beginSheet:[settingsSheet sheet] modalForWindow:[[PreferencesController sharedPreferences] window] modalDelegate:self didEndSelector:@selector(didEndSettingsSheet:returnCode:contextInfo:) contextInfo:settingsSheet];
}

-- (unsigned) countOfAvailableFormats { return [_availableFormats count]; }
+- (NSUInteger) countOfAvailableFormats { return [_availableFormats count]; }
- (NSDictionary *) objectInAvailableFormatsAtIndex:(unsigned)idx { return [_availableFormats objectAtIndex:idx]; }

@end

Modified: trunk/Preferences/OutputPreferencesController.m
===================================================================
--- trunk/Preferences/OutputPreferencesController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Preferences/OutputPreferencesController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -261,7 +261,7 @@
{
NSArray *filesToOpen;
NSString *dirname;
- unsigned count, i;
+ NSUInteger count, i;

[sheet orderOut:self];

@@ -292,7 +292,7 @@
{
NSArray *filesToOpen;
NSString *dirname;
- unsigned count, i;
+ NSUInteger count, i;

[sheet orderOut:self];

Modified: trunk/Preferences/PreferencesController.m
===================================================================
--- trunk/Preferences/PreferencesController.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Preferences/PreferencesController.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -112,7 +112,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Tasks/EncoderTasks/EncoderTask.m
===================================================================
--- trunk/Tasks/EncoderTasks/EncoderTask.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Tasks/EncoderTasks/EncoderTask.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -173,7 +173,7 @@
[alert setInformativeText:NSLocalizedStringFromTable(@"Do you want to replace the existing file?", @"General", @"")];
[alert setAlertStyle:NSInformationalAlertStyle];

- int result = [alert runModal];
+ NSInteger result = [alert runModal];
switch(result) {
case NSAlertFirstButtonReturn:
;

Modified: trunk/Tasks/RipperTasks/RipperTask.m
===================================================================
--- trunk/Tasks/RipperTasks/RipperTask.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Tasks/RipperTasks/RipperTask.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -77,7 +77,7 @@

- (NSArray *) sectors { return [[_sectors retain] autorelease]; }
- (NSString *) deviceName { return [[_deviceName retain] autorelease]; }
-- (unsigned) countOfTracks { return [_tracks count]; }
+- (NSUInteger) countOfTracks { return [_tracks count]; }
- (Track *) objectInTracksAtIndex:(unsigned)index { return [_tracks objectAtIndex:index]; }

- (NSString *) phase { return [[_phase retain] autorelease]; }

Modified: trunk/Utilities/CoreAudioUtilities.m
===================================================================
--- trunk/Utilities/CoreAudioUtilities.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Utilities/CoreAudioUtilities.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -355,7 +355,7 @@
NSMutableArray *dataFormats;
NSMutableIndexSet *indexesToRemove = [NSMutableIndexSet indexSet];
BOOL writable = NO;
- unsigned dataFormatsCount;
+ NSUInteger dataFormatsCount;

[d setObject:[NSNumber numberWithUnsignedLong:fileFormats[i]] forKey:@"fileType"];
[d addEntriesFromDictionary:getCoreAudioFileTypeInfo(fileFormats[i])];

Modified: trunk/Utilities/Genres.m
===================================================================
--- trunk/Utilities/Genres.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Utilities/Genres.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -217,7 +217,7 @@

- (id) copyWithZone:(NSZone *)zone { return self; }
- (id) retain { return self; }
-- (unsigned) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
+- (NSUInteger) retainCount { return UINT_MAX; /* denotes an object that cannot be released */ }
- (void) release { /* do nothing */ }
- (id) autorelease { return self; }

Modified: trunk/Utilities/ImageAndTextCell.m
===================================================================
--- trunk/Utilities/ImageAndTextCell.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Utilities/ImageAndTextCell.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -100,7 +100,7 @@
[super editWithFrame: textFrame inView: controlView editor:textObj delegate:anObject event: theEvent];
}

-- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength {
+- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength {
NSRect textFrame, imageFrame;
NSDivideRect (aRect, &imageFrame, &textFrame, 3 + [image size].width, NSMinXEdge);
[super selectWithFrame: textFrame inView: controlView editor:textObj delegate:anObject start:selStart length:selLength];

Modified: trunk/Utilities/UtilityFunctions.m
===================================================================
--- trunk/Utilities/UtilityFunctions.m 2011-01-20 06:32:26 UTC (rev 1437)
+++ trunk/Utilities/UtilityFunctions.m 2011-01-20 06:33:31 UTC (rev 1438)
@@ -71,7 +71,7 @@

if(1 < [pathComponents count]) {
int i;
- int directoryCount = [pathComponents count] - 1;
+ NSUInteger directoryCount = [pathComponents count] - 1;

// Accept a '/' as the first path
if(NO == [[pathComponents objectAtIndex:0] isEqualToString:@"/"]) {

Reply all
Reply to author
Forward
0 new messages