Skip to content

Commit

Permalink
minor int fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R-packages/trunk/Mac-GUI@7929 694ef91d-65df-0310-b7bb-92e67a308ead
  • Loading branch information
s-u committed Feb 12, 2021
1 parent da5d775 commit 0720261
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions RController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ - (void)textStorageDidProcessEditing:(NSNotification *)notification

NSInteger editedMask = [[consoleTextView textStorage] editedMask];

SLog(@"RController: textStorageDidProcessEditing <%@> with mask %d", self, editedMask);
SLog(@"RController: textStorageDidProcessEditing <%@> with mask %ld", self, (long)editedMask);

// if the user really changed the text
if(editedMask != 1) {
Expand Down Expand Up @@ -2343,7 +2343,7 @@ - (NSArray *)textView:(NSTextView *)textView completions:(NSArray *)words forPar

NSRange sr = [textView selectedRange];

SLog(@"completion attempt in RConsole; cursor at %d, complRange: %d-%d, commit: %d", sr.location, charRange.location, charRange.location+charRange.length, committedLength);
SLog(@"completion attempt in RConsole; cursor at %ld, complRange: %ld-%ld, commit: %ld", (long)sr.location, (long)charRange.location, (long)(charRange.location + charRange.length), (long)committedLength);

int bow = NSMaxRange(sr);

Expand Down Expand Up @@ -2969,7 +2969,7 @@ - (void) handlePromptRdFileAtPath:(NSString*)filepath isTempFile:(BOOL)isTempFil
[[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:YES error:&theError];
if(theError != nil) {
NSBeep();
NSLog(@"RController.handlePromptRdFileAtPath %@ couldn't be opened.\n%@", theError);
NSLog(@"RController.handlePromptRdFileAtPath %@ couldn't be opened.\n%@", filepath, theError);
}
} else {
NSError *err = nil;
Expand Down
10 changes: 5 additions & 5 deletions RScriptEditorTextStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/

#import "RScriptEditorTextStorage.h"
#import "RScriptEditorTypesetter.h"
#import "RScriptEditorTypeSetter.h"
#import "RScriptEditorTextView.h"
#import "FoldingSignTextAttachmentCell.h"
#import "RGUI.h"
Expand Down Expand Up @@ -168,7 +168,7 @@ - (NSInteger)registerFoldedRange:(NSRange)range
foldedRanges[i][2] = (NSInteger)NSMaxRange(range);
foldedCounter++;
if(i > currentMaxFoldedIndex) currentMaxFoldedIndex = i;
SLog(@"RScriptEditorTextStorage:registerFoldedRange %@ at position %d : max index %d", NSStringFromRange(range), i, currentMaxFoldedIndex);
SLog(@"RScriptEditorTextStorage:registerFoldedRange %@ at position %ld : max index %ld", NSStringFromRange(range), (long)i, (long)currentMaxFoldedIndex);
break;
}
}
Expand All @@ -185,7 +185,7 @@ - (BOOL)removeFoldedRangeWithIndex:(NSInteger)index
BOOL exists = NO;
NSRange range;

SLog(@"RScriptEditorTextStorage:removeFoldedRangeWithIndex %d", index);
SLog(@"RScriptEditorTextStorage:removeFoldedRangeWithIndex %ld", (long)index);

if(index > -1 && index < R_MAX_FOLDED_ITEMS) {
if(foldedRanges[index][0] > -1 && foldedRanges[index][1] > 0) {
Expand Down Expand Up @@ -238,7 +238,7 @@ - (BOOL)removeFoldedRangeWithIndex:(NSInteger)index
}
}
currentMaxFoldedIndex = maxCount;
SLog(@"RScriptEditorTextStorage:removeFoldedRangeWithIndex: done. Max index: %d", currentMaxFoldedIndex);
SLog(@"RScriptEditorTextStorage:removeFoldedRangeWithIndex: done. Max index: %ld", (long) currentMaxFoldedIndex);

return YES;
}
Expand Down Expand Up @@ -344,7 +344,7 @@ - (NSDictionary *)attributesAtIndex:(NSUInteger)location effectiveRange:(NSRange

}

- (void)edited:(NSUInteger)mask range:(NSRange)oldRange changeInLength:(NSInteger)lengthChange
- (void)edited:(NSTextStorageEditActions)mask range:(NSRange)oldRange changeInLength:(NSInteger)lengthChange
{

if(foldedCounter && mask == NSTextStorageEditedCharacters) {
Expand Down

0 comments on commit 0720261

Please sign in to comment.