├── slice~ ├── slice~.mxo │ └── Contents │ │ ├── PkgInfo │ │ ├── MacOS │ │ └── slice~ │ │ └── Info.plist ├── apple_silicon │ └── slice~.mxo │ │ └── Contents │ │ ├── PkgInfo │ │ ├── MacOS │ │ └── slice~ │ │ ├── Info.plist │ │ └── _CodeSignature │ │ └── CodeResources ├── slice~.mxe64 └── slice~.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── nao.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ ├── xcuserdata │ └── nao.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── max-external.xcscheme │ └── project.pbxproj ├── markov ├── build │ ├── markov.mxo │ │ └── Contents │ │ │ ├── PkgInfo │ │ │ ├── MacOS │ │ │ └── markov │ │ │ └── Info.plist │ └── bach.mid └── markov.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── nao.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ ├── xcuserdata │ └── nao.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── max-external.xcscheme │ └── project.pbxproj └── freesoundsearch ├── AGRegex_Project ├── pcre-4.3 │ ├── CVS │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Root │ │ │ └── Repository │ │ ├── Repository │ │ ├── Root │ │ └── Entries │ ├── config.h │ ├── maketables.c │ ├── pcre.h │ ├── chartables.c │ └── get.c ├── MainMenu.nib │ ├── CVS │ │ ├── CVS │ │ │ ├── Entries │ │ │ ├── Root │ │ │ └── Repository │ │ ├── Root │ │ ├── Repository │ │ └── Entries │ ├── objects.nib │ ├── info.nib │ └── classes.nib ├── RegexTest.m ├── Documentation │ ├── AGRegex │ │ ├── index.html │ │ ├── Classes │ │ │ ├── AGRegex │ │ │ │ ├── index.html │ │ │ │ ├── toc.html │ │ │ │ ├── AGRegex.html │ │ │ │ └── Methods │ │ │ │ │ └── Methods.html │ │ │ └── AGRegexMatch │ │ │ │ ├── index.html │ │ │ │ ├── AGRegexMatch.html │ │ │ │ ├── toc.html │ │ │ │ └── Methods │ │ │ │ └── Methods.html │ │ ├── AGRegex.html │ │ ├── toc.html │ │ ├── Enums │ │ │ └── Enums.html │ │ └── CompositePage.html │ └── MasterTOC.html ├── Controller.h ├── AGRegex-Info.plist ├── Info-AGRegex__Upgraded_.plist ├── README.txt ├── Controller.m └── AGRegex.xcodeproj │ ├── nao.pbxuser │ └── aram.pbxuser ├── build └── freesoundsearch.mxo │ └── Contents │ ├── PkgInfo │ ├── MacOS │ └── freesoundsearch │ └── Info.plist ├── freesound_screen.png ├── freesoundsearch.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── nao.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── nao.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ ├── freesoundsearch.xcscheme │ └── Copy of freesoundsearch.xcscheme ├── README.md ├── Info2.plist ├── NTLoginConnection.h ├── NTGeneralURLAccess.h ├── Info.plist ├── NTFreesoundSearch.h ├── AGRegex └── pcre-4.3 │ ├── config.h │ ├── maketables.c │ ├── pcre.h │ ├── chartables.c │ └── get.c ├── maxmspsdk.xcconfig ├── freesoundsearch.h ├── NTGeneralURLAccess.m ├── NTLoginConnection.m ├── maximum.vcproj └── freesoundsearch.m /slice~/slice~.mxo/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | iLaXmax2 -------------------------------------------------------------------------------- /markov/build/markov.mxo/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | iLaXmax2 -------------------------------------------------------------------------------- /slice~/apple_silicon/slice~.mxo/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | iLaX???? -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/CVS/Entries: -------------------------------------------------------------------------------- 1 | D 2 | -------------------------------------------------------------------------------- /freesoundsearch/build/freesoundsearch.mxo/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | iLaXmax2 -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/Repository: -------------------------------------------------------------------------------- 1 | /cvsroot/agkit/AGRegex/pcre-4.3 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:grnmn@cvs.sf.net:/cvsroot/agkit 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:grnmn@cvs.sf.net:/cvsroot/agkit 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:grnmn@cvs.sf.net:/cvsroot/agkit 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:grnmn@cvs.sf.net:/cvsroot/agkit 2 | -------------------------------------------------------------------------------- /slice~/slice~.mxe64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/slice~/slice~.mxe64 -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/Repository: -------------------------------------------------------------------------------- 1 | /cvsroot/agkit/AGRegex/MainMenu.nib 2 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/CVS/Repository: -------------------------------------------------------------------------------- 1 | /cvsroot/agkit/AGRegex/pcre-4.3/CVS 2 | -------------------------------------------------------------------------------- /markov/build/bach.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/markov/build/bach.mid -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/CVS/Repository: -------------------------------------------------------------------------------- 1 | /cvsroot/agkit/AGRegex/MainMenu.nib/CVS 2 | -------------------------------------------------------------------------------- /freesoundsearch/freesound_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/freesoundsearch/freesound_screen.png -------------------------------------------------------------------------------- /slice~/slice~.mxo/Contents/MacOS/slice~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/slice~/slice~.mxo/Contents/MacOS/slice~ -------------------------------------------------------------------------------- /markov/build/markov.mxo/Contents/MacOS/markov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/markov/build/markov.mxo/Contents/MacOS/markov -------------------------------------------------------------------------------- /slice~/apple_silicon/slice~.mxo/Contents/MacOS/slice~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/slice~/apple_silicon/slice~.mxo/Contents/MacOS/slice~ -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/freesoundsearch/AGRegex_Project/MainMenu.nib/objects.nib -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/RegexTest.m: -------------------------------------------------------------------------------- 1 | // RegexTest.m 2 | // 3 | 4 | #import 5 | 6 | int main(int argc, const char *argv[]) { 7 | return NSApplicationMain(argc, argv); 8 | } -------------------------------------------------------------------------------- /freesoundsearch/build/freesoundsearch.mxo/Contents/MacOS/freesoundsearch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/freesoundsearch/build/freesoundsearch.mxo/Contents/MacOS/freesoundsearch -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/CVS//// 2 | /classes.nib/1.1/Fri Sep 5 06:10:12 2003// 3 | /info.nib/1.1/Fri Sep 5 06:10:12 2003// 4 | /objects.nib/1.1/Fri Sep 5 06:10:12 2003// 5 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/markov/markov.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/slice~/slice~.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naotokui/MaxMSP_Objects/HEAD/freesoundsearch/freesoundsearch.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /freesoundsearch/README.md: -------------------------------------------------------------------------------- 1 | # freesoundsearch 2 | 3 | Search/browse/preview/download tens of thousands of sound files under Creative Commons license on [freesound project](http://freesound.org/) server from your Max/MSP Patch. 4 | 5 | 2016.10 6 | **DISCONTINUED!** - Due to a big API changes, this object no longer properly works. Only for archiving purpose. 7 | 8 | ![](./freesound_screen.png) 9 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/CVS/Entries: -------------------------------------------------------------------------------- 1 | D/CVS//// 2 | /chartables.c/1.1/Fri Sep 5 08:53:10 2003// 3 | /config.h/1.1/Fri Sep 5 08:52:52 2003// 4 | /get.c/1.1/Thu May 22 20:25:53 2003// 5 | /internal.h/1.1/Thu May 22 20:25:53 2003// 6 | /maketables.c/1.1/Thu May 22 20:25:53 2003// 7 | /pcre.c/1.1/Thu May 22 20:25:53 2003// 8 | /pcre.h/1.1/Fri Sep 5 08:52:51 2003// 9 | /study.c/1.1/Thu May 22 20:25:53 2003// 10 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/project.xcworkspace/xcuserdata/nao.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegex.h 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Controller.h: -------------------------------------------------------------------------------- 1 | // Controller.h 2 | // 3 | 4 | #import 5 | 6 | @interface Controller : NSObject { 7 | IBOutlet NSTextField *patternField, *replacementField, *matchField; 8 | IBOutlet NSButton *caseInsensitiveButton, *dotAllButton, *extendedButton, *lazyButton, *multilineButton; 9 | IBOutlet NSTextView *textView; 10 | BOOL lastMatchWasEmpty; 11 | } 12 | - (IBAction)find:(id)sender; 13 | - (IBAction)replace:(id)sender; 14 | - (IBAction)openDocument:(id)sender; 15 | @end 16 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegex/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegex 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegexMatch/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegexMatch 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | max-external.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2FBBEAD608F335360078DB84 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | max-external.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2FBBEAD608F335360078DB84 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/AGRegex.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | API Documentation 5 | 6 | 7 | 8 |

Documentation for AGRegex.h

9 |
Use the links in the table of contents to the left to access documentation.
10 |

(Last Updated 9/12/2003) 11 |
HTML documentation generated by HeaderDoc 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 23 33 356 240 0 0 800 578 7 | IBEditorPositions 8 | 9 | 29 10 | 47 192 318 44 0 0 800 578 11 | 12 | IBFramework Version 13 | 291.0 14 | IBOpenObjects 15 | 16 | 21 17 | 18 | IBSystem Version 19 | 6L60 20 | 21 | 22 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/AGRegex-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.yourcompany.AGRegex 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/MasterTOC.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Header Documentation 6 | 7 | 8 |

Header Documentation



9 |

Headers

10 |
11 | AGRegex.h
12 | 13 |
14 |

Classes

15 |
16 | AGRegex
17 | AGRegexMatch
18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Info-AGRegex__Upgraded_.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | AGRegex 9 | CFBundleIconFile 10 | 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 0.1 19 | NSPrincipalClass 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Copy of freesoundsearch.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | freesoundsearch.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 8D01CCC60486CAD60068D4B7 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /freesoundsearch/Info2.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | freesoundsearch 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | iLaX 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 0.541 21 | CSResourcesFileMapped 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {find = id; openDocument = id; replace = id; }; 5 | CLASS = Controller; 6 | LANGUAGE = ObjC; 7 | OUTLETS = { 8 | caseInsensitiveButton = NSButton; 9 | dotAllButton = NSButton; 10 | extendedButton = NSButton; 11 | lazyButton = NSButton; 12 | matchField = NSTextField; 13 | multilineButton = NSButton; 14 | patternField = NSTextField; 15 | replacementField = NSTextField; 16 | textView = NSTextView; 17 | }; 18 | SUPERCLASS = NSObject; 19 | }, 20 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } 21 | ); 22 | IBVersion = 1; 23 | } -------------------------------------------------------------------------------- /freesoundsearch/NTLoginConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // NTLoginConnection.h 3 | // freesound_search 4 | // 5 | // Created by Nao Tokui on 11/21/06. 6 | // Copyright 2006 www.sonasphere.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NTFreesoundSearch; 12 | 13 | typedef enum _LoginProcess { login_idle, loggingin, loggingout } LoginProcess; 14 | 15 | @interface NTLoginConnection : NSObject { 16 | NTFreesoundSearch *_delegate; // main 17 | 18 | NSURLConnection *theConnection; // NSURLConnection object for downloading html file 19 | NSMutableData *receivedData; // Received html data 20 | LoginProcess currentStatus; // logging in or logging out or idle 21 | } 22 | 23 | - (void) setDelegate: (NTFreesoundSearch *) obj; 24 | - (id) delegate; 25 | 26 | - (int) startLogin: (const char *) username : (const char *) password; 27 | - (int) startLogout; 28 | 29 | - (void) cancel; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegexMatch/AGRegexMatch.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | API Documentation 5 | 6 | 7 | 8 |

AGRegexMatch


9 | A single occurence of a regular expression. 10 |

11 | An AGRegexMatch represents a single occurence of a regular expression within the target string. The range of each subpattern within the target string is returned by -range, -rangeAtIndex:, or -rangeNamed:. The part of the target string that matched each subpattern is returned by -group, -groupAtIndex:, or -groupNamed:. 12 |

13 |

(Last Updated 9/12/2003) 14 |
HTML documentation generated by HeaderDoc 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /freesoundsearch/NTGeneralURLAccess.h: -------------------------------------------------------------------------------- 1 | // 2 | // NTGeneralURLAccess.h 3 | // freesound_search 4 | // 5 | // Created by Nao Tokui on 11/21/06. 6 | // Copyright 2006 www.sonasphere.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NTFreesoundSearch; 12 | 13 | typedef enum _accessProcess { access_idle, accessing } accessProcess; 14 | 15 | @interface NTGeneralURLAccess : NSObject { 16 | NTFreesoundSearch* _delegate; 17 | SEL _function; // delegate's function, which will be called when done 18 | 19 | accessProcess currentStatus; 20 | NSURLConnection *theConnection; 21 | NSMutableData *receivedData; // Received html data 22 | 23 | NSString *filepath; 24 | } 25 | 26 | - (void) setDelegate: (NTFreesoundSearch *) obj; 27 | - (void) setDelegateFunction: (SEL) selector; 28 | - (id) delegate; 29 | - (void) setFilepath: (NSString *) path; 30 | - (NSString *) filepath; 31 | 32 | - (int) startURLAccess: (const NSURL *) urlObj: (const NSString *) postStr; 33 | - (void) cancel; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /freesoundsearch/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${PRODUCT_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.cycling74.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | ${PRODUCT_VERSION} 15 | CFBundlePackageType 16 | iLaX 17 | CFBundleSignature 18 | max2 19 | CFBundleVersion 20 | 1.0 21 | 22 | CFBundleVersion 23 | ${PRODUCT_VERSION} 24 | CFBundleShortVersionString 25 | ${PRODUCT_VERSION} 26 | CFBundleLongVersionString 27 | ${PRODUCT_NAME} ${PRODUCT_VERSION}, Copyright 2013 Cycling '74 28 | 29 | CSResourcesFileMapped 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /slice~/slice~.mxo/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 10K549 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | slice~ 11 | CFBundleIdentifier 12 | com.cycling74.slice- 13 | CFBundleInfoDictionaryVersion 14 | 6.1.4 15 | CFBundleLongVersionString 16 | slice~ 6.1.4, Copyright 2013 Cycling '74 17 | CFBundlePackageType 18 | iLaX 19 | CFBundleShortVersionString 20 | 6.1.4 21 | CFBundleSignature 22 | max2 23 | CFBundleVersion 24 | 6.1.4 25 | CSResourcesFileMapped 26 | 27 | DTCompiler 28 | 29 | DTPlatformBuild 30 | 10M2518 31 | DTPlatformVersion 32 | PG 33 | DTSDKBuild 34 | 10K549 35 | DTSDKName 36 | 37 | DTXcode 38 | 0400 39 | DTXcodeBuild 40 | 10M2518 41 | 42 | 43 | -------------------------------------------------------------------------------- /markov/build/markov.mxo/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14A379a 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | markov 11 | CFBundleIdentifier 12 | com.cycling74.markov 13 | CFBundleInfoDictionaryVersion 14 | 6.1.4 15 | CFBundleLongVersionString 16 | markov 6.1.4, Copyright 2013 Cycling '74 17 | CFBundlePackageType 18 | iLaX 19 | CFBundleShortVersionString 20 | 6.1.4 21 | CFBundleSignature 22 | max2 23 | CFBundleVersion 24 | 6.1.4 25 | CSResourcesFileMapped 26 | 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 6A317 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 13F26 35 | DTSDKName 36 | macosx10.9 37 | DTXcode 38 | 0600 39 | DTXcodeBuild 40 | 6A317 41 | 42 | 43 | -------------------------------------------------------------------------------- /freesoundsearch/build/freesoundsearch.mxo/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 15G31 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | freesoundsearch 11 | CFBundleIdentifier 12 | com.cycling74.freesoundsearch 13 | CFBundleInfoDictionaryVersion 14 | 6.1.4 15 | CFBundleLongVersionString 16 | freesoundsearch 6.1.4, Copyright 2013 Cycling '74 17 | CFBundlePackageType 18 | iLaX 19 | CFBundleShortVersionString 20 | 6.1.4 21 | CFBundleSignature 22 | max2 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 6.1.4 29 | CSResourcesFileMapped 30 | 31 | DTCompiler 32 | com.apple.compilers.llvm.clang.1_0 33 | DTPlatformBuild 34 | 7D1014 35 | DTPlatformVersion 36 | GM 37 | DTSDKBuild 38 | 15E60 39 | DTSDKName 40 | macosx10.11 41 | DTXcode 42 | 0731 43 | DTXcodeBuild 44 | 7D1014 45 | 46 | 47 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/README.txt: -------------------------------------------------------------------------------- 1 | 2 | AGRegex provides Perl-compatible pattern matching to Cocoa applications. 3 | 4 | Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England. 5 | 6 | 7 | 8 | 9 | For complete regular expression syntax see the PCRE documentation. 10 | 11 | NOTES 12 | 13 | If you are only using valid ASCII strings, you can save some overhead by turning off UTF-8 support. In the framework target, select "Settings", scroll down to "GCC Compiler Settings", and under "Other C Compiler Flags", delete the line -DSUPPORT_UTF8. If you do this, note that some methods will raise an exception if you pass a string that can't be converted to ASCII. 14 | 15 | If you want to build AGRegex with a newer version of PCRE than that which is included, build PCRE according to the normal instructions so that all the necessary files get generated and then just copy them over the older ones. Be sure to enable UTF-8 support when you build PCRE if you are using it in AGRegex. It is also possible to link to just link to libpcre instead of compiling it directly into the framework, but it would have to be installed separately. 16 | 17 | BUGS 18 | 19 | -replaceWithString:inString:... won't see a backreference preceded by a backslash in the replacement string, whether the backslash itself is escaped or not. 20 | 21 | -splitString:... will split at an empty match immediately following a non-empty match. While this is not necessarily a bug, it is at least inconsistent with Perl's split operator. 22 | 23 | CONTACT 24 | 25 | 26 | -------------------------------------------------------------------------------- /slice~/apple_silicon/slice~.mxo/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 21G217 7 | C74ObjectProperties 8 | 9 | c74excludefromcollectives 10 | 11 | 12 | CFBundleDevelopmentRegion 13 | English 14 | CFBundleExecutable 15 | slice~ 16 | CFBundleIdentifier 17 | . 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundleLongVersionString 21 | slice~ - 22 | CFBundlePackageType 23 | iLaX 24 | CFBundleSignature 25 | max2 26 | CFBundleSupportedPlatforms 27 | 28 | MacOSX 29 | 30 | CSResourcesFileMapped 31 | 32 | DTCompiler 33 | com.apple.compilers.llvm.clang.1_0 34 | DTPlatformBuild 35 | 14A400 36 | DTPlatformName 37 | macosx 38 | DTPlatformVersion 39 | 12.3 40 | DTSDKBuild 41 | 21E226 42 | DTSDKName 43 | macosx12.3 44 | DTXcode 45 | 1401 46 | DTXcodeBuild 47 | 14A400 48 | LSMinimumSystemVersion 49 | 10.11 50 | LSRequiresCarbon 51 | 52 | NSHumanReadableCopyright 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/toc.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegex.h 5 | 6 | 7 | 10 | [Top]
11 | 12 |
 

13 | 14 | 15 |
Header:
AGRegex.h

16 |  Introduction 17 |

Enumerations

18 |
 Options
19 |

Classes

20 |  AGRegex
21 |  AGRegexMatch
22 |

[Printable HTML Page] 23 | 24 | -------------------------------------------------------------------------------- /freesoundsearch/NTFreesoundSearch.h: -------------------------------------------------------------------------------- 1 | // 2 | // NTFreesoundSearch.h 3 | // NTFreesoundSearch 4 | // 5 | // Created by Nao Tokui on 11/21/06. 6 | // Copyright 2006 www.sonasphere.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "NTLoginConnection.h" 12 | #import "NTGeneralURLAccess.h" 13 | #import "freesoundsearch.h" 14 | 15 | @interface NTFreesoundSearch : NSObject { 16 | t_freesoundsearch *_delegate; // max object 17 | 18 | /* Objects */ 19 | NTLoginConnection *loginObj; 20 | NTGeneralURLAccess *queryObj; 21 | 22 | /* Internal Flags */ 23 | LoginStatus loginStatus; 24 | BOOL isVerbose; 25 | 26 | /* Search Resut */ 27 | NSMutableArray *resultArray; 28 | NSMutableArray *sampleInfoAccesses; 29 | 30 | /* Preview */ 31 | QTMovie *previewMovie; 32 | NSString *previewURLStr; 33 | float previewRate; 34 | float previewVolume; 35 | 36 | /* Download */ 37 | NSMutableArray *sampleDLAccesses; 38 | NSString *downloadDir; 39 | } 40 | 41 | - (void) setDelegate: (t_freesoundsearch *) x; 42 | 43 | /* Login Management */ 44 | - (void) startLogin: (const char *) login : (const char *) password; 45 | - (void) startLogout; 46 | - (void) setLoginStatus: (LoginStatus) status; 47 | 48 | /* Search */ 49 | - (void) startSearchText: (const char *) queryword minDuration: (float) minDur maxDuration: (float) maxDur minBitrate: (int) minBR 50 | minBitdepth: (int)minBD minSamplerate: (int) minSR searchDescriptions: (int) descriptions searchTags: (int) tags 51 | searchFilenames: (int) filenames searchUsernames: (int) usernames; 52 | - (void) processSearchResultXMLData: (NSDictionary *) dataDic; 53 | - (void) processSampleXMLData: (NSDictionary *) dataDic; 54 | - (void) URLAccessDone: (NTGeneralURLAccess *) accessObj; 55 | - (NSArray *) searchResults; 56 | 57 | /* PREVIEW */ 58 | - (int) startPreviewSampleWithID: (int) sampleID; 59 | - (int) startPlaying: (NSString *) url; 60 | - (void) stopPreview; 61 | - (void) previewMovieFinished: (NSNotification *) notification; 62 | - (void) previewMovieStatusStringPosted: (NSNotification *) notification; 63 | 64 | /* DOWNLOAD */ 65 | - (int) startDownloadSampleWithID: (int) sampleID; 66 | - (void)processDownloadedSampleData: (NSDictionary *) dataDic; 67 | - (int) setDownloadPath: (char *) cpath; 68 | 69 | /* Flags */ 70 | - (void) setVerbose: (BOOL) flag; 71 | - (BOOL) isVerbose; 72 | - (void) setPreviewRate: (float) rate; 73 | - (void) setPreviewVolume: (float) vol; 74 | @end 75 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegexMatch/toc.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegexMatch 5 | 6 | 7 | 10 | [Top]
11 | 12 |
 

