Skip to content

Commit

Permalink
I am unable to get OgreKit to compile under Leopard. So temporarily I…
Browse files Browse the repository at this point in the history
… added a precompiled framework and removed the instruction to compile OgreKit from XCode. Of course the source code is still in the SVN texshop project.

This version uses the 10.4 libraries and thus works fine on Tiger. But it also compiles on Leopard.

I upped the version number to 2.12-svn (because I privately made 2.11 and gave it to a couple of people).  Otherwise this is unchanged from 2.10-svn. But bigger changes are coming in the next few days.



git-svn-id: https://svn.code.sf.net/p/texshop/code/trunk@259 8c80bfd2-15fc-0310-8b7a-ba317743b8bb
  • Loading branch information
Richard Koch committed Aug 5, 2007
1 parent 2cdc7e9 commit 0880d30
Show file tree
Hide file tree
Showing 99 changed files with 7,761 additions and 124 deletions.
1 change: 1 addition & 0 deletions OgreKit.framework/Headers
1 change: 1 addition & 0 deletions OgreKit.framework/OgreKit
1 change: 1 addition & 0 deletions OgreKit.framework/Resources
92 changes: 92 additions & 0 deletions OgreKit.framework/Versions/A/Headers/NSString_OgreKitAdditions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Name: OGRegularExpressionFormatter.m
* Project: OgreKit
*
* Creation Date: Feb 29 2004
* Author: Isao Sonobe <sonoisa (AT) muse (DOT) ocn (DOT) ne (DOT) jp>
* Copyright: Copyright (c) 2004 Isao Sonobe, All rights reserved.
* License: OgreKit License
*
* Encoding: UTF8
* Tabsize: 4
*/

#import <OgreKit/OGRegularExpression.h>

@interface NSString (OgreKitAdditions)

/*
options:
compile time options:
OgreNoneOption no option
OgreSingleLineOption '^' -> '\A', '$' -> '\z', '\Z' -> '\z'
OgreMultilineOption '.' match with newline
OgreIgnoreCaseOption ignore case (case-insensitive)
OgreExtendOption extended pattern form
OgreFindLongestOption find longest match
OgreFindNotEmptyOption ignore empty match
OgreNegateSingleLineOption clear OgreSINGLELINEOption which is default on
in OgrePOSIXxxxxSyntax, OgrePerlSyntax and OgreJavaSyntax.
OgreDontCaptureGroupOption named group only captured. (/.../g)
OgreCaptureGroupOption named and no-named group captured. (/.../G)
OgreDelimitByWhitespaceOption delimit words by whitespace in OgreSimpleMatchingSyntax
@"AAA BBB CCC" <=> @"(AAA)|(BBB)|(CCC)"
search time options:
OgreNotBOLOption string head(str) isn't considered as begin of line
OgreNotEOLOption string end (end) isn't considered as end of line
OgreFindEmptyOption allow empty match being next to not empty matchs
e.g.
regex = [OGRegularExpression regularExpressionWithString:@"[a-z]*" options:compileOptions];
NSLog(@"%@", [regex replaceAllMatchesInString:@"abc123def" withString:@"(\\0)" options:searchOptions]);
compileOptions searchOptions replaced string
1. OgreFindNotEmptyOption OgreNoneOption (abc)123(def)
(or OgreFindEmptyOption)
2. OgreNoneOption OgreNoneOption (abc)1()2()3(def)
3. OgreNoneOption OgreFindEmptyOption (abc)()1()2()3(def)()
*/
/**********
* Search *
**********/
- (NSRange)rangeOfRegularExpressionString:(NSString*)expressionString;
- (NSRange)rangeOfRegularExpressionString:(NSString*)expressionString
options:(unsigned)options;
- (NSRange)rangeOfRegularExpressionString:(NSString*)expressionString
options:(unsigned)options
range:(NSRange)searchRange;

/*********
* Split *
*********/
// マッチした部分で文字列を分割し、NSArrayに収めて返す。
- (NSArray*)componentsSeparatedByRegularExpressionString:(NSString*)expressionString;

/*********************
* Newline Character *
*********************/
// 改行コードが何か調べる
- (OgreNewlineCharacter)newlineCharacter;

@end

@interface NSMutableString (OgreKitAdditions)

/***********
* Replace *
***********/
- (unsigned)replaceOccurrencesOfRegularExpressionString:(NSString*)expressionString
withString:(NSString*)replaceString
options:(unsigned)options
range:(NSRange)searchRange;

/*********************
* Newline Character *
*********************/
// 改行コードをnewlineCharacterに統一する。
- (void)replaceNewlineCharactersWithCharacter:(OgreNewlineCharacter)newlineCharacter;
// 改行コードを取り除く
- (void)chomp;

@end
36 changes: 36 additions & 0 deletions OgreKit.framework/Versions/A/Headers/OGMutableString.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Name: OGMutableString.h
* Project: OgreKit
*
* Creation Date: Sep 22 2004
* Author: Isao Sonobe <sonoisa (AT) muse (DOT) ocn (DOT) ne (DOT) jp>
* Copyright: Copyright (c) 2004 Isao Sonobe, All rights reserved.
* License: OgreKit License
*
* Encoding: UTF8
* Tabsize: 4
*/

#import <Foundation/Foundation.h>
#import <OgreKit/OGString.h>

@protocol OGMutableStringProtocol
- (void)appendString:(NSString*)string;
- (void)appendString:(NSString*)string
hasAttributesOfOGString:(NSObject<OGStringProtocol>*)ogString;

- (void)appendAttributedString:(NSAttributedString*)string;

- (void)appendOGString:(NSObject<OGStringProtocol>*)string;
- (void)appendOGStringLeaveImprint:(NSObject<OGStringProtocol>*)string;
- (void)appendOGString:(NSObject<OGStringProtocol>*)string
changeFont:(BOOL)changeFont
mergeAttributes:(BOOL)mergeAttributes;
- (void)appendOGString:(NSObject<OGStringProtocol>*)string
changeFont:(BOOL)changeFont
mergeAttributes:(BOOL)mergeAttributes
ofOGString:(NSObject<OGStringProtocol>*)srcString;

- (void)setAttributesOfOGString:(NSObject<OGStringProtocol>*)string
atIndex:(unsigned)index;
@end
Loading

0 comments on commit 0880d30

Please sign in to comment.