13 | 14 | 15 |
Class:
AGRegexMatch

 

16 |  Introduction 17 |

Methods


18 |
Instance Methods
19 |
 - count
20 |  - group
21 |  - groupAtIndex:
22 |  - groupNamed:
23 |  - range
24 |  - rangeAtIndex:
25 |  - rangeNamed:
26 |  - string
27 |

Other Reference


28 |  Header
29 |

[Printable HTML Page] 30 | 31 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Enums/Enums.html: -------------------------------------------------------------------------------- 1 | 3 | 9 | Enumerations 10 | 11 |

Enumerations


12 |
13 |

Options

14 |

15 | enum {
16 |   AGRegexCaseInsensitive = 1,
17 |   AGRegexDotAll = 2,
18 |   AGRegexExtended = 4,
19 |   AGRegexLazy = 8,
20 |   AGRegexMultiline = 16
21 | };
22 | 
23 |
24 |

Options defined for -initWithPattern:options:. Two or more options can be combined with the bitwise OR operator. 25 |

26 |

Constants

27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
NameDescription
AGRegexCaseInsensitiveMatching is case insensitive. Equivalent to /i in Perl.
AGRegexDotAllDot metacharacter matches any character including newline. Equivalent to /s in Perl.
AGRegexExtendedAllow whitespace and comments in the pattern. Equivalent to /x in Perl.
AGRegexLazyMakes greedy quantifiers lazy and lazy quantifiers greedy. No equivalent in Perl.
AGRegexMultilineCaret and dollar anchors match at newline. Equivalent to /m in Perl.
36 |
37 |

(Last Updated 9/12/2003) 38 |

39 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/CompositePage.html: -------------------------------------------------------------------------------- 1 | 3 | 9 | AGRegex.h 10 | 11 |

AGRegex.h


12 |

Enumerations

13 |
14 |

Options

15 |

16 | enum {
17 |   AGRegexCaseInsensitive = 1,
18 |   AGRegexDotAll = 2,
19 |   AGRegexExtended = 4,
20 |   AGRegexLazy = 8,
21 |   AGRegexMultiline = 16
22 | };
23 | 
24 |
25 |

Options defined for -initWithPattern:options:. Two or more options can be combined with the bitwise OR operator. 26 |

27 |

Constants

28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
NameDescription
AGRegexCaseInsensitiveMatching is case insensitive. Equivalent to /i in Perl.
AGRegexDotAllDot metacharacter matches any character including newline. Equivalent to /s in Perl.
AGRegexExtendedAllow whitespace and comments in the pattern. Equivalent to /x in Perl.
AGRegexLazyMakes greedy quantifiers lazy and lazy quantifiers greedy. No equivalent in Perl.
AGRegexMultilineCaret and dollar anchors match at newline. Equivalent to /m in Perl.
37 |
38 |

(Last Updated 9/12/2003) 39 |

40 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Controller.m: -------------------------------------------------------------------------------- 1 | // Controller.m 2 | // 3 | 4 | #import "Controller.h" 5 | #import 6 | 7 | @implementation Controller 8 | 9 | - (IBAction)find:(id)sender { 10 | NSString *string = [textView string]; 11 | NSRange searchRange, selectedRange = [textView selectedRange]; 12 | 13 | searchRange.location = selectedRange.location + selectedRange.length; 14 | if (lastMatchWasEmpty && searchRange.location < [string length]) searchRange.location++; 15 | searchRange.length = [string length] - searchRange.location; 16 | 17 | int options = 0; 18 | if ([caseInsensitiveButton state] == NSOnState) options |= AGRegexCaseInsensitive; 19 | if ([dotAllButton state] == NSOnState) options |= AGRegexDotAll; 20 | if ([extendedButton state] == NSOnState) options |= AGRegexExtended; 21 | if ([lazyButton state] == NSOnState) options |= AGRegexLazy; 22 | if ([multilineButton state] == NSOnState) options |= AGRegexMultiline; 23 | 24 | AGRegex *regex = [AGRegex regexWithPattern:[patternField stringValue] options:options]; 25 | AGRegexMatch *match = [regex findInString:string range:searchRange]; 26 | 27 | if (match) { 28 | [matchField setStringValue:[NSString stringWithFormat:@"%@ %@", NSStringFromRange([match range]), [match group]]]; 29 | [textView setSelectedRange:[match range]]; 30 | [textView scrollRangeToVisible:[textView selectedRange]]; 31 | if ([match range].length == 0) 32 | lastMatchWasEmpty = YES; 33 | } 34 | else { 35 | [matchField setStringValue:@"Not found"]; 36 | NSBeep(); 37 | } 38 | } 39 | 40 | - (IBAction)replace:(id)sender { 41 | NSString *string = [textView string]; 42 | int options = 0; 43 | 44 | if ([caseInsensitiveButton state] == NSOnState) options |= AGRegexCaseInsensitive; 45 | if ([dotAllButton state] == NSOnState) options |= AGRegexDotAll; 46 | if ([extendedButton state] == NSOnState) options |= AGRegexExtended; 47 | if ([lazyButton state] == NSOnState) options |= AGRegexLazy; 48 | if ([multilineButton state] == NSOnState) options |= AGRegexMultiline; 49 | 50 | AGRegex *regex = [AGRegex regexWithPattern:[patternField stringValue] options:options]; 51 | if ([regex findInString:string]) 52 | [textView setString:[regex replaceWithString:[replacementField stringValue] inString:string]]; 53 | else { 54 | [matchField setStringValue:@"Not found"]; 55 | NSBeep(); 56 | } 57 | } 58 | 59 | - (IBAction)openDocument:(id)sender { 60 | NSOpenPanel *openPanel = [NSOpenPanel openPanel]; 61 | if ([openPanel runModalForTypes:nil] == NSOKButton) { 62 | [textView setString:[NSString stringWithContentsOfFile:[openPanel filename]]]; 63 | [textView setSelectedRange:NSMakeRange(0, 0)]; 64 | [matchField setStringValue:@""]; 65 | } 66 | } 67 | 68 | - (void)textViewDidChangeSelection:(NSNotification *)notification { 69 | lastMatchWasEmpty = NO; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /slice~/apple_silicon/slice~.mxo/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | files2 8 | 9 | rules 10 | 11 | ^Resources/ 12 | 13 | ^Resources/.*\.lproj/ 14 | 15 | optional 16 | 17 | weight 18 | 1000 19 | 20 | ^Resources/.*\.lproj/locversion.plist$ 21 | 22 | omit 23 | 24 | weight 25 | 1100 26 | 27 | ^Resources/Base\.lproj/ 28 | 29 | weight 30 | 1010 31 | 32 | ^version.plist$ 33 | 34 | 35 | rules2 36 | 37 | .*\.dSYM($|/) 38 | 39 | weight 40 | 11 41 | 42 | ^(.*/)?\.DS_Store$ 43 | 44 | omit 45 | 46 | weight 47 | 2000 48 | 49 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 50 | 51 | nested 52 | 53 | weight 54 | 10 55 | 56 | ^.* 57 | 58 | ^Info\.plist$ 59 | 60 | omit 61 | 62 | weight 63 | 20 64 | 65 | ^PkgInfo$ 66 | 67 | omit 68 | 69 | weight 70 | 20 71 | 72 | ^Resources/ 73 | 74 | weight 75 | 20 76 | 77 | ^Resources/.*\.lproj/ 78 | 79 | optional 80 | 81 | weight 82 | 1000 83 | 84 | ^Resources/.*\.lproj/locversion.plist$ 85 | 86 | omit 87 | 88 | weight 89 | 1100 90 | 91 | ^Resources/Base\.lproj/ 92 | 93 | weight 94 | 1010 95 | 96 | ^[^/]+$ 97 | 98 | nested 99 | 100 | weight 101 | 10 102 | 103 | ^embedded\.provisionprofile$ 104 | 105 | weight 106 | 20 107 | 108 | ^version\.plist$ 109 | 110 | weight 111 | 20 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/max-external.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/max-external.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex/pcre-4.3/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | 3 | /* On Unix systems config.in is converted by configure into config.h. PCRE is 4 | written in Standard C, but there are a few non-standard things it can cope 5 | with, allowing it to run on SunOS4 and other "close to standard" systems. 6 | 7 | On a non-Unix system you should just copy this file into config.h, and set up 8 | the macros the way you need them. You should normally change the definitions of 9 | HAVE_STRERROR and HAVE_MEMMOVE to 1. Unfortunately, because of the way autoconf 10 | works, these cannot be made the defaults. If your system has bcopy() and not 11 | memmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. If your 12 | system has neither bcopy() nor memmove(), leave them both as 0; an emulation 13 | function will be used. */ 14 | 15 | /* Define to empty if the keyword does not work. */ 16 | 17 | /* #undef const */ 18 | 19 | /* Define to `unsigned' if doesn't define size_t. */ 20 | 21 | /* #undef size_t */ 22 | 23 | /* The following two definitions are mainly for the benefit of SunOS4, which 24 | doesn't have the strerror() or memmove() functions that should be present in 25 | all Standard C libraries. The macros HAVE_STRERROR and HAVE_MEMMOVE should 26 | normally be defined with the value 1 for other systems, but unfortunately we 27 | can't make this the default because "configure" files generated by autoconf 28 | will only change 0 to 1; they won't change 1 to 0 if the functions are not 29 | found. */ 30 | 31 | #define HAVE_STRERROR 1 32 | #define HAVE_MEMMOVE 1 33 | 34 | /* There are some non-Unix systems that don't even have bcopy(). If this macro 35 | is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of 36 | HAVE_BCOPY is not relevant. */ 37 | 38 | #define HAVE_BCOPY 1 39 | 40 | /* The value of NEWLINE determines the newline character. The default is to 41 | leave it up to the compiler, but some sites want to force a particular value. 42 | On Unix systems, "configure" can be used to override this default. */ 43 | 44 | #ifndef NEWLINE 45 | #define NEWLINE '\n' 46 | #endif 47 | 48 | /* The value of LINK_SIZE determines the number of bytes used to store 49 | links as offsets within the compiled regex. The default is 2, which allows for 50 | compiled patterns up to 64K long. This covers the vast majority of cases. 51 | However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows for 52 | longer patterns in extreme cases. On Unix systems, "configure" can be used to 53 | override this default. */ 54 | 55 | #ifndef LINK_SIZE 56 | #define LINK_SIZE 2 57 | #endif 58 | 59 | /* The value of MATCH_LIMIT determines the default number of times the match() 60 | function can be called during a single execution of pcre_exec(). (There is a 61 | runtime method of setting a different limit.) The limit exists in order to 62 | catch runaway regular expressions that take for ever to determine that they do 63 | not match. The default is set very large so that it does not accidentally catch 64 | legitimate cases. On Unix systems, "configure" can be used to override this 65 | default default. */ 66 | 67 | #ifndef MATCH_LIMIT 68 | #define MATCH_LIMIT 10000000 69 | #endif 70 | 71 | /* End */ 72 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | 3 | /* On Unix systems config.in is converted by configure into config.h. PCRE is 4 | written in Standard C, but there are a few non-standard things it can cope 5 | with, allowing it to run on SunOS4 and other "close to standard" systems. 6 | 7 | On a non-Unix system you should just copy this file into config.h, and set up 8 | the macros the way you need them. You should normally change the definitions of 9 | HAVE_STRERROR and HAVE_MEMMOVE to 1. Unfortunately, because of the way autoconf 10 | works, these cannot be made the defaults. If your system has bcopy() and not 11 | memmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. If your 12 | system has neither bcopy() nor memmove(), leave them both as 0; an emulation 13 | function will be used. */ 14 | 15 | /* Define to empty if the keyword does not work. */ 16 | 17 | /* #undef const */ 18 | 19 | /* Define to `unsigned' if doesn't define size_t. */ 20 | 21 | /* #undef size_t */ 22 | 23 | /* The following two definitions are mainly for the benefit of SunOS4, which 24 | doesn't have the strerror() or memmove() functions that should be present in 25 | all Standard C libraries. The macros HAVE_STRERROR and HAVE_MEMMOVE should 26 | normally be defined with the value 1 for other systems, but unfortunately we 27 | can't make this the default because "configure" files generated by autoconf 28 | will only change 0 to 1; they won't change 1 to 0 if the functions are not 29 | found. */ 30 | 31 | #define HAVE_STRERROR 1 32 | #define HAVE_MEMMOVE 1 33 | 34 | /* There are some non-Unix systems that don't even have bcopy(). If this macro 35 | is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of 36 | HAVE_BCOPY is not relevant. */ 37 | 38 | #define HAVE_BCOPY 1 39 | 40 | /* The value of NEWLINE determines the newline character. The default is to 41 | leave it up to the compiler, but some sites want to force a particular value. 42 | On Unix systems, "configure" can be used to override this default. */ 43 | 44 | #ifndef NEWLINE 45 | #define NEWLINE '\n' 46 | #endif 47 | 48 | /* The value of LINK_SIZE determines the number of bytes used to store 49 | links as offsets within the compiled regex. The default is 2, which allows for 50 | compiled patterns up to 64K long. This covers the vast majority of cases. 51 | However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows for 52 | longer patterns in extreme cases. On Unix systems, "configure" can be used to 53 | override this default. */ 54 | 55 | #ifndef LINK_SIZE 56 | #define LINK_SIZE 2 57 | #endif 58 | 59 | /* The value of MATCH_LIMIT determines the default number of times the match() 60 | function can be called during a single execution of pcre_exec(). (There is a 61 | runtime method of setting a different limit.) The limit exists in order to 62 | catch runaway regular expressions that take for ever to determine that they do 63 | not match. The default is set very large so that it does not accidentally catch 64 | legitimate cases. On Unix systems, "configure" can be used to override this 65 | default default. */ 66 | 67 | #ifndef MATCH_LIMIT 68 | #define MATCH_LIMIT 10000000 69 | #endif 70 | 71 | /* End */ 72 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/freesoundsearch.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /freesoundsearch/maxmspsdk.xcconfig: -------------------------------------------------------------------------------- 1 | // Xcode target configuration settings for the Max 6 SDK 2 | // Used as the basis for Xcode projects to build Max externals. 3 | // 4 | // Changes to the settings in this file will be applied to all SDK examples 5 | // To change settings for only one of the examples, override the settings using 6 | // Xcode's target inspector. 7 | // 8 | // by Timothy Place 9 | // Copyright © 2012, Cycling '74 10 | 11 | 12 | // Name & Version 13 | PRODUCT_NAME = $(PROJECT_NAME) 14 | PRODUCT_VERSION = 6.1.4 15 | ARCHS = i386 x86_64 16 | //ARCHS = x86_64 17 | 18 | 19 | // Paths 20 | 21 | // =========================================================================== 22 | // NOTE: SET PATH TO YOUR C74SUPPORT FOLDER IN YOUR MAX SDK HERE 23 | 24 | C74SUPPORT = $(SRCROOT)/../source/c74support/ 25 | 26 | // =========================================================================== 27 | 28 | HEADER_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes" 29 | FRAMEWORK_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes" 30 | DSTROOT = $(SRCROOT)/build 31 | // (This next path is relative to DSTROOT) 32 | INSTALL_PATH = / 33 | 34 | 35 | // Special Files 36 | GCC_PREFIX_HEADER = $(C74SUPPORT)/max-includes/macho-prefix.pch 37 | INFOPLIST_FILE = $(SRCROOT)/Info.plist 38 | 39 | 40 | // Architecture and Deployment 41 | ARCHS = i386 x86_64 42 | 43 | // The following section sets the Mac SDK version to be used. 44 | // For most projects this has little to no impact because there are no direct dependencies on OS function calls. 45 | // In those projects with OS function calls, it should be okay to use the most recent SDK version because the 46 | // MACOSX_DEPLOYMENT_TARGET will disable functionality that is unavailable in the older target OS. 47 | // For this reason, the SDKROOT variable is commented out, telling Xcode to use the default (which is the most recent SDK). 48 | // 49 | // If you do need to define the SDKROOT, different versions of Xcode have varying syntax and varying versions of the SDK present. 50 | 51 | // Xcode 3.x 52 | // SDKROOT = $(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk 53 | 54 | // Xcode 4.0 - Xcode 4.2 55 | // SDKROOT = $(DEVELOPER_DIR)/SDKs/MacOSX10.6.sdk 56 | 57 | // Xcode 4.3+ 58 | // SDKROOT = macosx10.6 59 | 60 | MACOSX_DEPLOYMENT_TARGET = 10.6 61 | 62 | 63 | // Compiler Version -- leave them all commented out to get the default version provided by Xcode 64 | // GCC_VERSION = 4.2 65 | // GCC_VERSION = com.apple.compilers.llvmgcc42 66 | // GCC_VERSION = com.apple.compilers.llvm.clang.1_0 67 | 68 | 69 | // Preprocessor Defines 70 | GCC_PREPROCESSOR_DEFINITIONS = "DENORM_WANT_FIX = 1" "NO_TRANSLATION_SUPPORT = 1" 71 | 72 | 73 | // Static Configuration (don't change these) 74 | WRAPPER_EXTENSION = mxo; 75 | WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas 76 | DEPLOYMENT_LOCATION = YES 77 | GENERATE_PKGINFO_FILE = YES 78 | 79 | 80 | // Flags to enforce some build-time checks for the symbols used while not actually performing a hard link 81 | C74_SYM_LINKER_FLAGS = @$(C74SUPPORT)/max-includes/c74_linker_flags.txt 82 | 83 | 84 | // hide all symbols by default 85 | // mark a function to be exported with the C74_EXPORT macro -- most likely this will only apply to the main() function 86 | OTHER_CFLAGS = -fvisibility=hidden 87 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.xcodeproj/xcuserdata/nao.xcuserdatad/xcschemes/Copy of freesoundsearch.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegex/toc.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | Documentation for AGRegex 5 | 6 | 7 | 10 | [Top]
11 | 12 |
 

13 | 14 | 15 |
Class:
AGRegex

 

16 |  Introduction 17 |

Methods


18 |
Class Methods
19 |
 + regexWithPattern:
20 |  + regexWithPattern:options:
21 |
Instance Methods
22 |  - findAllInString:
23 |  - findAllInString:range:
24 |  - findEnumeratorInString:
25 |  - findEnumeratorInString:range:
26 |  - findInString:
27 |  - findInString:range:
28 |  - initWithPattern:
29 |  - initWithPattern:options:
30 |  - replaceWithString:inString:
31 |  - replaceWithString:inString:limit:
32 |  - splitString:
33 |  - splitString:limit:
34 |

Other Reference


35 |  Header
36 |

[Printable HTML Page] 37 | 38 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * freesoundsearch.h 3 | * freesoundsearch 4 | * 5 | * Created by Nao Tokui on 1/14/07. 6 | * Copyright 2007 www.sonasphere.com. All rights reserved. 7 | * 8 | */ 9 | 10 | 11 | #include "ext.h" 12 | #import 13 | 14 | @class NTFreesoundSearch; 15 | 16 | // Login Status 17 | typedef enum _LoginStatus { notloggedinyet, loggedin, loginfailed, logoutfailed } LoginStatus; 18 | 19 | typedef struct _mootcher_x 20 | { 21 | // Object Settings 22 | struct object m_ob; 23 | void *bang_out; 24 | void *login_out; // outlet for login status 25 | void *resultnum_out; // outlet for number of samples found in the previous search 26 | void *anything_out; // outlet for search/DL result 27 | 28 | // Main Object 29 | NTFreesoundSearch *t_searchObj; 30 | NSAutoreleasePool *t_pool; 31 | 32 | /* Search Settings */ // Default Value 33 | float t_minDuration; // 0 sec 34 | float t_maxDuration; // 6000 sec 35 | int t_minBitrate; // 0 36 | int t_minBitdepth; // 0 37 | int t_minSampleRate; // 0 38 | int t_searchDescriptions; // YES 39 | int t_searchTags; // YES 40 | int t_searchFilenames; // NO 41 | int t_searchUsernames; // NO 42 | 43 | /* Flags */ 44 | int t_verbose; // YES 45 | int t_loginstatus; // 0: (not logged in) 46 | } t_freesoundsearch; 47 | 48 | void *freesoundsearch_class; 49 | 50 | void freesoundsearch_bang(t_freesoundsearch *x); 51 | void freesoundsearch_assist(t_freesoundsearch *x, void *b, long m, long a, char *s); 52 | 53 | void freesoundsearch_login(t_freesoundsearch *x, t_symbol *login, t_symbol *password); 54 | void freesoundsearch_logout(t_freesoundsearch *x); 55 | void freesoundsearch_search(t_freesoundsearch *x, t_symbol *s); 56 | 57 | void freesoundsearch_free(t_freesoundsearch *x); 58 | void *freesoundsearch_new(t_symbol *s, short ac, t_atom *av); 59 | 60 | /* Search Settings */ 61 | void freesoundsearch_min_duration(t_freesoundsearch *x, double f); 62 | void freesoundsearch_max_duration(t_freesoundsearch *x, double f); 63 | void freesoundsearch_min_bitrate(t_freesoundsearch *x, long n); 64 | void freesoundsearch_min_bitdepth(t_freesoundsearch *x, long n); 65 | void freesoundsearch_min_samplerate(t_freesoundsearch *x, long n); 66 | void freesoundsearch_search_descriptions(t_freesoundsearch *x, long n); 67 | void freesoundsearch_search_tags(t_freesoundsearch *x, long n); 68 | void freesoundsearch_search_filenames(t_freesoundsearch *x, long n); 69 | void freesoundsearch_search_usernames(t_freesoundsearch *x, long n); 70 | 71 | /* Preview/Download */ 72 | void freesoundsearch_preview(t_freesoundsearch *x, long n); 73 | void freesoundsearch_stop_preview(t_freesoundsearch *x); 74 | void freesoundsearch_download(t_freesoundsearch *x, long n); 75 | 76 | /* Other Functions */ 77 | void freesoundsearch_verbose(t_freesoundsearch *x, long n); 78 | void freesoundsearch_setlogin(t_freesoundsearch *x, int n); 79 | 80 | void freesoundsearch_rate(t_freesoundsearch *x, float f); 81 | void freesoundsearch_vol(t_freesoundsearch *x, float f); 82 | void freesoundsearch_download_dir(t_freesoundsearch *x, t_symbol *t); 83 | 84 | /* Output */ 85 | void freesoundsearch_output_result(t_freesoundsearch *x, NSDictionary *dict); 86 | void freesoundsearch_output_download(t_freesoundsearch *x, const char *filepath, int done); 87 | void freesoundsearch_output_message(t_freesoundsearch *x, const char *msg); 88 | void freesoundsearch_output_bang(t_freesoundsearch *x); 89 | void freesoundsearch_output_samplenum(t_freesoundsearch *x, long n); -------------------------------------------------------------------------------- /freesoundsearch/NTGeneralURLAccess.m: -------------------------------------------------------------------------------- 1 | // 2 | // NTGeneralURLAccess.m 3 | // freesound_search 4 | // 5 | // Created by Nao Tokui on 11/21/06. 6 | // Copyright 2006 www.sonasphere.com. All rights reserved. 7 | // 8 | 9 | #import "NTGeneralURLAccess.h" 10 | #import "NTFreesoundSearch.h" 11 | #import "AGRegex.h" 12 | 13 | #define TIMEOUT_INTERVAL 30.0 14 | 15 | @implementation NTGeneralURLAccess 16 | 17 | - (void) setDelegate: (NTFreesoundSearch *) obj 18 | { 19 | _delegate = obj; 20 | } 21 | - (void) setDelegateFunction: (SEL) selector 22 | { 23 | _function = selector; 24 | } 25 | 26 | - (id) delegate{ return _delegate; } 27 | 28 | - (void) dealloc { 29 | [filepath release]; 30 | [super dealloc]; 31 | } 32 | 33 | - (void) setFilepath: (NSString *) path 34 | { 35 | [filepath release]; 36 | filepath = [path retain]; 37 | } 38 | - (NSString *) filepath{ return filepath; } 39 | 40 | - (int) startURLAccess: (const NSURL *) urlObj: (const NSString *) postStr 41 | { 42 | // Check if there is any on-going request 43 | if (currentStatus == accessing) return 0; 44 | 45 | // Create a URL request 46 | NSString *urlStr = [urlObj absoluteString]; 47 | NSMutableURLRequest *urlRequest=[[NSMutableURLRequest alloc] initWithURL: (NSURL *)urlObj 48 | cachePolicy: NSURLRequestUseProtocolCachePolicy // DO CACHE! 49 | timeoutInterval: (NSTimeInterval)TIMEOUT_INTERVAL]; 50 | NSAssert(urlRequest, @"Cannot make a URL request"); 51 | 52 | // Configure the request 53 | [urlRequest setHTTPMethod:@"POST"]; 54 | [urlRequest setHTTPBody:[postStr dataUsingEncoding: NSISOLatin1StringEncoding]]; 55 | 56 | // Create the connection with the request and start loading the data 57 | theConnection=[[NSURLConnection alloc] initWithRequest: urlRequest delegate:self]; 58 | [urlRequest release]; 59 | 60 | if (theConnection) { 61 | // Create the NSMutableData that will hold the received data 62 | receivedData =[[NSMutableData data] retain]; 63 | currentStatus = accessing; 64 | return 1; 65 | } else { 66 | // Inform the user that the download could not be made 67 | NSLog(@"Cannot Make A Connection to: %@", urlStr); 68 | } 69 | return 0; 70 | } 71 | 72 | #pragma mark DELEGATE FUNCTIONS 73 | 74 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 75 | { 76 | // this method is called when the server has determined that it 77 | // has enough information to create the NSURLResponse 78 | // it can be called multiple times, for example in the case of a 79 | // redirect, so each time we reset the data. 80 | [receivedData setLength: 0]; 81 | } 82 | 83 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data 84 | { 85 | // append the new data to the receivedData 86 | [receivedData appendData:data]; 87 | } 88 | 89 | -(NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse 90 | { 91 | return request; 92 | } 93 | 94 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 95 | { 96 | // release the connection, and the data object 97 | [connection release]; 98 | [receivedData release]; 99 | 100 | // inform the user 101 | NSLog(@"Connection failed! Error - %@ %@", 102 | [error localizedDescription], 103 | [[error userInfo] objectForKey:NSErrorFailingURLStringKey]); 104 | 105 | // Notify the access failed 106 | [_delegate performSelector: _function withObject: nil]; 107 | [_delegate URLAccessDone: self]; 108 | 109 | currentStatus = access_idle; 110 | } 111 | 112 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection 113 | { 114 | // Send back the received data. 115 | NSDictionary *dataDic = [NSDictionary dictionaryWithObjectsAndKeys: 116 | receivedData, @"receivedData", self, @"accessObj", nil]; 117 | [_delegate performSelector: _function withObject: dataDic]; 118 | 119 | // release the connection, and the data object 120 | [connection release]; 121 | [receivedData release]; 122 | 123 | // Notify that the access was done. 124 | [_delegate URLAccessDone: self]; 125 | 126 | currentStatus = access_idle; 127 | } 128 | 129 | - (void) cancel 130 | { 131 | if (currentStatus == accessing){ 132 | [theConnection cancel]; 133 | [theConnection release]; 134 | [receivedData release]; 135 | currentStatus = access_idle; 136 | } 137 | } 138 | 139 | 140 | 141 | @end 142 | 143 | 144 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegexMatch/Methods/Methods.html: -------------------------------------------------------------------------------- 1 | 3 | 9 | Methods 10 | 11 |

Methods


12 |
13 |

count

14 |

- (int)count; 
15 |
16 |

The number of capturing subpatterns, including the pattern itself.

17 |
18 |

group

19 |

- (NSString *)group; 
20 |
21 |

Returns the part of the target string that matched the pattern.

22 |
23 |

groupAtIndex:

24 |

- (NSString *)groupAtIndex:(int)idx; 
25 |
26 |

Returns the part of the target string that matched the subpattern at the given index or nil if it wasn't matched. The subpatterns are indexed in order of their opening parentheses, 0 is the entire pattern, 1 is the first capturing subpattern, and so on.

27 |
28 |

groupNamed:

29 |

- (NSString *)groupNamed:(NSString *)name; 
30 |
31 |

Returns the part of the target string that matched the subpattern of the given name or nil if it wasn't matched.

32 |
33 |

range

34 |

- (NSRange)range; 
35 |
36 |

Returns the range of the target string that matched the pattern.

37 | 38 |
39 |

rangeAtIndex:

40 |

- (NSRange)rangeAtIndex:(int)idx; 
41 |
42 |

Returns the range of the target string that matched the subpattern at the given index or {NSNotFound, 0} if it wasn't matched. The subpatterns are indexed in order of their opening parentheses, 0 is the entire pattern, 1 is the first capturing subpattern, and so on.

43 | 44 |
45 |

rangeNamed:

46 |

- (NSRange)rangeNamed:(NSString *)name; 
47 |
48 |

Returns the range of the target string that matched the subpattern of the given name or {NSNotFound, 0} if it wasn't matched.

49 | 50 |
51 |

string

52 |

- (NSString *)string; 
53 |
54 |

Returns the target string.

55 | 56 |

(Last Updated 9/12/2003) 57 |

58 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex/pcre-4.3/maketables.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* 6 | PCRE is a library of functions to support regular expressions whose syntax 7 | and semantics are as close as possible to those of the Perl 5 language. 8 | 9 | Written by: Philip Hazel 10 | 11 | Copyright (c) 1997-2003 University of Cambridge 12 | 13 | ----------------------------------------------------------------------------- 14 | Permission is granted to anyone to use this software for any purpose on any 15 | computer system, and to redistribute it freely, subject to the following 16 | restrictions: 17 | 18 | 1. This software is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | 22 | 2. The origin of this software must not be misrepresented, either by 23 | explicit claim or by omission. 24 | 25 | 3. Altered versions must be plainly marked as such, and must not be 26 | misrepresented as being the original software. 27 | 28 | 4. If PCRE is embedded in any software that is released under the GNU 29 | General Purpose Licence (GPL), then the terms of that licence shall 30 | supersede any condition above with which it is incompatible. 31 | ----------------------------------------------------------------------------- 32 | 33 | See the file Tech.Notes for some information on the internals. 34 | */ 35 | 36 | 37 | /* This file is compiled on its own as part of the PCRE library. However, 38 | it is also included in the compilation of dftables.c, in which case the macro 39 | DFTABLES is defined. */ 40 | 41 | #ifndef DFTABLES 42 | #include "internal.h" 43 | #endif 44 | 45 | 46 | 47 | /************************************************* 48 | * Create PCRE character tables * 49 | *************************************************/ 50 | 51 | /* This function builds a set of character tables for use by PCRE and returns 52 | a pointer to them. They are build using the ctype functions, and consequently 53 | their contents will depend upon the current locale setting. When compiled as 54 | part of the library, the store is obtained via pcre_malloc(), but when compiled 55 | inside dftables, use malloc(). 56 | 57 | Arguments: none 58 | Returns: pointer to the contiguous block of data 59 | */ 60 | 61 | const unsigned char * 62 | pcre_maketables(void) 63 | { 64 | unsigned char *yield, *p; 65 | int i; 66 | 67 | #ifndef DFTABLES 68 | yield = (unsigned char*)(pcre_malloc)(tables_length); 69 | #else 70 | yield = (unsigned char*)malloc(tables_length); 71 | #endif 72 | 73 | if (yield == NULL) return NULL; 74 | p = yield; 75 | 76 | /* First comes the lower casing table */ 77 | 78 | for (i = 0; i < 256; i++) *p++ = tolower(i); 79 | 80 | /* Next the case-flipping table */ 81 | 82 | for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); 83 | 84 | /* Then the character class tables. Don't try to be clever and save effort 85 | on exclusive ones - in some locales things may be different. Note that the 86 | table for "space" includes everything "isspace" gives, including VT in the 87 | default locale. This makes it work for the POSIX class [:space:]. */ 88 | 89 | memset(p, 0, cbit_length); 90 | for (i = 0; i < 256; i++) 91 | { 92 | if (isdigit(i)) 93 | { 94 | p[cbit_digit + i/8] |= 1 << (i&7); 95 | p[cbit_word + i/8] |= 1 << (i&7); 96 | } 97 | if (isupper(i)) 98 | { 99 | p[cbit_upper + i/8] |= 1 << (i&7); 100 | p[cbit_word + i/8] |= 1 << (i&7); 101 | } 102 | if (islower(i)) 103 | { 104 | p[cbit_lower + i/8] |= 1 << (i&7); 105 | p[cbit_word + i/8] |= 1 << (i&7); 106 | } 107 | if (i == '_') p[cbit_word + i/8] |= 1 << (i&7); 108 | if (isspace(i)) p[cbit_space + i/8] |= 1 << (i&7); 109 | if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7); 110 | if (isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7); 111 | if (isprint(i)) p[cbit_print + i/8] |= 1 << (i&7); 112 | if (ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7); 113 | if (iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7); 114 | } 115 | p += cbit_length; 116 | 117 | /* Finally, the character type table. In this, we exclude VT from the white 118 | space chars, because Perl doesn't recognize it as such for \s and for comments 119 | within regexes. */ 120 | 121 | for (i = 0; i < 256; i++) 122 | { 123 | int x = 0; 124 | if (i != 0x0b && isspace(i)) x += ctype_space; 125 | if (isalpha(i)) x += ctype_letter; 126 | if (isdigit(i)) x += ctype_digit; 127 | if (isxdigit(i)) x += ctype_xdigit; 128 | if (isalnum(i) || i == '_') x += ctype_word; 129 | if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta; 130 | *p++ = x; 131 | } 132 | 133 | return yield; 134 | } 135 | 136 | /* End of maketables.c */ 137 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/maketables.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* 6 | PCRE is a library of functions to support regular expressions whose syntax 7 | and semantics are as close as possible to those of the Perl 5 language. 8 | 9 | Written by: Philip Hazel 10 | 11 | Copyright (c) 1997-2003 University of Cambridge 12 | 13 | ----------------------------------------------------------------------------- 14 | Permission is granted to anyone to use this software for any purpose on any 15 | computer system, and to redistribute it freely, subject to the following 16 | restrictions: 17 | 18 | 1. This software is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | 22 | 2. The origin of this software must not be misrepresented, either by 23 | explicit claim or by omission. 24 | 25 | 3. Altered versions must be plainly marked as such, and must not be 26 | misrepresented as being the original software. 27 | 28 | 4. If PCRE is embedded in any software that is released under the GNU 29 | General Purpose Licence (GPL), then the terms of that licence shall 30 | supersede any condition above with which it is incompatible. 31 | ----------------------------------------------------------------------------- 32 | 33 | See the file Tech.Notes for some information on the internals. 34 | */ 35 | 36 | 37 | /* This file is compiled on its own as part of the PCRE library. However, 38 | it is also included in the compilation of dftables.c, in which case the macro 39 | DFTABLES is defined. */ 40 | 41 | #ifndef DFTABLES 42 | #include "internal.h" 43 | #endif 44 | 45 | 46 | 47 | /************************************************* 48 | * Create PCRE character tables * 49 | *************************************************/ 50 | 51 | /* This function builds a set of character tables for use by PCRE and returns 52 | a pointer to them. They are build using the ctype functions, and consequently 53 | their contents will depend upon the current locale setting. When compiled as 54 | part of the library, the store is obtained via pcre_malloc(), but when compiled 55 | inside dftables, use malloc(). 56 | 57 | Arguments: none 58 | Returns: pointer to the contiguous block of data 59 | */ 60 | 61 | const unsigned char * 62 | pcre_maketables(void) 63 | { 64 | unsigned char *yield, *p; 65 | int i; 66 | 67 | #ifndef DFTABLES 68 | yield = (unsigned char*)(pcre_malloc)(tables_length); 69 | #else 70 | yield = (unsigned char*)malloc(tables_length); 71 | #endif 72 | 73 | if (yield == NULL) return NULL; 74 | p = yield; 75 | 76 | /* First comes the lower casing table */ 77 | 78 | for (i = 0; i < 256; i++) *p++ = tolower(i); 79 | 80 | /* Next the case-flipping table */ 81 | 82 | for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); 83 | 84 | /* Then the character class tables. Don't try to be clever and save effort 85 | on exclusive ones - in some locales things may be different. Note that the 86 | table for "space" includes everything "isspace" gives, including VT in the 87 | default locale. This makes it work for the POSIX class [:space:]. */ 88 | 89 | memset(p, 0, cbit_length); 90 | for (i = 0; i < 256; i++) 91 | { 92 | if (isdigit(i)) 93 | { 94 | p[cbit_digit + i/8] |= 1 << (i&7); 95 | p[cbit_word + i/8] |= 1 << (i&7); 96 | } 97 | if (isupper(i)) 98 | { 99 | p[cbit_upper + i/8] |= 1 << (i&7); 100 | p[cbit_word + i/8] |= 1 << (i&7); 101 | } 102 | if (islower(i)) 103 | { 104 | p[cbit_lower + i/8] |= 1 << (i&7); 105 | p[cbit_word + i/8] |= 1 << (i&7); 106 | } 107 | if (i == '_') p[cbit_word + i/8] |= 1 << (i&7); 108 | if (isspace(i)) p[cbit_space + i/8] |= 1 << (i&7); 109 | if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7); 110 | if (isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7); 111 | if (isprint(i)) p[cbit_print + i/8] |= 1 << (i&7); 112 | if (ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7); 113 | if (iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7); 114 | } 115 | p += cbit_length; 116 | 117 | /* Finally, the character type table. In this, we exclude VT from the white 118 | space chars, because Perl doesn't recognize it as such for \s and for comments 119 | within regexes. */ 120 | 121 | for (i = 0; i < 256; i++) 122 | { 123 | int x = 0; 124 | if (i != 0x0b && isspace(i)) x += ctype_space; 125 | if (isalpha(i)) x += ctype_letter; 126 | if (isdigit(i)) x += ctype_digit; 127 | if (isxdigit(i)) x += ctype_xdigit; 128 | if (isalnum(i) || i == '_') x += ctype_word; 129 | if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta; 130 | *p++ = x; 131 | } 132 | 133 | return yield; 134 | } 135 | 136 | /* End of maketables.c */ 137 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/AGRegex.xcodeproj/nao.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 0867D690FE84028FC02AAC07 /* Project object */ = { 4 | activeBuildConfigurationName = Deployment; 5 | activeExecutable = 356012B50B1C20730022DDB0 /* RegexTest */; 6 | activeTarget = 356014D70B1C2A350022DDB0 /* AGRegex (Upgraded) */; 7 | breakpointsGroup = 356013FA0B1C26540022DDB0 /* XCBreakpointsBucket */; 8 | codeSenseManager = 356012ED0B1C20770022DDB0 /* Code sense */; 9 | executables = ( 10 | 356012B50B1C20730022DDB0 /* RegexTest */, 11 | ); 12 | perUserDictionary = { 13 | PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { 14 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 15 | PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; 16 | PBXFileTableDataSourceColumnWidthsKey = ( 17 | 22, 18 | 300, 19 | 131, 20 | ); 21 | PBXFileTableDataSourceColumnsKey = ( 22 | PBXExecutablesDataSource_ActiveFlagID, 23 | PBXExecutablesDataSource_NameID, 24 | PBXExecutablesDataSource_CommentsID, 25 | ); 26 | }; 27 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 28 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 29 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 30 | PBXFileTableDataSourceColumnWidthsKey = ( 31 | 20, 32 | 488, 33 | 20, 34 | 48, 35 | 43, 36 | 43, 37 | 20, 38 | ); 39 | PBXFileTableDataSourceColumnsKey = ( 40 | PBXFileDataSource_FiletypeID, 41 | PBXFileDataSource_Filename_ColumnID, 42 | PBXFileDataSource_Built_ColumnID, 43 | PBXFileDataSource_ObjectSize_ColumnID, 44 | PBXFileDataSource_Errors_ColumnID, 45 | PBXFileDataSource_Warnings_ColumnID, 46 | PBXFileDataSource_Target_ColumnID, 47 | ); 48 | }; 49 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 50 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 51 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 52 | PBXFileTableDataSourceColumnWidthsKey = ( 53 | 20, 54 | 200, 55 | 308, 56 | 20, 57 | 48, 58 | 43, 59 | 43, 60 | ); 61 | PBXFileTableDataSourceColumnsKey = ( 62 | PBXFileDataSource_FiletypeID, 63 | PBXFileDataSource_Filename_ColumnID, 64 | PBXTargetDataSource_PrimaryAttribute, 65 | PBXFileDataSource_Built_ColumnID, 66 | PBXFileDataSource_ObjectSize_ColumnID, 67 | PBXFileDataSource_Errors_ColumnID, 68 | PBXFileDataSource_Warnings_ColumnID, 69 | ); 70 | }; 71 | PBXPerProjectTemplateStateSaveDate = 188460883; 72 | PBXWorkspaceStateSaveDate = 188460883; 73 | }; 74 | sourceControlManager = 356012EC0B1C20770022DDB0 /* Source Control */; 75 | userBuildSettings = { 76 | }; 77 | }; 78 | 0867D69CFE84028FC02AAC07 /* AGRegex */ = { 79 | activeExec = 0; 80 | }; 81 | 2467EEE7050859D30078EF04 /* RegexTest */ = { 82 | activeExec = 0; 83 | executables = ( 84 | 356012B50B1C20730022DDB0 /* RegexTest */, 85 | ); 86 | }; 87 | 24ADE600050886DD00DAF17A /* chartables.c */ = { 88 | uiCtxt = { 89 | sepNavIntBoundsRect = "{{0, 0}, {932, 2576}}"; 90 | sepNavSelRange = "{489, 47}"; 91 | sepNavVisRect = "{{0, 654}, {932, 315}}"; 92 | }; 93 | }; 94 | 24ADE661050886DD00DAF17A /* pcre.c */ = { 95 | uiCtxt = { 96 | sepNavIntBoundsRect = "{{0, 0}, {918, 106358}}"; 97 | sepNavSelRange = "{20293, 22}"; 98 | sepNavVisRect = "{{0, 3290}, {918, 651}}"; 99 | sepNavWindowFrame = "{{99, 59}, {957, 780}}"; 100 | }; 101 | }; 102 | 356012B50B1C20730022DDB0 /* RegexTest */ = { 103 | isa = PBXExecutable; 104 | activeArgIndex = 2147483647; 105 | activeArgIndices = ( 106 | ); 107 | argumentStrings = ( 108 | ); 109 | autoAttachOnCrash = 1; 110 | configStateDict = { 111 | }; 112 | customDataFormattersEnabled = 1; 113 | debuggerPlugin = GDBDebugging; 114 | disassemblyDisplayState = 0; 115 | dylibVariantSuffix = ""; 116 | enableDebugStr = 1; 117 | environmentEntries = ( 118 | ); 119 | executableSystemSymbolLevel = 0; 120 | executableUserSymbolLevel = 0; 121 | libgmallocEnabled = 0; 122 | name = RegexTest; 123 | sourceDirectories = ( 124 | ); 125 | }; 126 | 356012EC0B1C20770022DDB0 /* Source Control */ = { 127 | isa = PBXSourceControlManager; 128 | fallbackIsa = XCSourceControlManager; 129 | isSCMEnabled = 0; 130 | scmConfiguration = { 131 | }; 132 | scmType = ""; 133 | }; 134 | 356012ED0B1C20770022DDB0 /* Code sense */ = { 135 | isa = PBXCodeSenseManager; 136 | indexTemplatePath = ""; 137 | }; 138 | 356013FA0B1C26540022DDB0 /* XCBreakpointsBucket */ = { 139 | isa = XCBreakpointsBucket; 140 | name = "Project Breakpoints"; 141 | objects = ( 142 | ); 143 | }; 144 | 356014070B1C26EF0022DDB0 /* AGRegex-Info.plist */ = { 145 | uiCtxt = { 146 | sepNavIntBoundsRect = "{{0, 0}, {918, 651}}"; 147 | sepNavSelRange = "{356, 11}"; 148 | sepNavVisRect = "{{0, 0}, {918, 651}}"; 149 | sepNavWindowFrame = "{{15, 93}, {957, 780}}"; 150 | }; 151 | }; 152 | 356014D70B1C2A350022DDB0 /* AGRegex (Upgraded) */ = { 153 | activeExec = 0; 154 | }; 155 | F98CF71E0387044501DE5C57 /* AGRegex.h */ = { 156 | uiCtxt = { 157 | sepNavIntBoundsRect = "{{0, 0}, {4244, 3192}}"; 158 | sepNavSelRange = "{0, 0}"; 159 | sepNavVisRect = "{{0, 0}, {918, 651}}"; 160 | sepNavWindowFrame = "{{61, 51}, {957, 780}}"; 161 | }; 162 | }; 163 | } 164 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegex/AGRegex.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | API Documentation 5 | 6 | 7 | 8 |

AGRegex


9 | An Perl-compatible regular expression class. 10 |

11 | An AGRegex is created with -initWithPattern: or -initWithPattern:options: or the corresponding class methods +regexWithPattern: or +regexWithPattern:options:. These take a regular expression pattern string and the bitwise OR of zero or more option flags. For example: 12 |

13 |     AGRegex *regex = [[AGRegex alloc] initWithPattern:@"(paran|andr)oid" options:AGRegexCaseInsensitive]; 14 |

15 | Matching is done with -findInString: or -findInString:range: which look for the first occurrence of the pattern in the target string and return an AGRegexMatch or nil if the pattern was not found. 16 |

17 |     AGRegexMatch *match = [regex findInString:@"paranoid android"]; 18 |

19 | A match object returns a captured subpattern by -group, -groupAtIndex:, or -groupNamed:, or the range of a captured subpattern by -range, -rangeAtIndex:, or -rangeNamed:. The subpatterns are indexed in order of their opening parentheses, 0 is the entire pattern, 1 is the first capturing subpattern, and so on. -count returns the total number of subpatterns, including the pattern itself. The following prints the result of our last match case: 20 |

21 |     for (i = 0; i < [match count]; i++)
22 |         NSLog(@"%d %@ %@", i, NSStringFromRange([match rangeAtIndex:i]), [match groupAtIndex:i]);
23 |

24 |     0 {0, 8} paranoid
25 |     1 {0, 5} paran
26 |

27 | If any of the subpatterns didn't match, -groupAtIndex: will return nil, and -rangeAtIndex: will return {NSNotFound, 0}. For example, if we change our original pattern to "(?:(paran)|(andr))oid" we will get the following output: 28 |

29 |     0 {0, 8} paranoid
30 |     1 {0, 5} paran
31 |     2 {2147483647, 0} (null)
32 |

33 | -findAllInString: and -findAllInString:range: return an NSArray of all non-overlapping occurrences of the pattern in the target string. -findEnumeratorInString: and -findEnumeratorInString:range: return an NSEnumerator for all non-overlapping occurrences of the pattern in the target string. For example, 34 |

35 |     NSArray *all = [regex findAllInString:@"paranoid android"]; 36 |

37 | The first object in the returned array is the match case for "paranoid" and the second object is the match case for "android". 38 |

39 | AGRegex provides the methods -replaceWithString:inString: and -replaceWithString:inString:limit: to perform substitution on strings. 40 |

41 |     AGRegex *regex = [AGRegex regexWithPattern:@"remote"];
42 |     NSString *result = [regex replaceWithString:@"complete" inString:@"remote control"]; // result is "complete control"
43 |

44 | Captured subpatterns can be interpolated into the replacement string using the syntax $x or ${x} where x is the index or name of the subpattern. $0 and $& both refer to the entire pattern. Additionally, the case modifier sequences \U...\E, \L...\E, \u, and \l are allowed in the replacement string. All other escape sequences are handled literally. 45 |

46 |     AGRegex *regex = [AGRegex regexWithPattern:@"[usr]"];
47 |     NSString *result = [regex replaceWithString:@"\\u$&." inString:@"Back in the ussr"]; // result is "Back in the U.S.S.R."
48 |

49 | Note that you have to escape a backslash to get it into an NSString literal. 50 |

51 | Named subpatterns may also be used in the pattern and replacement strings, like in Python. 52 |

53 |     AGRegex *regex = [AGRegex regexWithPattern:@"(?P<who>\\w+) is a (?P<what>\\w+)"];
54 |     NSString *result = [regex replaceWithString:@"Jackie is a $what, $who is a runt" inString:@"Judy is a punk"]); // result is "Jackie is a punk, Judy is a runt"
55 |

56 | Finally, AGRegex provides -splitString: and -splitString:limit: which return an NSArray created by splitting the target string at each occurrence of the pattern. For example: 57 |

58 |     AGRegex *regex = [AGRegex regexWithPattern:@"ea?"];
59 |     NSArray *result = [regex splitString:@"Repeater"]; // result is "R", "p", "t", "r"
60 |

61 | If there are captured subpatterns, they are returned in the array. 62 |

63 |     AGRegex *regex = [AGRegex regexWithPattern:@"e(a)?"];
64 |     NSArray *result = [regex splitString:@"Repeater"]; // result is "R", "p", "a", "t", "r"
65 |

66 | In Perl, this would return "R", undef, "p", "a", "t", undef, "r". Unfortunately, there is no convenient way to represent this in an NSArray. (NSNull could be used in place of undef, but then all members of the array couldn't be expected to be NSStrings.) 67 |

68 |

(Last Updated 9/12/2003) 69 |
HTML documentation generated by HeaderDoc 70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/AGRegex.xcodeproj/aram.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 0867D690FE84028FC02AAC07 = { 4 | activeBuildStyle = 014CEA440018CDF011CA2923; 5 | activeExecutable = 2467EEE9050859D30078EF04; 6 | activeTarget = 2467EEE7050859D30078EF04; 7 | addToTargets = ( 8 | ); 9 | breakpoints = ( 10 | ); 11 | executables = ( 12 | 2467EEE9050859D30078EF04, 13 | ); 14 | perUserDictionary = { 15 | PBXPerProjectTemplateStateSaveDate = 85175762; 16 | PBXWorkspaceContents = ( 17 | { 18 | LeftSlideOut = { 19 | Split0 = { 20 | Split0 = { 21 | NavContent0 = { 22 | bookmark = 24DBFEBB0513AFD900FFD540; 23 | history = ( 24 | 24DBFEBA0513AFD900FFD540, 25 | ); 26 | }; 27 | NavCount = 1; 28 | NavGeometry0 = { 29 | Frame = "{{0, 0}, {614, 465}}"; 30 | NavBarVisible = YES; 31 | }; 32 | NavSplitVertical = NO; 33 | }; 34 | SplitCount = 1; 35 | Tab1 = { 36 | Debugger = { 37 | Split0 = { 38 | SplitCount = 2; 39 | }; 40 | SplitCount = 1; 41 | TabCount = 2; 42 | }; 43 | LauncherConfigVersion = 7; 44 | }; 45 | Tab2 = { 46 | LauncherConfigVersion = 3; 47 | Runner = { 48 | }; 49 | }; 50 | TabCount = 5; 51 | }; 52 | SplitCount = 1; 53 | Tab1 = { 54 | OptionsSetName = "Hierarchy, all classes"; 55 | }; 56 | TabCount = 5; 57 | }; 58 | }, 59 | ); 60 | PBXWorkspaceGeometries = ( 61 | { 62 | ContentSize = "{800, 512}"; 63 | LeftSlideOut = { 64 | ActiveTab = 0; 65 | ActiveTabName = PBXGroupTreeModule; 66 | Collapsed = NO; 67 | Frame = "{{0, 23}, {800, 489}}"; 68 | Split0 = { 69 | Collapsed = NO; 70 | Frame = "{{186, 0}, {614, 489}}"; 71 | Split0 = { 72 | Frame = "{{0, 24}, {614, 465}}"; 73 | }; 74 | SplitCount = 1; 75 | Tab0 = { 76 | Frame = "{{0, 0}, {571, 214}}"; 77 | }; 78 | Tab1 = { 79 | Debugger = { 80 | Collapsed = NO; 81 | Frame = "{{0, 0}, {571, 189}}"; 82 | Split0 = { 83 | Frame = "{{0, 24}, {571, 165}}"; 84 | Split0 = { 85 | Frame = "{{0, 0}, {279, 165}}"; 86 | }; 87 | Split1 = { 88 | DebugVariablesTableConfiguration = ( 89 | Name, 90 | 123, 91 | Value, 92 | 85, 93 | Summary, 94 | 62.123, 95 | ); 96 | Frame = "{{288, 0}, {283, 165}}"; 97 | }; 98 | SplitCount = 2; 99 | }; 100 | SplitCount = 1; 101 | Tab0 = { 102 | Frame = "{{0, 0}, {100, 50}}"; 103 | }; 104 | Tab1 = { 105 | Frame = "{{0, 0}, {100, 50}}"; 106 | }; 107 | TabCount = 2; 108 | TabsVisible = YES; 109 | }; 110 | Frame = "{{0, 0}, {571, 189}}"; 111 | LauncherConfigVersion = 7; 112 | }; 113 | Tab2 = { 114 | Frame = "{{0, 0}, {573, 215}}"; 115 | LauncherConfigVersion = 3; 116 | Runner = { 117 | Frame = "{{0, 0}, {573, 215}}"; 118 | }; 119 | }; 120 | Tab3 = { 121 | BuildMessageFrame = "{{0, 0}, {616, 222}}"; 122 | BuildTranscriptFrame = "{{0, 231}, {616, 0}}"; 123 | BuildTranscriptFrameExpanded = YES; 124 | Frame = "{{0, 0}, {614, 253}}"; 125 | }; 126 | Tab4 = { 127 | Frame = "{{0, 0}, {614, 295}}"; 128 | }; 129 | TabCount = 5; 130 | TabsVisible = YES; 131 | }; 132 | SplitCount = 1; 133 | Tab0 = { 134 | Frame = "{{0, 0}, {162, 489}}"; 135 | GroupTreeTableConfiguration = ( 136 | TargetStatusColumn, 137 | 18, 138 | MainColumn, 139 | 129, 140 | ); 141 | }; 142 | Tab1 = { 143 | ClassesFrame = "{{0, 0}, {247, 330}}"; 144 | ClassesTreeTableConfiguration = ( 145 | PBXBookColumnIdentifier, 146 | 20, 147 | PBXClassColumnIdentifier, 148 | 204, 149 | ); 150 | Frame = "{{0, 0}, {245, 549}}"; 151 | MembersFrame = "{{0, 339}, {247, 210}}"; 152 | MembersTreeTableConfiguration = ( 153 | PBXBookColumnIdentifier, 154 | 20, 155 | PBXMethodColumnIdentifier, 156 | 203, 157 | ); 158 | }; 159 | Tab2 = { 160 | Frame = "{{0, 0}, {226, 469}}"; 161 | }; 162 | Tab3 = { 163 | Frame = "{{0, 0}, {191, 489}}"; 164 | TargetTableConfiguration = ( 165 | ActiveObject, 166 | 16, 167 | ObjectNames, 168 | 202.296, 169 | ); 170 | }; 171 | Tab4 = { 172 | BreakpointsTreeTableConfiguration = ( 173 | breakpointColumn, 174 | 138, 175 | enabledColumn, 176 | 31, 177 | ); 178 | Frame = "{{0, 0}, {191, 489}}"; 179 | }; 180 | TabCount = 5; 181 | TabsVisible = YES; 182 | }; 183 | NavBarShownByDefault = YES; 184 | StatusViewVisible = YES; 185 | Template = F5F68CF101725D4C0D7A8F4C; 186 | ToolbarVisible = YES; 187 | WindowLocation = "{0, 4}"; 188 | }, 189 | ); 190 | PBXWorkspaceStateSaveDate = 85175762; 191 | }; 192 | perUserProjectItems = { 193 | 24DBFEBA0513AFD900FFD540 = 24DBFEBA0513AFD900FFD540; 194 | 24DBFEBB0513AFD900FFD540 = 24DBFEBB0513AFD900FFD540; 195 | }; 196 | projectwideBuildSettings = { 197 | }; 198 | wantsIndex = 1; 199 | wantsSCM = -1; 200 | }; 201 | 0867D69CFE84028FC02AAC07 = { 202 | activeExec = 0; 203 | }; 204 | 2467EEE7050859D30078EF04 = { 205 | activeExec = 0; 206 | executables = ( 207 | 2467EEE9050859D30078EF04, 208 | ); 209 | }; 210 | 2467EEE9050859D30078EF04 = { 211 | activeArgIndex = 2147483647; 212 | activeArgIndices = ( 213 | ); 214 | argumentStrings = ( 215 | ); 216 | configStateDict = { 217 | }; 218 | debuggerPlugin = GDBDebugging; 219 | dylibVariantSuffix = ""; 220 | enableDebugStr = 1; 221 | environmentEntries = ( 222 | ); 223 | isa = PBXExecutable; 224 | name = RegexTest; 225 | shlibInfoDictList = ( 226 | ); 227 | sourceDirectories = ( 228 | ); 229 | }; 230 | 24DBFEBA0513AFD900FFD540 = { 231 | fRef = F986DBD403876F3201A58F65; 232 | isa = PBXBookmark; 233 | }; 234 | 24DBFEBB0513AFD900FFD540 = { 235 | fRef = F986DBD403876F3201A58F65; 236 | isa = PBXTextBookmark; 237 | name = "README.txt: 1"; 238 | rLen = 0; 239 | rLoc = 0; 240 | rType = 0; 241 | vrLen = 1587; 242 | vrLoc = 0; 243 | }; 244 | } 245 | -------------------------------------------------------------------------------- /markov/markov.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 44; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 35CFD55319E7F3CA00B2B8B5 /* markov.c in Sources */ = {isa = PBXBuildFile; fileRef = 35CFD55219E7F3CA00B2B8B5 /* markov.c */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXFileReference section */ 14 | 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = maxmspsdk.xcconfig; path = ../../maxmspsdk.xcconfig; sourceTree = SOURCE_ROOT; }; 15 | 2FBBEAE508F335360078DB84 /* markov.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = markov.mxo; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | 35CFD55219E7F3CA00B2B8B5 /* markov.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = markov.c; sourceTree = ""; }; 17 | /* End PBXFileReference section */ 18 | 19 | /* Begin PBXFrameworksBuildPhase section */ 20 | 2FBBEADC08F335360078DB84 /* Frameworks */ = { 21 | isa = PBXFrameworksBuildPhase; 22 | buildActionMask = 2147483647; 23 | files = ( 24 | ); 25 | runOnlyForDeploymentPostprocessing = 0; 26 | }; 27 | /* End PBXFrameworksBuildPhase section */ 28 | 29 | /* Begin PBXGroup section */ 30 | 089C166AFE841209C02AAC07 /* iterator */ = { 31 | isa = PBXGroup; 32 | children = ( 33 | 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */, 34 | 35CFD55219E7F3CA00B2B8B5 /* markov.c */, 35 | 19C28FB4FE9D528D11CA2CBB /* Products */, 36 | ); 37 | name = iterator; 38 | sourceTree = ""; 39 | }; 40 | 19C28FB4FE9D528D11CA2CBB /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 2FBBEAE508F335360078DB84 /* markov.mxo */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | /* End PBXGroup section */ 49 | 50 | /* Begin PBXHeadersBuildPhase section */ 51 | 2FBBEAD708F335360078DB84 /* Headers */ = { 52 | isa = PBXHeadersBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXHeadersBuildPhase section */ 59 | 60 | /* Begin PBXNativeTarget section */ 61 | 2FBBEAD608F335360078DB84 /* max-external */ = { 62 | isa = PBXNativeTarget; 63 | buildConfigurationList = 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */; 64 | buildPhases = ( 65 | 2FBBEAD708F335360078DB84 /* Headers */, 66 | 2FBBEAD808F335360078DB84 /* Resources */, 67 | 2FBBEADA08F335360078DB84 /* Sources */, 68 | 2FBBEADC08F335360078DB84 /* Frameworks */, 69 | 2FBBEADF08F335360078DB84 /* Rez */, 70 | ); 71 | buildRules = ( 72 | ); 73 | dependencies = ( 74 | ); 75 | name = "max-external"; 76 | productName = iterator; 77 | productReference = 2FBBEAE508F335360078DB84 /* markov.mxo */; 78 | productType = "com.apple.product-type.bundle"; 79 | }; 80 | /* End PBXNativeTarget section */ 81 | 82 | /* Begin PBXProject section */ 83 | 089C1669FE841209C02AAC07 /* Project object */ = { 84 | isa = PBXProject; 85 | attributes = { 86 | }; 87 | buildConfigurationList = 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "markov" */; 88 | compatibilityVersion = "Xcode 3.0"; 89 | developmentRegion = English; 90 | hasScannedForEncodings = 1; 91 | knownRegions = ( 92 | en, 93 | ); 94 | mainGroup = 089C166AFE841209C02AAC07 /* iterator */; 95 | projectDirPath = ""; 96 | projectRoot = ""; 97 | targets = ( 98 | 2FBBEAD608F335360078DB84 /* max-external */, 99 | ); 100 | }; 101 | /* End PBXProject section */ 102 | 103 | /* Begin PBXResourcesBuildPhase section */ 104 | 2FBBEAD808F335360078DB84 /* Resources */ = { 105 | isa = PBXResourcesBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | /* End PBXResourcesBuildPhase section */ 112 | 113 | /* Begin PBXRezBuildPhase section */ 114 | 2FBBEADF08F335360078DB84 /* Rez */ = { 115 | isa = PBXRezBuildPhase; 116 | buildActionMask = 2147483647; 117 | files = ( 118 | ); 119 | runOnlyForDeploymentPostprocessing = 0; 120 | }; 121 | /* End PBXRezBuildPhase section */ 122 | 123 | /* Begin PBXSourcesBuildPhase section */ 124 | 2FBBEADA08F335360078DB84 /* Sources */ = { 125 | isa = PBXSourcesBuildPhase; 126 | buildActionMask = 2147483647; 127 | files = ( 128 | 35CFD55319E7F3CA00B2B8B5 /* markov.c in Sources */, 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXSourcesBuildPhase section */ 133 | 134 | /* Begin XCBuildConfiguration section */ 135 | 2FBBEAD008F335010078DB84 /* Development */ = { 136 | isa = XCBuildConfiguration; 137 | buildSettings = { 138 | }; 139 | name = Development; 140 | }; 141 | 2FBBEAD108F335010078DB84 /* Deployment */ = { 142 | isa = XCBuildConfiguration; 143 | buildSettings = { 144 | }; 145 | name = Deployment; 146 | }; 147 | 2FBBEAE108F335360078DB84 /* Development */ = { 148 | isa = XCBuildConfiguration; 149 | baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; 150 | buildSettings = { 151 | COPY_PHASE_STRIP = NO; 152 | GCC_OPTIMIZATION_LEVEL = 0; 153 | OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; 154 | PRODUCT_NAME = markov; 155 | }; 156 | name = Development; 157 | }; 158 | 2FBBEAE208F335360078DB84 /* Deployment */ = { 159 | isa = XCBuildConfiguration; 160 | baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; 161 | buildSettings = { 162 | COPY_PHASE_STRIP = YES; 163 | OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; 164 | PRODUCT_NAME = markov; 165 | }; 166 | name = Deployment; 167 | }; 168 | /* End XCBuildConfiguration section */ 169 | 170 | /* Begin XCConfigurationList section */ 171 | 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "markov" */ = { 172 | isa = XCConfigurationList; 173 | buildConfigurations = ( 174 | 2FBBEAD008F335010078DB84 /* Development */, 175 | 2FBBEAD108F335010078DB84 /* Deployment */, 176 | ); 177 | defaultConfigurationIsVisible = 0; 178 | defaultConfigurationName = Development; 179 | }; 180 | 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */ = { 181 | isa = XCConfigurationList; 182 | buildConfigurations = ( 183 | 2FBBEAE108F335360078DB84 /* Development */, 184 | 2FBBEAE208F335360078DB84 /* Deployment */, 185 | ); 186 | defaultConfigurationIsVisible = 0; 187 | defaultConfigurationName = Development; 188 | }; 189 | /* End XCConfigurationList section */ 190 | }; 191 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 192 | } 193 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex/pcre-4.3/pcre.h: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* Copyright (c) 1997-2003 University of Cambridge */ 6 | 7 | #ifndef _PCRE_H 8 | #define _PCRE_H 9 | 10 | /* The file pcre.h is build by "configure". Do not edit it; instead 11 | make changes to pcre.in. */ 12 | 13 | #define PCRE_MAJOR 4 14 | #define PCRE_MINOR 3 15 | #define PCRE_DATE 21-May-2003 16 | 17 | /* Win32 uses DLL by default */ 18 | 19 | #ifdef _WIN32 20 | # ifdef PCRE_DEFINITION 21 | # ifdef DLL_EXPORT 22 | # define PCRE_DATA_SCOPE __declspec(dllexport) 23 | # endif 24 | # else 25 | # ifndef PCRE_STATIC 26 | # define PCRE_DATA_SCOPE __declspec(dllimport) 27 | # endif 28 | # endif 29 | #endif 30 | #ifndef PCRE_DATA_SCOPE 31 | # define PCRE_DATA_SCOPE extern 32 | #endif 33 | 34 | /* Have to include stdlib.h in order to ensure that size_t is defined; 35 | it is needed here for malloc. */ 36 | 37 | #include 38 | 39 | /* Allow for C++ users */ 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /* Options */ 46 | 47 | #define PCRE_CASELESS 0x0001 48 | #define PCRE_MULTILINE 0x0002 49 | #define PCRE_DOTALL 0x0004 50 | #define PCRE_EXTENDED 0x0008 51 | #define PCRE_ANCHORED 0x0010 52 | #define PCRE_DOLLAR_ENDONLY 0x0020 53 | #define PCRE_EXTRA 0x0040 54 | #define PCRE_NOTBOL 0x0080 55 | #define PCRE_NOTEOL 0x0100 56 | #define PCRE_UNGREEDY 0x0200 57 | #define PCRE_NOTEMPTY 0x0400 58 | #define PCRE_UTF8 0x0800 59 | #define PCRE_NO_AUTO_CAPTURE 0x1000 60 | 61 | /* Exec-time and get/set-time error codes */ 62 | 63 | #define PCRE_ERROR_NOMATCH (-1) 64 | #define PCRE_ERROR_NULL (-2) 65 | #define PCRE_ERROR_BADOPTION (-3) 66 | #define PCRE_ERROR_BADMAGIC (-4) 67 | #define PCRE_ERROR_UNKNOWN_NODE (-5) 68 | #define PCRE_ERROR_NOMEMORY (-6) 69 | #define PCRE_ERROR_NOSUBSTRING (-7) 70 | #define PCRE_ERROR_MATCHLIMIT (-8) 71 | #define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ 72 | 73 | /* Request types for pcre_fullinfo() */ 74 | 75 | #define PCRE_INFO_OPTIONS 0 76 | #define PCRE_INFO_SIZE 1 77 | #define PCRE_INFO_CAPTURECOUNT 2 78 | #define PCRE_INFO_BACKREFMAX 3 79 | #define PCRE_INFO_FIRSTBYTE 4 80 | #define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ 81 | #define PCRE_INFO_FIRSTTABLE 5 82 | #define PCRE_INFO_LASTLITERAL 6 83 | #define PCRE_INFO_NAMEENTRYSIZE 7 84 | #define PCRE_INFO_NAMECOUNT 8 85 | #define PCRE_INFO_NAMETABLE 9 86 | #define PCRE_INFO_STUDYSIZE 10 87 | 88 | /* Request types for pcre_config() */ 89 | 90 | #define PCRE_CONFIG_UTF8 0 91 | #define PCRE_CONFIG_NEWLINE 1 92 | #define PCRE_CONFIG_LINK_SIZE 2 93 | #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 94 | #define PCRE_CONFIG_MATCH_LIMIT 4 95 | 96 | /* Bit flags for the pcre_extra structure */ 97 | 98 | #define PCRE_EXTRA_STUDY_DATA 0x0001 99 | #define PCRE_EXTRA_MATCH_LIMIT 0x0002 100 | #define PCRE_EXTRA_CALLOUT_DATA 0x0004 101 | 102 | /* Types */ 103 | 104 | struct real_pcre; /* declaration; the definition is private */ 105 | typedef struct real_pcre pcre; 106 | 107 | /* The structure for passing additional data to pcre_exec(). This is defined in 108 | such as way as to be extensible. */ 109 | 110 | typedef struct pcre_extra { 111 | unsigned long int flags; /* Bits for which fields are set */ 112 | void *study_data; /* Opaque data from pcre_study() */ 113 | unsigned long int match_limit; /* Maximum number of calls to match() */ 114 | void *callout_data; /* Data passed back in callouts */ 115 | } pcre_extra; 116 | 117 | /* The structure for passing out data via the pcre_callout_function. We use a 118 | structure so that new fields can be added on the end in future versions, 119 | without changing the API of the function, thereby allowing old clients to work 120 | without modification. */ 121 | 122 | typedef struct pcre_callout_block { 123 | int version; /* Identifies version of block */ 124 | /* ------------------------ Version 0 ------------------------------- */ 125 | int callout_number; /* Number compiled into pattern */ 126 | int *offset_vector; /* The offset vector */ 127 | const char *subject; /* The subject being matched */ 128 | int subject_length; /* The length of the subject */ 129 | int start_match; /* Offset to start of this match attempt */ 130 | int current_position; /* Where we currently are */ 131 | int capture_top; /* Max current capture */ 132 | int capture_last; /* Most recently closed capture */ 133 | void *callout_data; /* Data passed in with the call */ 134 | /* ------------------------------------------------------------------ */ 135 | } pcre_callout_block; 136 | 137 | /* Indirection for store get and free functions. These can be set to 138 | alternative malloc/free functions if required. There is also an optional 139 | callout function that is triggered by the (?) regex item. Some magic is 140 | required for Win32 DLL; it is null on other OS. For Virtual Pascal, these 141 | have to be different again. */ 142 | 143 | #ifndef VPCOMPAT 144 | PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t); 145 | PCRE_DATA_SCOPE void (*pcre_free)(void *); 146 | PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *); 147 | #else /* VPCOMPAT */ 148 | extern void *pcre_malloc(size_t); 149 | extern void pcre_free(void *); 150 | extern int pcre_callout(pcre_callout_block *); 151 | #endif /* VPCOMPAT */ 152 | 153 | /* Exported PCRE functions */ 154 | 155 | extern pcre *pcre_compile(const char *, int, const char **, 156 | int *, const unsigned char *); 157 | extern int pcre_config(int, void *); 158 | extern int pcre_copy_named_substring(const pcre *, const char *, 159 | int *, int, const char *, char *, int); 160 | extern int pcre_copy_substring(const char *, int *, int, int, 161 | char *, int); 162 | extern int pcre_exec(const pcre *, const pcre_extra *, 163 | const char *, int, int, int, int *, int); 164 | extern void pcre_free_substring(const char *); 165 | extern void pcre_free_substring_list(const char **); 166 | extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, 167 | void *); 168 | extern int pcre_get_named_substring(const pcre *, const char *, 169 | int *, int, const char *, const char **); 170 | extern int pcre_get_stringnumber(const pcre *, const char *); 171 | extern int pcre_get_substring(const char *, int *, int, int, 172 | const char **); 173 | extern int pcre_get_substring_list(const char *, int *, int, 174 | const char ***); 175 | extern int pcre_info(const pcre *, int *, int *); 176 | extern const unsigned char *pcre_maketables(void); 177 | extern pcre_extra *pcre_study(const pcre *, int, const char **); 178 | extern const char *pcre_version(void); 179 | 180 | #ifdef __cplusplus 181 | } /* extern "C" */ 182 | #endif 183 | 184 | #endif /* End of pcre.h */ 185 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/pcre.h: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* Copyright (c) 1997-2003 University of Cambridge */ 6 | 7 | #ifndef _PCRE_H 8 | #define _PCRE_H 9 | 10 | /* The file pcre.h is build by "configure". Do not edit it; instead 11 | make changes to pcre.in. */ 12 | 13 | #define PCRE_MAJOR 4 14 | #define PCRE_MINOR 3 15 | #define PCRE_DATE 21-May-2003 16 | 17 | /* Win32 uses DLL by default */ 18 | 19 | #ifdef _WIN32 20 | # ifdef PCRE_DEFINITION 21 | # ifdef DLL_EXPORT 22 | # define PCRE_DATA_SCOPE __declspec(dllexport) 23 | # endif 24 | # else 25 | # ifndef PCRE_STATIC 26 | # define PCRE_DATA_SCOPE __declspec(dllimport) 27 | # endif 28 | # endif 29 | #endif 30 | #ifndef PCRE_DATA_SCOPE 31 | # define PCRE_DATA_SCOPE extern 32 | #endif 33 | 34 | /* Have to include stdlib.h in order to ensure that size_t is defined; 35 | it is needed here for malloc. */ 36 | 37 | #include 38 | 39 | /* Allow for C++ users */ 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /* Options */ 46 | 47 | #define PCRE_CASELESS 0x0001 48 | #define PCRE_MULTILINE 0x0002 49 | #define PCRE_DOTALL 0x0004 50 | #define PCRE_EXTENDED 0x0008 51 | #define PCRE_ANCHORED 0x0010 52 | #define PCRE_DOLLAR_ENDONLY 0x0020 53 | #define PCRE_EXTRA 0x0040 54 | #define PCRE_NOTBOL 0x0080 55 | #define PCRE_NOTEOL 0x0100 56 | #define PCRE_UNGREEDY 0x0200 57 | #define PCRE_NOTEMPTY 0x0400 58 | #define PCRE_UTF8 0x0800 59 | #define PCRE_NO_AUTO_CAPTURE 0x1000 60 | 61 | /* Exec-time and get/set-time error codes */ 62 | 63 | #define PCRE_ERROR_NOMATCH (-1) 64 | #define PCRE_ERROR_NULL (-2) 65 | #define PCRE_ERROR_BADOPTION (-3) 66 | #define PCRE_ERROR_BADMAGIC (-4) 67 | #define PCRE_ERROR_UNKNOWN_NODE (-5) 68 | #define PCRE_ERROR_NOMEMORY (-6) 69 | #define PCRE_ERROR_NOSUBSTRING (-7) 70 | #define PCRE_ERROR_MATCHLIMIT (-8) 71 | #define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ 72 | 73 | /* Request types for pcre_fullinfo() */ 74 | 75 | #define PCRE_INFO_OPTIONS 0 76 | #define PCRE_INFO_SIZE 1 77 | #define PCRE_INFO_CAPTURECOUNT 2 78 | #define PCRE_INFO_BACKREFMAX 3 79 | #define PCRE_INFO_FIRSTBYTE 4 80 | #define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ 81 | #define PCRE_INFO_FIRSTTABLE 5 82 | #define PCRE_INFO_LASTLITERAL 6 83 | #define PCRE_INFO_NAMEENTRYSIZE 7 84 | #define PCRE_INFO_NAMECOUNT 8 85 | #define PCRE_INFO_NAMETABLE 9 86 | #define PCRE_INFO_STUDYSIZE 10 87 | 88 | /* Request types for pcre_config() */ 89 | 90 | #define PCRE_CONFIG_UTF8 0 91 | #define PCRE_CONFIG_NEWLINE 1 92 | #define PCRE_CONFIG_LINK_SIZE 2 93 | #define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 94 | #define PCRE_CONFIG_MATCH_LIMIT 4 95 | 96 | /* Bit flags for the pcre_extra structure */ 97 | 98 | #define PCRE_EXTRA_STUDY_DATA 0x0001 99 | #define PCRE_EXTRA_MATCH_LIMIT 0x0002 100 | #define PCRE_EXTRA_CALLOUT_DATA 0x0004 101 | 102 | /* Types */ 103 | 104 | struct real_pcre; /* declaration; the definition is private */ 105 | typedef struct real_pcre pcre; 106 | 107 | /* The structure for passing additional data to pcre_exec(). This is defined in 108 | such as way as to be extensible. */ 109 | 110 | typedef struct pcre_extra { 111 | unsigned long int flags; /* Bits for which fields are set */ 112 | void *study_data; /* Opaque data from pcre_study() */ 113 | unsigned long int match_limit; /* Maximum number of calls to match() */ 114 | void *callout_data; /* Data passed back in callouts */ 115 | } pcre_extra; 116 | 117 | /* The structure for passing out data via the pcre_callout_function. We use a 118 | structure so that new fields can be added on the end in future versions, 119 | without changing the API of the function, thereby allowing old clients to work 120 | without modification. */ 121 | 122 | typedef struct pcre_callout_block { 123 | int version; /* Identifies version of block */ 124 | /* ------------------------ Version 0 ------------------------------- */ 125 | int callout_number; /* Number compiled into pattern */ 126 | int *offset_vector; /* The offset vector */ 127 | const char *subject; /* The subject being matched */ 128 | int subject_length; /* The length of the subject */ 129 | int start_match; /* Offset to start of this match attempt */ 130 | int current_position; /* Where we currently are */ 131 | int capture_top; /* Max current capture */ 132 | int capture_last; /* Most recently closed capture */ 133 | void *callout_data; /* Data passed in with the call */ 134 | /* ------------------------------------------------------------------ */ 135 | } pcre_callout_block; 136 | 137 | /* Indirection for store get and free functions. These can be set to 138 | alternative malloc/free functions if required. There is also an optional 139 | callout function that is triggered by the (?) regex item. Some magic is 140 | required for Win32 DLL; it is null on other OS. For Virtual Pascal, these 141 | have to be different again. */ 142 | 143 | #ifndef VPCOMPAT 144 | PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t); 145 | PCRE_DATA_SCOPE void (*pcre_free)(void *); 146 | PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *); 147 | #else /* VPCOMPAT */ 148 | extern void *pcre_malloc(size_t); 149 | extern void pcre_free(void *); 150 | extern int pcre_callout(pcre_callout_block *); 151 | #endif /* VPCOMPAT */ 152 | 153 | /* Exported PCRE functions */ 154 | 155 | extern pcre *pcre_compile(const char *, int, const char **, 156 | int *, const unsigned char *); 157 | extern int pcre_config(int, void *); 158 | extern int pcre_copy_named_substring(const pcre *, const char *, 159 | int *, int, const char *, char *, int); 160 | extern int pcre_copy_substring(const char *, int *, int, int, 161 | char *, int); 162 | extern int pcre_exec(const pcre *, const pcre_extra *, 163 | const char *, int, int, int, int *, int); 164 | extern void pcre_free_substring(const char *); 165 | extern void pcre_free_substring_list(const char **); 166 | extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, 167 | void *); 168 | extern int pcre_get_named_substring(const pcre *, const char *, 169 | int *, int, const char *, const char **); 170 | extern int pcre_get_stringnumber(const pcre *, const char *); 171 | extern int pcre_get_substring(const char *, int *, int, int, 172 | const char **); 173 | extern int pcre_get_substring_list(const char *, int *, int, 174 | const char ***); 175 | extern int pcre_info(const pcre *, int *, int *); 176 | extern const unsigned char *pcre_maketables(void); 177 | extern pcre_extra *pcre_study(const pcre *, int, const char **); 178 | extern const char *pcre_version(void); 179 | 180 | #ifdef __cplusplus 181 | } /* extern "C" */ 182 | #endif 183 | 184 | #endif /* End of pcre.h */ 185 | -------------------------------------------------------------------------------- /freesoundsearch/NTLoginConnection.m: -------------------------------------------------------------------------------- 1 | // 2 | // NTLoginConnection.m 3 | // NTFreesoundSearch 4 | // 5 | // Created by Nao Tokui on 11/21/06. 6 | // Copyright 2006 www.sonasphere.com. All rights reserved. 7 | // 8 | 9 | #import "NTLoginConnection.h" 10 | #import "NTFreesoundSearch.h" 11 | #import "AGRegex.h" 12 | //#import 13 | 14 | #include "ext.h" 15 | 16 | // Login/Logout URL 17 | #define LOGIN_TARGET_URL @"http://www.freesound.org/forum/login.php" 18 | #define LOGOUT_TARGET_URL @"http://www.freesound.org/index.php?logout=true" 19 | 20 | // Time Out 21 | #define TIMEOUT_DURATION 30 22 | 23 | @implementation NTLoginConnection 24 | 25 | #pragma mark - 26 | 27 | /*** Delegate Functions ***/ 28 | - (void) setDelegate: (NTFreesoundSearch *) obj 29 | { 30 | _delegate = obj; 31 | } 32 | - (id) delegate{ return _delegate; } 33 | 34 | - (void) dealloc { 35 | [super dealloc]; 36 | } 37 | 38 | 39 | #pragma mark - 40 | 41 | /*** Login/Logout Procedure ***/ 42 | - (int) startLogin: (const char *) login : (const char *) password 43 | { 44 | // Check if there is login request still working 45 | if (currentStatus == loggingin){ 46 | error("login request still in process"); 47 | return 0; 48 | } 49 | 50 | // Make login & password strings 51 | NSString *loginStr = [NSString stringWithCString: login]; 52 | NSString *pwStr = [NSString stringWithCString: password]; 53 | // Warn and return 0 if these strings are blank 54 | if ([[loginStr stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]] isEqualToString:@""] 55 | || [[pwStr stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]] isEqualToString:@""]){ 56 | error("Username/Password strings are blank. Please specify your Username and Password."); 57 | return 0; 58 | } 59 | 60 | // Create a request for the login procedure for registered users 61 | NSMutableURLRequest *loginRequest=[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString: LOGIN_TARGET_URL] 62 | cachePolicy: NSURLRequestReloadIgnoringCacheData // No Cache. Always tries to load the original source. 63 | timeoutInterval: TIMEOUT_DURATION]; 64 | NSAssert(loginRequest, @"Cannot make a URL request"); 65 | 66 | // Configure the request 67 | [loginRequest setHTTPShouldHandleCookies: YES]; 68 | [loginRequest setHTTPMethod:@"POST"]; 69 | NSString *postStr = [NSString stringWithFormat: 70 | @"username=%@&password=%@&login=login&redirect=../index.php", loginStr, pwStr]; // POST Data 71 | [loginRequest setHTTPBody:[postStr dataUsingEncoding: NSISOLatin1StringEncoding]]; 72 | 73 | // Create the connection with the request and start loading the data 74 | theConnection=[[NSURLConnection alloc] initWithRequest:loginRequest delegate:self]; 75 | [loginRequest release]; 76 | if (theConnection) { 77 | // Create the NSMutableData that will hold the received data 78 | receivedData=[[NSMutableData data] retain]; 79 | currentStatus = loggingin; 80 | return 1; // Starting... 81 | } else { 82 | // inform the user that the download could not be made 83 | NSLog(@"Cannot Make A Connection to: %@", LOGIN_TARGET_URL); 84 | return 0; 85 | } 86 | return 0; 87 | } 88 | 89 | - (int) startLogout 90 | { 91 | // Check if there is login request still working 92 | if (currentStatus == loggingout){ 93 | error("logout request still in process"); 94 | return 0; 95 | } 96 | 97 | // Create a request for the login procedure for registered users 98 | NSMutableURLRequest *logoutRequest=[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString: LOGOUT_TARGET_URL] 99 | cachePolicy: NSURLRequestReloadIgnoringCacheData // DO CACHE! 100 | timeoutInterval: TIMEOUT_DURATION]; 101 | NSAssert(logoutRequest, @"Cannot make a URL request"); 102 | 103 | // Create the connection with the request and start loading the data 104 | theConnection=[[NSURLConnection alloc] initWithRequest:logoutRequest delegate:self]; 105 | [logoutRequest release]; 106 | if (theConnection) { 107 | // Create the NSMutableData that will hold the received data 108 | receivedData=[[NSMutableData data] retain]; 109 | currentStatus = loggingout; 110 | return 1; 111 | } else { 112 | // inform the user that the download could not be made 113 | NSLog(@"Cannot Make A Connection to: %@", LOGIN_TARGET_URL); 114 | return 0; 115 | } 116 | return 0; 117 | } 118 | 119 | #pragma mark DELEGATE FUNCTIONS 120 | 121 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 122 | { 123 | // this method is called when the server has determined that it 124 | // has enough information to create the NSURLResponse 125 | // it can be called multiple times, for example in the case of a 126 | // redirect, so each time we reset the data. 127 | [receivedData setLength: 0]; 128 | } 129 | 130 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data 131 | { 132 | // append the new data to the receivedData 133 | [receivedData appendData:data]; 134 | } 135 | 136 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 137 | { 138 | // release the connection, and the data object 139 | [connection release]; connection = nil; theConnection = nil; 140 | [receivedData release]; 141 | 142 | // Inform the user 143 | NSLog(@"Connection failed! Error - %@ %@", 144 | [error localizedDescription], 145 | [[error userInfo] objectForKey:NSErrorFailingURLStringKey]); 146 | 147 | // Inform the client word: nil == translation failed, and finishing the process 148 | currentStatus = login_idle; 149 | } 150 | 151 | -(NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse 152 | { 153 | return request; 154 | } 155 | 156 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection 157 | { 158 | // Analyze downloaded html file 159 | NSString *html = [[NSString alloc] initWithData: receivedData encoding: NSISOLatin1StringEncoding ]; // Downloaded HTML (iso-8859-1 encoding) 160 | 161 | if (currentStatus == loggingin){ 162 | AGRegex *regex = [[AGRegex alloc] initWithPattern: @"You are logged in as" options: AGRegexCaseInsensitive]; // Regular Expression 163 | AGRegexMatch *match = [regex findInString:html]; 164 | 165 | // Login Succeeded 166 | if ([match count]>=1) { 167 | [_delegate setLoginStatus: loggedin]; 168 | } else { 169 | [_delegate setLoginStatus: loginfailed]; // Login Failed. 170 | } 171 | [regex release]; 172 | } else if (currentStatus == loggingout){ 173 | AGRegex *regex = [[AGRegex alloc] initWithPattern: @"autologin" options: AGRegexCaseInsensitive]; // Regular Expression 174 | AGRegexMatch *match = [regex findInString:html]; 175 | 176 | // Login Succeeded 177 | if ([match count]>=1) { 178 | [_delegate setLoginStatus: notloggedinyet]; 179 | } else { 180 | [_delegate setLoginStatus: logoutfailed]; // Logout Failed. 181 | } 182 | [regex release]; 183 | } 184 | 185 | // Release the connection and data object 186 | [connection release]; connection = nil; theConnection = nil; 187 | [receivedData release]; [html release]; 188 | currentStatus = login_idle; 189 | } 190 | 191 | - (void) cancel 192 | { 193 | if (currentStatus == loggingin || currentStatus == loggingout){ 194 | [theConnection cancel]; 195 | [theConnection release]; theConnection = nil; 196 | [receivedData release]; 197 | currentStatus = login_idle; 198 | } 199 | } 200 | 201 | @end 202 | -------------------------------------------------------------------------------- /slice~/slice~.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 44; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 22CF119E0EE9A82E0054F513 /* MaxAudioAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22CF119D0EE9A82E0054F513 /* MaxAudioAPI.framework */; }; 11 | 3597DA1C19E6AA1600F087C3 /* slice~.c in Sources */ = {isa = PBXBuildFile; fileRef = 3597DA1B19E6AA1600F087C3 /* slice~.c */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = maxmspsdk.xcconfig; path = ../../maxmspsdk.xcconfig; sourceTree = SOURCE_ROOT; }; 16 | 22CF119D0EE9A82E0054F513 /* MaxAudioAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MaxAudioAPI.framework; path = "../../../c74support/msp-includes/MaxAudioAPI.framework"; sourceTree = SOURCE_ROOT; }; 17 | 2FBBEAE508F335360078DB84 /* slice~.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "slice~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 3597DA1B19E6AA1600F087C3 /* slice~.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "slice~.c"; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 2FBBEADC08F335360078DB84 /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | 22CF119E0EE9A82E0054F513 /* MaxAudioAPI.framework in Frameworks */, 27 | ); 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXFrameworksBuildPhase section */ 31 | 32 | /* Begin PBXGroup section */ 33 | 089C166AFE841209C02AAC07 /* iterator */ = { 34 | isa = PBXGroup; 35 | children = ( 36 | 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */, 37 | 3597DA1B19E6AA1600F087C3 /* slice~.c */, 38 | 22CF119D0EE9A82E0054F513 /* MaxAudioAPI.framework */, 39 | 19C28FB4FE9D528D11CA2CBB /* Products */, 40 | ); 41 | name = iterator; 42 | sourceTree = ""; 43 | }; 44 | 19C28FB4FE9D528D11CA2CBB /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | 2FBBEAE508F335360078DB84 /* slice~.mxo */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | /* End PBXGroup section */ 53 | 54 | /* Begin PBXHeadersBuildPhase section */ 55 | 2FBBEAD708F335360078DB84 /* Headers */ = { 56 | isa = PBXHeadersBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXHeadersBuildPhase section */ 63 | 64 | /* Begin PBXNativeTarget section */ 65 | 2FBBEAD608F335360078DB84 /* max-external */ = { 66 | isa = PBXNativeTarget; 67 | buildConfigurationList = 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */; 68 | buildPhases = ( 69 | 2FBBEAD708F335360078DB84 /* Headers */, 70 | 2FBBEAD808F335360078DB84 /* Resources */, 71 | 2FBBEADA08F335360078DB84 /* Sources */, 72 | 2FBBEADC08F335360078DB84 /* Frameworks */, 73 | 2FBBEADF08F335360078DB84 /* Rez */, 74 | ); 75 | buildRules = ( 76 | ); 77 | dependencies = ( 78 | ); 79 | name = "max-external"; 80 | productName = iterator; 81 | productReference = 2FBBEAE508F335360078DB84 /* slice~.mxo */; 82 | productType = "com.apple.product-type.bundle"; 83 | }; 84 | /* End PBXNativeTarget section */ 85 | 86 | /* Begin PBXProject section */ 87 | 089C1669FE841209C02AAC07 /* Project object */ = { 88 | isa = PBXProject; 89 | attributes = { 90 | }; 91 | buildConfigurationList = 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "slice~" */; 92 | compatibilityVersion = "Xcode 3.0"; 93 | developmentRegion = English; 94 | hasScannedForEncodings = 1; 95 | knownRegions = ( 96 | English, 97 | Japanese, 98 | French, 99 | German, 100 | ); 101 | mainGroup = 089C166AFE841209C02AAC07 /* iterator */; 102 | projectDirPath = ""; 103 | projectRoot = ""; 104 | targets = ( 105 | 2FBBEAD608F335360078DB84 /* max-external */, 106 | ); 107 | }; 108 | /* End PBXProject section */ 109 | 110 | /* Begin PBXResourcesBuildPhase section */ 111 | 2FBBEAD808F335360078DB84 /* Resources */ = { 112 | isa = PBXResourcesBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | /* End PBXResourcesBuildPhase section */ 119 | 120 | /* Begin PBXRezBuildPhase section */ 121 | 2FBBEADF08F335360078DB84 /* Rez */ = { 122 | isa = PBXRezBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | ); 126 | runOnlyForDeploymentPostprocessing = 0; 127 | }; 128 | /* End PBXRezBuildPhase section */ 129 | 130 | /* Begin PBXSourcesBuildPhase section */ 131 | 2FBBEADA08F335360078DB84 /* Sources */ = { 132 | isa = PBXSourcesBuildPhase; 133 | buildActionMask = 2147483647; 134 | files = ( 135 | 3597DA1C19E6AA1600F087C3 /* slice~.c in Sources */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXSourcesBuildPhase section */ 140 | 141 | /* Begin XCBuildConfiguration section */ 142 | 2FBBEAD008F335010078DB84 /* Development */ = { 143 | isa = XCBuildConfiguration; 144 | buildSettings = { 145 | }; 146 | name = Development; 147 | }; 148 | 2FBBEAD108F335010078DB84 /* Deployment */ = { 149 | isa = XCBuildConfiguration; 150 | buildSettings = { 151 | }; 152 | name = Deployment; 153 | }; 154 | 2FBBEAE108F335360078DB84 /* Development */ = { 155 | isa = XCBuildConfiguration; 156 | baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; 157 | buildSettings = { 158 | COPY_PHASE_STRIP = NO; 159 | FRAMEWORK_SEARCH_PATHS = ( 160 | "$(inherited)", 161 | "\"$(SRCROOT)/../../../c74support/msp-includes\"", 162 | ); 163 | GCC_OPTIMIZATION_LEVEL = 0; 164 | OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; 165 | PRODUCT_NAME = "slice~"; 166 | }; 167 | name = Development; 168 | }; 169 | 2FBBEAE208F335360078DB84 /* Deployment */ = { 170 | isa = XCBuildConfiguration; 171 | baseConfigurationReference = 22CF10220EE984600054F513 /* maxmspsdk.xcconfig */; 172 | buildSettings = { 173 | COPY_PHASE_STRIP = YES; 174 | FRAMEWORK_SEARCH_PATHS = ( 175 | "$(inherited)", 176 | "\"$(SRCROOT)/../../../c74support/msp-includes\"", 177 | ); 178 | OTHER_LDFLAGS = "$(C74_SYM_LINKER_FLAGS)"; 179 | PRODUCT_NAME = "slice~"; 180 | }; 181 | name = Deployment; 182 | }; 183 | /* End XCBuildConfiguration section */ 184 | 185 | /* Begin XCConfigurationList section */ 186 | 2FBBEACF08F335010078DB84 /* Build configuration list for PBXProject "slice~" */ = { 187 | isa = XCConfigurationList; 188 | buildConfigurations = ( 189 | 2FBBEAD008F335010078DB84 /* Development */, 190 | 2FBBEAD108F335010078DB84 /* Deployment */, 191 | ); 192 | defaultConfigurationIsVisible = 0; 193 | defaultConfigurationName = Development; 194 | }; 195 | 2FBBEAE008F335360078DB84 /* Build configuration list for PBXNativeTarget "max-external" */ = { 196 | isa = XCConfigurationList; 197 | buildConfigurations = ( 198 | 2FBBEAE108F335360078DB84 /* Development */, 199 | 2FBBEAE208F335360078DB84 /* Deployment */, 200 | ); 201 | defaultConfigurationIsVisible = 0; 202 | defaultConfigurationName = Development; 203 | }; 204 | /* End XCConfigurationList section */ 205 | }; 206 | rootObject = 089C1669FE841209C02AAC07 /* Project object */; 207 | } 208 | -------------------------------------------------------------------------------- /freesoundsearch/maximum.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 12 | 13 | 14 | 22 | 44 | 46 | 61 | 71 | 73 | 75 | 77 | 81 | 83 | 85 | 87 | 89 | 91 | 92 | 101 | 125 | 127 | 144 | 154 | 156 | 158 | 160 | 164 | 166 | 168 | 170 | 172 | 174 | 175 | 176 | 177 | 178 | 179 | 182 | 184 | 185 | 187 | 189 | 193 | 194 | 195 | 197 | 198 | 199 | 202 | 204 | 205 | 206 | 209 | 210 | 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex/pcre-4.3/chartables.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* This file is automatically written by the dftables auxiliary 6 | program. If you edit it by hand, you might like to edit the Makefile to 7 | prevent its ever being regenerated. 8 | 9 | This file is #included in the compilation of pcre.c to build the default 10 | character tables which are used when no tables are passed to the compile 11 | function. */ 12 | 13 | static unsigned char pcre_default_tables[] = { 14 | 15 | /* This table is a lower casing table. */ 16 | 17 | 0, 1, 2, 3, 4, 5, 6, 7, 18 | 8, 9, 10, 11, 12, 13, 14, 15, 19 | 16, 17, 18, 19, 20, 21, 22, 23, 20 | 24, 25, 26, 27, 28, 29, 30, 31, 21 | 32, 33, 34, 35, 36, 37, 38, 39, 22 | 40, 41, 42, 43, 44, 45, 46, 47, 23 | 48, 49, 50, 51, 52, 53, 54, 55, 24 | 56, 57, 58, 59, 60, 61, 62, 63, 25 | 64, 97, 98, 99,100,101,102,103, 26 | 104,105,106,107,108,109,110,111, 27 | 112,113,114,115,116,117,118,119, 28 | 120,121,122, 91, 92, 93, 94, 95, 29 | 96, 97, 98, 99,100,101,102,103, 30 | 104,105,106,107,108,109,110,111, 31 | 112,113,114,115,116,117,118,119, 32 | 120,121,122,123,124,125,126,127, 33 | 128,129,130,131,132,133,134,135, 34 | 136,137,138,139,140,141,142,143, 35 | 144,145,146,147,148,149,150,151, 36 | 152,153,154,155,156,157,158,159, 37 | 160,161,162,163,164,165,166,167, 38 | 168,169,170,171,172,173,174,175, 39 | 176,177,178,179,180,181,182,183, 40 | 184,185,186,187,188,189,190,191, 41 | 192,193,194,195,196,197,198,199, 42 | 200,201,202,203,204,205,206,207, 43 | 208,209,210,211,212,213,214,215, 44 | 216,217,218,219,220,221,222,223, 45 | 224,225,226,227,228,229,230,231, 46 | 232,233,234,235,236,237,238,239, 47 | 240,241,242,243,244,245,246,247, 48 | 248,249,250,251,252,253,254,255, 49 | 50 | /* This table is a case flipping table. */ 51 | 52 | 0, 1, 2, 3, 4, 5, 6, 7, 53 | 8, 9, 10, 11, 12, 13, 14, 15, 54 | 16, 17, 18, 19, 20, 21, 22, 23, 55 | 24, 25, 26, 27, 28, 29, 30, 31, 56 | 32, 33, 34, 35, 36, 37, 38, 39, 57 | 40, 41, 42, 43, 44, 45, 46, 47, 58 | 48, 49, 50, 51, 52, 53, 54, 55, 59 | 56, 57, 58, 59, 60, 61, 62, 63, 60 | 64, 97, 98, 99,100,101,102,103, 61 | 104,105,106,107,108,109,110,111, 62 | 112,113,114,115,116,117,118,119, 63 | 120,121,122, 91, 92, 93, 94, 95, 64 | 96, 65, 66, 67, 68, 69, 70, 71, 65 | 72, 73, 74, 75, 76, 77, 78, 79, 66 | 80, 81, 82, 83, 84, 85, 86, 87, 67 | 88, 89, 90,123,124,125,126,127, 68 | 128,129,130,131,132,133,134,135, 69 | 136,137,138,139,140,141,142,143, 70 | 144,145,146,147,148,149,150,151, 71 | 152,153,154,155,156,157,158,159, 72 | 160,161,162,163,164,165,166,167, 73 | 168,169,170,171,172,173,174,175, 74 | 176,177,178,179,180,181,182,183, 75 | 184,185,186,187,188,189,190,191, 76 | 192,193,194,195,196,197,198,199, 77 | 200,201,202,203,204,205,206,207, 78 | 208,209,210,211,212,213,214,215, 79 | 216,217,218,219,220,221,222,223, 80 | 224,225,226,227,228,229,230,231, 81 | 232,233,234,235,236,237,238,239, 82 | 240,241,242,243,244,245,246,247, 83 | 248,249,250,251,252,253,254,255, 84 | 85 | /* This table contains bit maps for various character classes. 86 | Each map is 32 bytes long and the bits run from the least 87 | significant end of each byte. The classes that have their own 88 | maps are: space, xdigit, digit, upper, lower, word, graph 89 | print, punct, and cntrl. Other classes are built from combinations. */ 90 | 91 | 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00, 92 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 93 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 94 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 95 | 96 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 97 | 0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00, 98 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 99 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 100 | 101 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 102 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 103 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 104 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 105 | 106 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 107 | 0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00, 108 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 109 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 110 | 111 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 112 | 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07, 113 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 114 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 115 | 116 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 117 | 0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07, 118 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 119 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 120 | 121 | 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, 122 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, 123 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 124 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 125 | 126 | 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, 127 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, 128 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 129 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 130 | 131 | 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc, 132 | 0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78, 133 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 134 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 135 | 136 | 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, 137 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 138 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 139 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 140 | 141 | /* This table identifies various classes of character by individual bits: 142 | 0x01 white space character 143 | 0x02 letter 144 | 0x04 decimal digit 145 | 0x08 hexadecimal digit 146 | 0x10 alphanumeric or '_' 147 | 0x80 regular expression metacharacter or binary zero 148 | */ 149 | 150 | 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ 151 | 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ 152 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ 153 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ 154 | 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ 155 | 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */ 156 | 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */ 157 | 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */ 158 | 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */ 159 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */ 160 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */ 161 | 0x12,0x12,0x12,0x80,0x00,0x00,0x80,0x10, /* X - _ */ 162 | 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */ 163 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */ 164 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */ 165 | 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */ 166 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */ 167 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */ 168 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */ 169 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */ 170 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */ 171 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */ 172 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */ 173 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ 174 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */ 175 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */ 176 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */ 177 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */ 178 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */ 179 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */ 180 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */ 181 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */ 182 | 183 | /* End of chartables.c */ 184 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/chartables.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* This file is automatically written by the dftables auxiliary 6 | program. If you edit it by hand, you might like to edit the Makefile to 7 | prevent its ever being regenerated. 8 | 9 | This file is #included in the compilation of pcre.c to build the default 10 | character tables which are used when no tables are passed to the compile 11 | function. */ 12 | 13 | static unsigned char pcre_default_tables[] = { 14 | 15 | /* This table is a lower casing table. */ 16 | 17 | 0, 1, 2, 3, 4, 5, 6, 7, 18 | 8, 9, 10, 11, 12, 13, 14, 15, 19 | 16, 17, 18, 19, 20, 21, 22, 23, 20 | 24, 25, 26, 27, 28, 29, 30, 31, 21 | 32, 33, 34, 35, 36, 37, 38, 39, 22 | 40, 41, 42, 43, 44, 45, 46, 47, 23 | 48, 49, 50, 51, 52, 53, 54, 55, 24 | 56, 57, 58, 59, 60, 61, 62, 63, 25 | 64, 97, 98, 99,100,101,102,103, 26 | 104,105,106,107,108,109,110,111, 27 | 112,113,114,115,116,117,118,119, 28 | 120,121,122, 91, 92, 93, 94, 95, 29 | 96, 97, 98, 99,100,101,102,103, 30 | 104,105,106,107,108,109,110,111, 31 | 112,113,114,115,116,117,118,119, 32 | 120,121,122,123,124,125,126,127, 33 | 128,129,130,131,132,133,134,135, 34 | 136,137,138,139,140,141,142,143, 35 | 144,145,146,147,148,149,150,151, 36 | 152,153,154,155,156,157,158,159, 37 | 160,161,162,163,164,165,166,167, 38 | 168,169,170,171,172,173,174,175, 39 | 176,177,178,179,180,181,182,183, 40 | 184,185,186,187,188,189,190,191, 41 | 192,193,194,195,196,197,198,199, 42 | 200,201,202,203,204,205,206,207, 43 | 208,209,210,211,212,213,214,215, 44 | 216,217,218,219,220,221,222,223, 45 | 224,225,226,227,228,229,230,231, 46 | 232,233,234,235,236,237,238,239, 47 | 240,241,242,243,244,245,246,247, 48 | 248,249,250,251,252,253,254,255, 49 | 50 | /* This table is a case flipping table. */ 51 | 52 | 0, 1, 2, 3, 4, 5, 6, 7, 53 | 8, 9, 10, 11, 12, 13, 14, 15, 54 | 16, 17, 18, 19, 20, 21, 22, 23, 55 | 24, 25, 26, 27, 28, 29, 30, 31, 56 | 32, 33, 34, 35, 36, 37, 38, 39, 57 | 40, 41, 42, 43, 44, 45, 46, 47, 58 | 48, 49, 50, 51, 52, 53, 54, 55, 59 | 56, 57, 58, 59, 60, 61, 62, 63, 60 | 64, 97, 98, 99,100,101,102,103, 61 | 104,105,106,107,108,109,110,111, 62 | 112,113,114,115,116,117,118,119, 63 | 120,121,122, 91, 92, 93, 94, 95, 64 | 96, 65, 66, 67, 68, 69, 70, 71, 65 | 72, 73, 74, 75, 76, 77, 78, 79, 66 | 80, 81, 82, 83, 84, 85, 86, 87, 67 | 88, 89, 90,123,124,125,126,127, 68 | 128,129,130,131,132,133,134,135, 69 | 136,137,138,139,140,141,142,143, 70 | 144,145,146,147,148,149,150,151, 71 | 152,153,154,155,156,157,158,159, 72 | 160,161,162,163,164,165,166,167, 73 | 168,169,170,171,172,173,174,175, 74 | 176,177,178,179,180,181,182,183, 75 | 184,185,186,187,188,189,190,191, 76 | 192,193,194,195,196,197,198,199, 77 | 200,201,202,203,204,205,206,207, 78 | 208,209,210,211,212,213,214,215, 79 | 216,217,218,219,220,221,222,223, 80 | 224,225,226,227,228,229,230,231, 81 | 232,233,234,235,236,237,238,239, 82 | 240,241,242,243,244,245,246,247, 83 | 248,249,250,251,252,253,254,255, 84 | 85 | /* This table contains bit maps for various character classes. 86 | Each map is 32 bytes long and the bits run from the least 87 | significant end of each byte. The classes that have their own 88 | maps are: space, xdigit, digit, upper, lower, word, graph 89 | print, punct, and cntrl. Other classes are built from combinations. */ 90 | 91 | 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00, 92 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 93 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 94 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 95 | 96 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 97 | 0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00, 98 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 99 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 100 | 101 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 102 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 103 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 104 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 105 | 106 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 107 | 0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00, 108 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 109 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 110 | 111 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 112 | 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07, 113 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 114 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 115 | 116 | 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, 117 | 0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07, 118 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 119 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 120 | 121 | 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, 122 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, 123 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 124 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 125 | 126 | 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, 127 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, 128 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 129 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 130 | 131 | 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc, 132 | 0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78, 133 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 134 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 135 | 136 | 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, 137 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 138 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 139 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 140 | 141 | /* This table identifies various classes of character by individual bits: 142 | 0x01 white space character 143 | 0x02 letter 144 | 0x04 decimal digit 145 | 0x08 hexadecimal digit 146 | 0x10 alphanumeric or '_' 147 | 0x80 regular expression metacharacter or binary zero 148 | */ 149 | 150 | 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ 151 | 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ 152 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ 153 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ 154 | 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ 155 | 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */ 156 | 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */ 157 | 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */ 158 | 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */ 159 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */ 160 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */ 161 | 0x12,0x12,0x12,0x80,0x00,0x00,0x80,0x10, /* X - _ */ 162 | 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */ 163 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */ 164 | 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */ 165 | 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */ 166 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */ 167 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */ 168 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */ 169 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */ 170 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */ 171 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */ 172 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */ 173 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ 174 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */ 175 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */ 176 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */ 177 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */ 178 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */ 179 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */ 180 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */ 181 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */ 182 | 183 | /* End of chartables.c */ 184 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/Documentation/AGRegex/Classes/AGRegex/Methods/Methods.html: -------------------------------------------------------------------------------- 1 | 3 | 9 | Methods 10 | 11 |

Methods


12 |
13 |

findAllInString:

14 |

- (NSArray *)findAllInString:(NSString *)str; 
15 |
16 |

Calls findAllInString:range: using the full range of the target string.

17 |
18 |

findAllInString:range:

19 |

- (NSArray *)findAllInString:(NSString *)str range:(NSRange)r; 
20 |
21 |

Returns an array of all non-overlapping occurrences of the regex in the given range of the target string. The members of the array are AGRegexMatches.

22 |
23 |

findEnumeratorInString:

24 |

- (NSEnumerator *)findEnumeratorInString:(NSString *)str; 
25 |
26 |

Calls findEnumeratorInString:range: using the full range of the target string.

27 |
28 |

findEnumeratorInString:range:

29 |

- (NSEnumerator *)findEnumeratorInString:(NSString *)str range:(NSRange)r; 
30 |
31 |

Returns an enumerator for all non-overlapping occurrences of the regex in the given range of the target string. The objects returned by the enumerator are AGRegexMatches.

32 |
33 |

findInString:

34 |

- (AGRegexMatch *)findInString:(NSString *)str; 
35 |
36 |

Calls findInString:range: using the full range of the target string.

37 |
38 |

findInString:range:

39 |

- (AGRegexMatch *)findInString:(NSString *)str range:(NSRange)r; 
40 |
41 |

Returns an AGRegexMatch for the first occurrence of the regex in the given range of the target string or nil if none is found.

42 |
43 |

initWithPattern:

44 |

- (id)initWithPattern:(NSString *)pat; 
45 |
46 |

Initializes the regex using the given pattern string. Returns nil if the pattern string is invalid.

47 |
48 |

initWithPattern:options:

49 |

- (id)initWithPattern:(NSString *)pat options:(int)opts; 
50 |
51 |

Initializes the regex using the given pattern string and option flags. Returns nil if the pattern string is invalid.

52 |
53 |

regexWithPattern:

54 |

+ (id)regexWithPattern:(NSString *)pat; 
55 |
56 |

Creates a new regex using the given pattern string. Returns nil if the pattern string is invalid.

57 |
58 |

regexWithPattern:options:

59 |

+ (id)regexWithPattern:(NSString *)pat options:(int)opts; 
60 |
61 |

Creates a new regex using the given pattern string and option flags. Returns nil if the pattern string is invalid.

62 |
63 |

replaceWithString:inString:

64 |

- (NSString *)replaceWithString:(NSString *)rep inString:(NSString *)str; 
65 |
66 |

Calls replaceWithString:inString:limit: with no limit.

67 | 68 |
69 |

replaceWithString:inString:limit:

70 |

- (NSString *)replaceWithString:(NSString *)rep inString:(NSString *)str limit:(int)lim; 
71 |
72 |

Returns the string created by replacing occurrences of the regex in the target string with the replacement string. If the limit is positive, no more than that many replacements will be made. 73 |

74 | Captured subpatterns can be interpolated into the replacement string using the syntax $x or ${x} where x is the index or name of the subpattern. $0 and $& both refer to the entire pattern. Additionally, the case modifier sequences \U...\E, \L...\E, \u, and \l are allowed in the replacement string. All other escape sequences are handled literally.

75 | 76 |
77 |

splitString:

78 |

- (NSArray *)splitString:(NSString *)str; 
79 |
80 |

Call splitString:limit: with no limit.

81 | 82 |
83 |

splitString:limit:

84 |

- (NSArray *)splitString:(NSString *)str limit:(int)lim; 
85 |
86 |

Returns an array of strings created by splitting the target string at each occurrence of the pattern. If the limit is positive, no more than that many splits will be made. If there are captured subpatterns, they are returned in the array.

87 | 88 |

(Last Updated 9/12/2003) 89 |

90 | -------------------------------------------------------------------------------- /freesoundsearch/freesoundsearch.m: -------------------------------------------------------------------------------- 1 | /* mootcher_x.c -- output the mootcher_x of a group of numbers ------- */ 2 | 3 | #import "freesoundsearch.h" 4 | #import "NTFreesoundSearch.h" 5 | 6 | void main() 7 | { 8 | setup((t_messlist **)&freesoundsearch_class, (method)freesoundsearch_new, (method)freesoundsearch_free, 9 | (short)sizeof(t_freesoundsearch), 0L, A_GIMME, 0); 10 | addbang((method)freesoundsearch_bang); 11 | addmess((method)freesoundsearch_assist,"assist",A_CANT,0); 12 | 13 | addmess((method)freesoundsearch_search, "search", A_SYM, 0); 14 | addmess((method)freesoundsearch_login, "login", A_SYM, A_SYM, 0); 15 | addmess((method)freesoundsearch_logout, "logout", 0); 16 | 17 | /* Search Settings */ 18 | addmess((method)freesoundsearch_min_duration, "min_duration", A_FLOAT, 0); 19 | addmess((method)freesoundsearch_max_duration, "max_duration", A_FLOAT, 0); 20 | addmess((method)freesoundsearch_min_bitrate, "min_bitrate", A_LONG,0); 21 | addmess((method)freesoundsearch_min_bitrate, "min_bitdepth", A_LONG,0); 22 | addmess((method)freesoundsearch_min_samplerate, "min_samplerate", A_LONG,0); 23 | addmess((method)freesoundsearch_search_descriptions, "search_descriptions", A_LONG, 0); 24 | addmess((method)freesoundsearch_search_tags, "search_tags", A_LONG, 0); 25 | addmess((method)freesoundsearch_search_filenames, "search_filenames", A_LONG, 0); 26 | addmess((method)freesoundsearch_search_usernames, "search_usernames", A_LONG, 0); 27 | 28 | /* Other Settings */ 29 | addmess((method)freesoundsearch_verbose, "verbose", A_LONG, 0); 30 | // addmess((method)freesoundsearch_vol, "vol", A_FLOAT, 0); 31 | // addmess((method)freesoundsearch_rate, "rate", A_FLOAT, 0); 32 | addmess((method)freesoundsearch_download_dir, "download_dir", A_SYM, 0); 33 | 34 | /* Preview/Download */ 35 | addmess((method)freesoundsearch_preview, "preview", A_LONG, 0); 36 | addmess((method)freesoundsearch_stop_preview, "stop_preview", 0); 37 | addmess((method)freesoundsearch_download, "download", A_LONG, 0); 38 | } 39 | 40 | void freesoundsearch_bang(t_freesoundsearch *x) 41 | { 42 | 43 | } 44 | 45 | 46 | #pragma mark 47 | #pragma mark SEARCH 48 | 49 | void freesoundsearch_search(t_freesoundsearch *x, t_symbol *s) 50 | { 51 | // Make a Query string 52 | char query[255]; 53 | strcpy(query, s->s_name); 54 | 55 | // Start searching... 56 | [x->t_searchObj startSearchText: query minDuration: x->t_minDuration maxDuration: x->t_maxDuration 57 | minBitrate: x->t_minBitrate minBitdepth: x->t_minBitdepth minSamplerate: x->t_minSampleRate 58 | searchDescriptions: x->t_searchDescriptions searchTags: x->t_searchTags 59 | searchFilenames: x->t_searchFilenames searchUsernames: x->t_searchUsernames]; 60 | } 61 | 62 | #pragma mark 63 | #pragma mark LOGIN/LOGOUT 64 | 65 | void freesoundsearch_login(t_freesoundsearch *x, t_symbol *login, t_symbol *passwd) 66 | { 67 | // maek User ID and Password strings 68 | char username[255]; 69 | char password[255]; 70 | strcpy(username, login->s_name); 71 | strcpy(password, passwd->s_name); 72 | 73 | [x->t_searchObj startLogin: username : password]; 74 | } 75 | 76 | void freesoundsearch_logout(t_freesoundsearch *x) 77 | { 78 | [x->t_searchObj startLogout]; 79 | } 80 | 81 | void freesoundsearch_assist(t_freesoundsearch *x, void *b, long m, long a, char *s) 82 | { 83 | if (m==ASSIST_INLET) { 84 | sprintf(s,"Query Word / Search Settings "); 85 | } 86 | else { 87 | switch (a) { 88 | case 0: sprintf(s,"Search / DL Result etc."); break; 89 | case 1: sprintf(s,"Number of Samples Found in the Previous Search."); break; 90 | case 2: sprintf(s,"Login Status"); break; 91 | case 3: sprintf(s,"bang When Done"); break; 92 | } 93 | } 94 | } 95 | 96 | void freesoundsearch_free(t_freesoundsearch *x){ 97 | [x->t_searchObj release]; 98 | [x->t_pool release]; 99 | } 100 | 101 | 102 | void *freesoundsearch_new(t_symbol *s, short ac, t_atom *av) 103 | { 104 | t_freesoundsearch *x; 105 | 106 | // Memory Allocation 107 | x = (t_freesoundsearch *)newobject(freesoundsearch_class); 108 | x->bang_out = bangout(x); 109 | x->login_out = intout(x);; 110 | x->resultnum_out = intout(x); 111 | x->anything_out = outlet_new(x, 0L); // 0 to indicate the outlet will be used to send various messages 112 | 113 | // Initialization 114 | x->t_pool = [[NSAutoreleasePool alloc] init]; 115 | x->t_searchObj = [[NTFreesoundSearch alloc] init]; // main object for handling everything but Max messages 116 | if (!x->t_searchObj) { 117 | error("cannot initialize NTFreesoundSearch object"); 118 | return NULL; 119 | } 120 | [x->t_searchObj setDelegate: x]; 121 | 122 | // Initialize variables 123 | x->t_minDuration = 0.0; 124 | x->t_maxDuration = 6000.0; 125 | x->t_minBitrate = 0; 126 | x->t_minBitdepth = 0; 127 | x->t_minSampleRate = 0; 128 | x->t_searchDescriptions = 1; 129 | x->t_searchTags = 1; 130 | x->t_searchFilenames = 0; 131 | x->t_searchUsernames = 0; 132 | x->t_verbose = 1; 133 | [x->t_searchObj setVerbose: x->t_verbose]; 134 | 135 | return x; 136 | } 137 | 138 | #pragma mark 139 | #pragma mark SEARCH SETTINGS 140 | 141 | void freesoundsearch_min_duration(t_freesoundsearch *x, double f){ 142 | x->t_minDuration = f; 143 | } 144 | 145 | void freesoundsearch_max_duration(t_freesoundsearch *x, double f){ 146 | x->t_maxDuration = f; 147 | } 148 | 149 | void freesoundsearch_min_bitrate(t_freesoundsearch *x, long n){ 150 | x->t_minBitrate = n; 151 | } 152 | 153 | void freesoundsearch_min_bitdepth(t_freesoundsearch *x, long n){ 154 | x->t_minBitdepth = n; 155 | } 156 | 157 | void freesoundsearch_min_samplerate(t_freesoundsearch *x, long n){ 158 | x->t_minSampleRate = n; 159 | } 160 | 161 | void freesoundsearch_search_descriptions(t_freesoundsearch *x, long n){ 162 | x->t_searchDescriptions = (n!=0); 163 | } 164 | 165 | void freesoundsearch_search_tags(t_freesoundsearch *x, long n){ 166 | x->t_searchTags = (n!=0); 167 | } 168 | 169 | void freesoundsearch_search_filenames(t_freesoundsearch *x, long n){ 170 | x->t_searchFilenames = (n!=0); 171 | } 172 | 173 | void freesoundsearch_search_usernames(t_freesoundsearch *x, long n){ 174 | x->t_searchUsernames = (n!=0); 175 | } 176 | 177 | 178 | 179 | 180 | #pragma mark 181 | #pragma mark OTHER PREVIEW/DOWNLOAD 182 | 183 | void freesoundsearch_preview(t_freesoundsearch *x, long n){ 184 | switch ([x->t_searchObj startPreviewSampleWithID: n]){ 185 | case 0: 186 | error("no sample with ID %d found in the current search result.", n); 187 | return; 188 | case -1: 189 | error("no preview URL found."); 190 | return; 191 | } 192 | } 193 | 194 | void freesoundsearch_stop_preview(t_freesoundsearch *x){ 195 | [x->t_searchObj stopPreview]; 196 | freesoundsearch_output_message(x, "preview_done"); 197 | } 198 | 199 | 200 | void freesoundsearch_download(t_freesoundsearch *x, long n){ 201 | switch ([x->t_searchObj startDownloadSampleWithID: n]){ 202 | case 0: 203 | error("no sample with ID %d found in the current search result.", n); 204 | return; 205 | case -2: 206 | error("too many download in process."); 207 | return; 208 | } 209 | } 210 | 211 | #pragma mark 212 | #pragma mark OTHER SETTINGS/FUNCTIONS 213 | 214 | void freesoundsearch_verbose(t_freesoundsearch *x, long n){ 215 | x->t_verbose = (n!=0); 216 | [x->t_searchObj setVerbose: (BOOL)x->t_verbose]; 217 | } 218 | 219 | void freesoundsearch_vol(t_freesoundsearch *x, float f){ 220 | [x->t_searchObj setPreviewVolume: f]; 221 | } 222 | 223 | void freesoundsearch_rate(t_freesoundsearch *x, float f){ 224 | [x->t_searchObj setPreviewRate: f]; 225 | } 226 | 227 | void freesoundsearch_download_dir(t_freesoundsearch *x, t_symbol *t){ 228 | switch ([x->t_searchObj setDownloadPath: t->s_name]){ 229 | case 1: 230 | if (x->t_verbose) post("download directory was set to :%s", t->s_name); 231 | break; 232 | case 0: 233 | error("cannot set download directory: invalid path"); 234 | break; 235 | case -1: 236 | error("cannot set download directory: not directory"); 237 | break; 238 | } 239 | } 240 | 241 | void freesoundsearch_setlogin(t_freesoundsearch *x, int n){ // internal function 242 | x->t_loginstatus = n; 243 | outlet_bang(x->bang_out); 244 | outlet_int(x->login_out, x->t_loginstatus); 245 | } 246 | 247 | #pragma mark 248 | #pragma mark OUTPUT 249 | 250 | void freesoundsearch_output_result(t_freesoundsearch *x, NSDictionary *dict){ 251 | t_atom atoms[6]; 252 | const int max_length = 120; 253 | 254 | // Sample ID & Filename & Username 255 | atom_setlong(atoms, [[dict valueForKey:@"sample id"] intValue]); // SETLOG -> atom_setlong 256 | atom_setsym(atoms+1, gensym((char *)[[dict valueForKey:@"original filename"] cStringUsingEncoding:NSISOLatin1StringEncoding])); // SETSYS -> atom_setlong 257 | atom_setsym(atoms+2, gensym((char *)[[dict valueForKey:@"user name"] cStringUsingEncoding:NSISOLatin1StringEncoding])); // SETSYM -> atom_setsym 258 | 259 | // Description & Tags - trancated to the first 120 characters 260 | NSString *desc = [dict valueForKey:@"description"]; 261 | if ([desc length]>max_length){ 262 | NSRange range = NSMakeRange(0, max_length); 263 | desc = [desc substringWithRange: range]; 264 | desc = [desc stringByAppendingString: @"..."]; 265 | } 266 | NSString *tags = [dict valueForKey:@"tags"]; 267 | if ([tags length]>max_length){ 268 | NSRange range = NSMakeRange(0, max_length); 269 | tags = [tags substringWithRange: range]; 270 | desc = [desc stringByAppendingString: @"..."]; 271 | } 272 | atom_setsym(atoms+3, gensym((char *)[desc cStringUsingEncoding:NSISOLatin1StringEncoding])); 273 | atom_setsym(atoms+4, gensym((char *)[tags cStringUsingEncoding:NSISOLatin1StringEncoding])); 274 | 275 | // preview URL 276 | atom_setsym(atoms+5, gensym((char *)[[dict valueForKey:@"preview URL"] cStringUsingEncoding:NSISOLatin1StringEncoding])); 277 | 278 | // You cannot use outlet_list(), because the first item in the list must be an integer or float. 279 | outlet_anything(x->anything_out, gensym("samples"), 6, atoms); 280 | } 281 | 282 | void freesoundsearch_output_download(t_freesoundsearch *x, const char *filepath, int done){ 283 | t_atom atoms[2]; 284 | 285 | atom_setlong(atoms, done); 286 | atom_setsym(atoms+1, gensym((char *)filepath)); 287 | 288 | outlet_anything(x->anything_out, gensym("download"), 2, atoms); 289 | } 290 | 291 | void freesoundsearch_output_message(t_freesoundsearch *x, const char *msg){ 292 | outlet_anything(x->anything_out, gensym(msg), 0, NULL); 293 | } 294 | 295 | // bang When done 296 | void freesoundsearch_output_bang(t_freesoundsearch *x) 297 | { 298 | outlet_bang(x->bang_out); 299 | } 300 | 301 | // number of samples found 302 | void freesoundsearch_output_samplenum(t_freesoundsearch *x, long n) 303 | { 304 | outlet_int(x->resultnum_out, n); 305 | } 306 | 307 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex/pcre-4.3/get.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* 6 | This is a library of functions to support regular expressions whose syntax 7 | and semantics are as close as possible to those of the Perl 5 language. See 8 | the file Tech.Notes for some information on the internals. 9 | 10 | Written by: Philip Hazel 11 | 12 | Copyright (c) 1997-2003 University of Cambridge 13 | 14 | ----------------------------------------------------------------------------- 15 | Permission is granted to anyone to use this software for any purpose on any 16 | computer system, and to redistribute it freely, subject to the following 17 | restrictions: 18 | 19 | 1. This software is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | 23 | 2. The origin of this software must not be misrepresented, either by 24 | explicit claim or by omission. 25 | 26 | 3. Altered versions must be plainly marked as such, and must not be 27 | misrepresented as being the original software. 28 | 29 | 4. If PCRE is embedded in any software that is released under the GNU 30 | General Purpose Licence (GPL), then the terms of that licence shall 31 | supersede any condition above with which it is incompatible. 32 | ----------------------------------------------------------------------------- 33 | */ 34 | 35 | /* This module contains some convenience functions for extracting substrings 36 | from the subject string after a regex match has succeeded. The original idea 37 | for these functions came from Scott Wimer . */ 38 | 39 | 40 | /* Include the internals header, which itself includes Standard C headers plus 41 | the external pcre header. */ 42 | 43 | #include "internal.h" 44 | 45 | 46 | /************************************************* 47 | * Find number for named string * 48 | *************************************************/ 49 | 50 | /* This function is used by the two extraction functions below, as well 51 | as being generally available. 52 | 53 | Arguments: 54 | code the compiled regex 55 | stringname the name whose number is required 56 | 57 | Returns: the number of the named parentheses, or a negative number 58 | (PCRE_ERROR_NOSUBSTRING) if not found 59 | */ 60 | 61 | int 62 | pcre_get_stringnumber(const pcre *code, const char *stringname) 63 | { 64 | int rc; 65 | int entrysize; 66 | int top, bot; 67 | uschar *nametable; 68 | 69 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0) 70 | return rc; 71 | if (top <= 0) return PCRE_ERROR_NOSUBSTRING; 72 | 73 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0) 74 | return rc; 75 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0) 76 | return rc; 77 | 78 | bot = 0; 79 | while (top > bot) 80 | { 81 | int mid = (top + bot) / 2; 82 | uschar *entry = nametable + entrysize*mid; 83 | int c = strcmp(stringname, (char *)(entry + 2)); 84 | if (c == 0) return (entry[0] << 8) + entry[1]; 85 | if (c > 0) bot = mid + 1; else top = mid; 86 | } 87 | 88 | return PCRE_ERROR_NOSUBSTRING; 89 | } 90 | 91 | 92 | 93 | /************************************************* 94 | * Copy captured string to given buffer * 95 | *************************************************/ 96 | 97 | /* This function copies a single captured substring into a given buffer. 98 | Note that we use memcpy() rather than strncpy() in case there are binary zeros 99 | in the string. 100 | 101 | Arguments: 102 | subject the subject string that was matched 103 | ovector pointer to the offsets table 104 | stringcount the number of substrings that were captured 105 | (i.e. the yield of the pcre_exec call, unless 106 | that was zero, in which case it should be 1/3 107 | of the offset table size) 108 | stringnumber the number of the required substring 109 | buffer where to put the substring 110 | size the size of the buffer 111 | 112 | Returns: if successful: 113 | the length of the copied string, not including the zero 114 | that is put on the end; can be zero 115 | if not successful: 116 | PCRE_ERROR_NOMEMORY (-6) buffer too small 117 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 118 | */ 119 | 120 | int 121 | pcre_copy_substring(const char *subject, int *ovector, int stringcount, 122 | int stringnumber, char *buffer, int size) 123 | { 124 | int yield; 125 | if (stringnumber < 0 || stringnumber >= stringcount) 126 | return PCRE_ERROR_NOSUBSTRING; 127 | stringnumber *= 2; 128 | yield = ovector[stringnumber+1] - ovector[stringnumber]; 129 | if (size < yield + 1) return PCRE_ERROR_NOMEMORY; 130 | memcpy(buffer, subject + ovector[stringnumber], yield); 131 | buffer[yield] = 0; 132 | return yield; 133 | } 134 | 135 | 136 | 137 | /************************************************* 138 | * Copy named captured string to given buffer * 139 | *************************************************/ 140 | 141 | /* This function copies a single captured substring into a given buffer, 142 | identifying it by name. 143 | 144 | Arguments: 145 | code the compiled regex 146 | subject the subject string that was matched 147 | ovector pointer to the offsets table 148 | stringcount the number of substrings that were captured 149 | (i.e. the yield of the pcre_exec call, unless 150 | that was zero, in which case it should be 1/3 151 | of the offset table size) 152 | stringname the name of the required substring 153 | buffer where to put the substring 154 | size the size of the buffer 155 | 156 | Returns: if successful: 157 | the length of the copied string, not including the zero 158 | that is put on the end; can be zero 159 | if not successful: 160 | PCRE_ERROR_NOMEMORY (-6) buffer too small 161 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 162 | */ 163 | 164 | int 165 | pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, 166 | int stringcount, const char *stringname, char *buffer, int size) 167 | { 168 | int n = pcre_get_stringnumber(code, stringname); 169 | if (n <= 0) return n; 170 | return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size); 171 | } 172 | 173 | 174 | 175 | /************************************************* 176 | * Copy all captured strings to new store * 177 | *************************************************/ 178 | 179 | /* This function gets one chunk of store and builds a list of pointers and all 180 | of the captured substrings in it. A NULL pointer is put on the end of the list. 181 | 182 | Arguments: 183 | subject the subject string that was matched 184 | ovector pointer to the offsets table 185 | stringcount the number of substrings that were captured 186 | (i.e. the yield of the pcre_exec call, unless 187 | that was zero, in which case it should be 1/3 188 | of the offset table size) 189 | listptr set to point to the list of pointers 190 | 191 | Returns: if successful: 0 192 | if not successful: 193 | PCRE_ERROR_NOMEMORY (-6) failed to get store 194 | */ 195 | 196 | int 197 | pcre_get_substring_list(const char *subject, int *ovector, int stringcount, 198 | const char ***listptr) 199 | { 200 | int i; 201 | int size = sizeof(char *); 202 | int double_count = stringcount * 2; 203 | char **stringlist; 204 | char *p; 205 | 206 | for (i = 0; i < double_count; i += 2) 207 | size += sizeof(char *) + ovector[i+1] - ovector[i] + 1; 208 | 209 | stringlist = (char **)(pcre_malloc)(size); 210 | if (stringlist == NULL) return PCRE_ERROR_NOMEMORY; 211 | 212 | *listptr = (const char **)stringlist; 213 | p = (char *)(stringlist + stringcount + 1); 214 | 215 | for (i = 0; i < double_count; i += 2) 216 | { 217 | int len = ovector[i+1] - ovector[i]; 218 | memcpy(p, subject + ovector[i], len); 219 | *stringlist++ = p; 220 | p += len; 221 | *p++ = 0; 222 | } 223 | 224 | *stringlist = NULL; 225 | return 0; 226 | } 227 | 228 | 229 | 230 | /************************************************* 231 | * Free store obtained by get_substring_list * 232 | *************************************************/ 233 | 234 | /* This function exists for the benefit of people calling PCRE from non-C 235 | programs that can call its functions, but not free() or (pcre_free)() directly. 236 | 237 | Argument: the result of a previous pcre_get_substring_list() 238 | Returns: nothing 239 | */ 240 | 241 | void 242 | pcre_free_substring_list(const char **pointer) 243 | { 244 | (pcre_free)((void *)pointer); 245 | } 246 | 247 | 248 | 249 | /************************************************* 250 | * Copy captured string to new store * 251 | *************************************************/ 252 | 253 | /* This function copies a single captured substring into a piece of new 254 | store 255 | 256 | Arguments: 257 | subject the subject string that was matched 258 | ovector pointer to the offsets table 259 | stringcount the number of substrings that were captured 260 | (i.e. the yield of the pcre_exec call, unless 261 | that was zero, in which case it should be 1/3 262 | of the offset table size) 263 | stringnumber the number of the required substring 264 | stringptr where to put a pointer to the substring 265 | 266 | Returns: if successful: 267 | the length of the string, not including the zero that 268 | is put on the end; can be zero 269 | if not successful: 270 | PCRE_ERROR_NOMEMORY (-6) failed to get store 271 | PCRE_ERROR_NOSUBSTRING (-7) substring not present 272 | */ 273 | 274 | int 275 | pcre_get_substring(const char *subject, int *ovector, int stringcount, 276 | int stringnumber, const char **stringptr) 277 | { 278 | int yield; 279 | char *substring; 280 | if (stringnumber < 0 || stringnumber >= stringcount) 281 | return PCRE_ERROR_NOSUBSTRING; 282 | stringnumber *= 2; 283 | yield = ovector[stringnumber+1] - ovector[stringnumber]; 284 | substring = (char *)(pcre_malloc)(yield + 1); 285 | if (substring == NULL) return PCRE_ERROR_NOMEMORY; 286 | memcpy(substring, subject + ovector[stringnumber], yield); 287 | substring[yield] = 0; 288 | *stringptr = substring; 289 | return yield; 290 | } 291 | 292 | 293 | 294 | /************************************************* 295 | * Copy named captured string to new store * 296 | *************************************************/ 297 | 298 | /* This function copies a single captured substring, identified by name, into 299 | new store. 300 | 301 | Arguments: 302 | code the compiled regex 303 | subject the subject string that was matched 304 | ovector pointer to the offsets table 305 | stringcount the number of substrings that were captured 306 | (i.e. the yield of the pcre_exec call, unless 307 | that was zero, in which case it should be 1/3 308 | of the offset table size) 309 | stringname the name of the required substring 310 | stringptr where to put the pointer 311 | 312 | Returns: if successful: 313 | the length of the copied string, not including the zero 314 | that is put on the end; can be zero 315 | if not successful: 316 | PCRE_ERROR_NOMEMORY (-6) couldn't get memory 317 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 318 | */ 319 | 320 | int 321 | pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, 322 | int stringcount, const char *stringname, const char **stringptr) 323 | { 324 | int n = pcre_get_stringnumber(code, stringname); 325 | if (n <= 0) return n; 326 | return pcre_get_substring(subject, ovector, stringcount, n, stringptr); 327 | } 328 | 329 | 330 | 331 | 332 | /************************************************* 333 | * Free store obtained by get_substring * 334 | *************************************************/ 335 | 336 | /* This function exists for the benefit of people calling PCRE from non-C 337 | programs that can call its functions, but not free() or (pcre_free)() directly. 338 | 339 | Argument: the result of a previous pcre_get_substring() 340 | Returns: nothing 341 | */ 342 | 343 | void 344 | pcre_free_substring(const char *pointer) 345 | { 346 | (pcre_free)((void *)pointer); 347 | } 348 | 349 | /* End of get.c */ 350 | -------------------------------------------------------------------------------- /freesoundsearch/AGRegex_Project/pcre-4.3/get.c: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Perl-Compatible Regular Expressions * 3 | *************************************************/ 4 | 5 | /* 6 | This is a library of functions to support regular expressions whose syntax 7 | and semantics are as close as possible to those of the Perl 5 language. See 8 | the file Tech.Notes for some information on the internals. 9 | 10 | Written by: Philip Hazel 11 | 12 | Copyright (c) 1997-2003 University of Cambridge 13 | 14 | ----------------------------------------------------------------------------- 15 | Permission is granted to anyone to use this software for any purpose on any 16 | computer system, and to redistribute it freely, subject to the following 17 | restrictions: 18 | 19 | 1. This software is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | 23 | 2. The origin of this software must not be misrepresented, either by 24 | explicit claim or by omission. 25 | 26 | 3. Altered versions must be plainly marked as such, and must not be 27 | misrepresented as being the original software. 28 | 29 | 4. If PCRE is embedded in any software that is released under the GNU 30 | General Purpose Licence (GPL), then the terms of that licence shall 31 | supersede any condition above with which it is incompatible. 32 | ----------------------------------------------------------------------------- 33 | */ 34 | 35 | /* This module contains some convenience functions for extracting substrings 36 | from the subject string after a regex match has succeeded. The original idea 37 | for these functions came from Scott Wimer . */ 38 | 39 | 40 | /* Include the internals header, which itself includes Standard C headers plus 41 | the external pcre header. */ 42 | 43 | #include "internal.h" 44 | 45 | 46 | /************************************************* 47 | * Find number for named string * 48 | *************************************************/ 49 | 50 | /* This function is used by the two extraction functions below, as well 51 | as being generally available. 52 | 53 | Arguments: 54 | code the compiled regex 55 | stringname the name whose number is required 56 | 57 | Returns: the number of the named parentheses, or a negative number 58 | (PCRE_ERROR_NOSUBSTRING) if not found 59 | */ 60 | 61 | int 62 | pcre_get_stringnumber(const pcre *code, const char *stringname) 63 | { 64 | int rc; 65 | int entrysize; 66 | int top, bot; 67 | uschar *nametable; 68 | 69 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0) 70 | return rc; 71 | if (top <= 0) return PCRE_ERROR_NOSUBSTRING; 72 | 73 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0) 74 | return rc; 75 | if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0) 76 | return rc; 77 | 78 | bot = 0; 79 | while (top > bot) 80 | { 81 | int mid = (top + bot) / 2; 82 | uschar *entry = nametable + entrysize*mid; 83 | int c = strcmp(stringname, (char *)(entry + 2)); 84 | if (c == 0) return (entry[0] << 8) + entry[1]; 85 | if (c > 0) bot = mid + 1; else top = mid; 86 | } 87 | 88 | return PCRE_ERROR_NOSUBSTRING; 89 | } 90 | 91 | 92 | 93 | /************************************************* 94 | * Copy captured string to given buffer * 95 | *************************************************/ 96 | 97 | /* This function copies a single captured substring into a given buffer. 98 | Note that we use memcpy() rather than strncpy() in case there are binary zeros 99 | in the string. 100 | 101 | Arguments: 102 | subject the subject string that was matched 103 | ovector pointer to the offsets table 104 | stringcount the number of substrings that were captured 105 | (i.e. the yield of the pcre_exec call, unless 106 | that was zero, in which case it should be 1/3 107 | of the offset table size) 108 | stringnumber the number of the required substring 109 | buffer where to put the substring 110 | size the size of the buffer 111 | 112 | Returns: if successful: 113 | the length of the copied string, not including the zero 114 | that is put on the end; can be zero 115 | if not successful: 116 | PCRE_ERROR_NOMEMORY (-6) buffer too small 117 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 118 | */ 119 | 120 | int 121 | pcre_copy_substring(const char *subject, int *ovector, int stringcount, 122 | int stringnumber, char *buffer, int size) 123 | { 124 | int yield; 125 | if (stringnumber < 0 || stringnumber >= stringcount) 126 | return PCRE_ERROR_NOSUBSTRING; 127 | stringnumber *= 2; 128 | yield = ovector[stringnumber+1] - ovector[stringnumber]; 129 | if (size < yield + 1) return PCRE_ERROR_NOMEMORY; 130 | memcpy(buffer, subject + ovector[stringnumber], yield); 131 | buffer[yield] = 0; 132 | return yield; 133 | } 134 | 135 | 136 | 137 | /************************************************* 138 | * Copy named captured string to given buffer * 139 | *************************************************/ 140 | 141 | /* This function copies a single captured substring into a given buffer, 142 | identifying it by name. 143 | 144 | Arguments: 145 | code the compiled regex 146 | subject the subject string that was matched 147 | ovector pointer to the offsets table 148 | stringcount the number of substrings that were captured 149 | (i.e. the yield of the pcre_exec call, unless 150 | that was zero, in which case it should be 1/3 151 | of the offset table size) 152 | stringname the name of the required substring 153 | buffer where to put the substring 154 | size the size of the buffer 155 | 156 | Returns: if successful: 157 | the length of the copied string, not including the zero 158 | that is put on the end; can be zero 159 | if not successful: 160 | PCRE_ERROR_NOMEMORY (-6) buffer too small 161 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 162 | */ 163 | 164 | int 165 | pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, 166 | int stringcount, const char *stringname, char *buffer, int size) 167 | { 168 | int n = pcre_get_stringnumber(code, stringname); 169 | if (n <= 0) return n; 170 | return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size); 171 | } 172 | 173 | 174 | 175 | /************************************************* 176 | * Copy all captured strings to new store * 177 | *************************************************/ 178 | 179 | /* This function gets one chunk of store and builds a list of pointers and all 180 | of the captured substrings in it. A NULL pointer is put on the end of the list. 181 | 182 | Arguments: 183 | subject the subject string that was matched 184 | ovector pointer to the offsets table 185 | stringcount the number of substrings that were captured 186 | (i.e. the yield of the pcre_exec call, unless 187 | that was zero, in which case it should be 1/3 188 | of the offset table size) 189 | listptr set to point to the list of pointers 190 | 191 | Returns: if successful: 0 192 | if not successful: 193 | PCRE_ERROR_NOMEMORY (-6) failed to get store 194 | */ 195 | 196 | int 197 | pcre_get_substring_list(const char *subject, int *ovector, int stringcount, 198 | const char ***listptr) 199 | { 200 | int i; 201 | int size = sizeof(char *); 202 | int double_count = stringcount * 2; 203 | char **stringlist; 204 | char *p; 205 | 206 | for (i = 0; i < double_count; i += 2) 207 | size += sizeof(char *) + ovector[i+1] - ovector[i] + 1; 208 | 209 | stringlist = (char **)(pcre_malloc)(size); 210 | if (stringlist == NULL) return PCRE_ERROR_NOMEMORY; 211 | 212 | *listptr = (const char **)stringlist; 213 | p = (char *)(stringlist + stringcount + 1); 214 | 215 | for (i = 0; i < double_count; i += 2) 216 | { 217 | int len = ovector[i+1] - ovector[i]; 218 | memcpy(p, subject + ovector[i], len); 219 | *stringlist++ = p; 220 | p += len; 221 | *p++ = 0; 222 | } 223 | 224 | *stringlist = NULL; 225 | return 0; 226 | } 227 | 228 | 229 | 230 | /************************************************* 231 | * Free store obtained by get_substring_list * 232 | *************************************************/ 233 | 234 | /* This function exists for the benefit of people calling PCRE from non-C 235 | programs that can call its functions, but not free() or (pcre_free)() directly. 236 | 237 | Argument: the result of a previous pcre_get_substring_list() 238 | Returns: nothing 239 | */ 240 | 241 | void 242 | pcre_free_substring_list(const char **pointer) 243 | { 244 | (pcre_free)((void *)pointer); 245 | } 246 | 247 | 248 | 249 | /************************************************* 250 | * Copy captured string to new store * 251 | *************************************************/ 252 | 253 | /* This function copies a single captured substring into a piece of new 254 | store 255 | 256 | Arguments: 257 | subject the subject string that was matched 258 | ovector pointer to the offsets table 259 | stringcount the number of substrings that were captured 260 | (i.e. the yield of the pcre_exec call, unless 261 | that was zero, in which case it should be 1/3 262 | of the offset table size) 263 | stringnumber the number of the required substring 264 | stringptr where to put a pointer to the substring 265 | 266 | Returns: if successful: 267 | the length of the string, not including the zero that 268 | is put on the end; can be zero 269 | if not successful: 270 | PCRE_ERROR_NOMEMORY (-6) failed to get store 271 | PCRE_ERROR_NOSUBSTRING (-7) substring not present 272 | */ 273 | 274 | int 275 | pcre_get_substring(const char *subject, int *ovector, int stringcount, 276 | int stringnumber, const char **stringptr) 277 | { 278 | int yield; 279 | char *substring; 280 | if (stringnumber < 0 || stringnumber >= stringcount) 281 | return PCRE_ERROR_NOSUBSTRING; 282 | stringnumber *= 2; 283 | yield = ovector[stringnumber+1] - ovector[stringnumber]; 284 | substring = (char *)(pcre_malloc)(yield + 1); 285 | if (substring == NULL) return PCRE_ERROR_NOMEMORY; 286 | memcpy(substring, subject + ovector[stringnumber], yield); 287 | substring[yield] = 0; 288 | *stringptr = substring; 289 | return yield; 290 | } 291 | 292 | 293 | 294 | /************************************************* 295 | * Copy named captured string to new store * 296 | *************************************************/ 297 | 298 | /* This function copies a single captured substring, identified by name, into 299 | new store. 300 | 301 | Arguments: 302 | code the compiled regex 303 | subject the subject string that was matched 304 | ovector pointer to the offsets table 305 | stringcount the number of substrings that were captured 306 | (i.e. the yield of the pcre_exec call, unless 307 | that was zero, in which case it should be 1/3 308 | of the offset table size) 309 | stringname the name of the required substring 310 | stringptr where to put the pointer 311 | 312 | Returns: if successful: 313 | the length of the copied string, not including the zero 314 | that is put on the end; can be zero 315 | if not successful: 316 | PCRE_ERROR_NOMEMORY (-6) couldn't get memory 317 | PCRE_ERROR_NOSUBSTRING (-7) no such captured substring 318 | */ 319 | 320 | int 321 | pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, 322 | int stringcount, const char *stringname, const char **stringptr) 323 | { 324 | int n = pcre_get_stringnumber(code, stringname); 325 | if (n <= 0) return n; 326 | return pcre_get_substring(subject, ovector, stringcount, n, stringptr); 327 | } 328 | 329 | 330 | 331 | 332 | /************************************************* 333 | * Free store obtained by get_substring * 334 | *************************************************/ 335 | 336 | /* This function exists for the benefit of people calling PCRE from non-C 337 | programs that can call its functions, but not free() or (pcre_free)() directly. 338 | 339 | Argument: the result of a previous pcre_get_substring() 340 | Returns: nothing 341 | */ 342 | 343 | void 344 | pcre_free_substring(const char *pointer) 345 | { 346 | (pcre_free)((void *)pointer); 347 | } 348 | 349 | /* End of get.c */ 350 | --------------------------------------------------------------------------------