debian/0000755000000000000000000000000012377671014007176 5ustar debian/watch0000644000000000000000000000007712370154754010233 0ustar version=3 http://sf.net/tamsys/GTAMSAnalyzer.src.(.*)\.tar\.gz debian/rules0000755000000000000000000000217512367371234010263 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/GNUstep/debian/config.mk export DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined -Wl,--as-needed d_app := $(CURDIR)/debian/gtamsanalyzer.app ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) optim := debug=yes endif %: dh $@ --parallel override_dh_auto_build: $(MAKE) -C Source $(optim) messages=yes \ $(shell dpkg-buildflags --export=cmdline) convert Source/largeApp.tif -resize 32x32 GTAMSAnalyzer.xpm override_dh_clean: $(MAKE) -C Source distclean dh_clean GTAMSAnalyzer.xpm override_dh_auto_install: $(MAKE) -C Source install DESTDIR=$(d_app) override_dh_link: gsdh_gnustep dh_installdirs usr/share/GNUstep mv $(d_app)$(GNUSTEP_SYSTEM_APPS)/GTAMSAnalyzer.app/Resources \ $(d_app)/usr/share/GNUstep/GTAMSAnalyzer.app dh_link /usr/share/GNUstep/GTAMSAnalyzer.app \ $(GNUSTEP_SYSTEM_APPS)/GTAMSAnalyzer.app/Resources override_dh_fixperms: dh_fixperms rm $(d_app)/usr/share/GNUstep/*.app/*.desktop find $(d_app)/usr/share/GNUstep -name \*.tif* -exec chmod -x '{}' \; chmod -x $(d_app)/usr/share/GNUstep/*.app/*.strings debian/GTAMSAnalyzer.10000644000000000000000000000173312343214161011632 0ustar .TH GTAMSANALYZER 1 "December 8, 2004" .SH NAME GTAMSAnalyzer \- Qualitative Research Software .SH SYNOPSIS .B GTAMSAnalyzer .SH DESCRIPTION This manual page documents briefly the .B GTAMSAnalyzer command. This manual page was written for the Debian distribution because the original program does not have a manual page. .PP \fBGTAMSAnalyzer\fP is a a complete coding and analysis package. It is a "port" of TAMS Analyzer for Macintosh OS X. Note, at some point the two projects will have identical file formats, at which point the initial G (for GNUstep) will be dropped. GTAMS stands for GNUstep Text Analysis Markup System, it is a convention for identifying themes in text. The software offers a wide range of tools for applying themes to texts and identifying patterns of themes within and between texts. .SH SEE ALSO .BR GNUstep (7). .br .SH AUTHOR This manual page was written by G\[:u]rkan Seng\[:u]n , for the Debian project (but may be used by others). debian/install0000644000000000000000000000013112361422424010552 0ustar GTAMSAnalyzer.xpm usr/share/pixmaps debian/GTAMSAnalyzer.desktop usr/share/applications debian/menu0000644000000000000000000000035512343214161010055 0ustar ?package(gtamsanalyzer.app):needs="X11" \ section="Applications/Text" \ title="GTAMSAnalyzer" command="/usr/bin/GTAMSAnalyzer" \ icon="/usr/share/pixmaps/GTAMSAnalyzer.xpm" \ longtitle="Qualitative Research Software for GNUstep" debian/copyright0000644000000000000000000001357012370414571011133 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: GTAMSAnalyzer Source: http://tamsys.sourceforge.net/gtams/ Files: * Copyright: 1994-2004 Matthew Weinstein 2000 Fred Kiefer License: GPL-2+ Files: Source/AGRegex.* Source/RegexTest.m Copyright: 2002 Aram Greenman License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: Source/TextFinder.m Source/TextFinderSemi.m Copyright: 1995-2001 by Apple Computer, Inc. License: permissive-apple This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. . In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. . The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. . IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: Source/*.c Copyright: 1997-2003 University of Cambridge License: permissive-pcre Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions: . 1. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. . 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. . 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. . 4. If PCRE is embedded in any software that is released under the GNU General Purpose Licence (GPL), then the terms of that licence shall supersede any condition above with which it is incompatible. . The system pcre library is used for the Debian package. Files: debian/* Copyright: 2004-2014 Debian GNUstep maintainers License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. debian/docs0000644000000000000000000000001312370163616010040 0ustar ReadMe.pdf debian/source/0000755000000000000000000000000012343247514010473 5ustar debian/source/format0000644000000000000000000000001412343247514011701 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012344421657010625 5ustar debian/patches/gv-path.patch0000644000000000000000000000114012343247021013176 0ustar Description: Adjust the default path to the `gv' binary. Author: Yavor Doganov Forwarded: no Last-Update: 2007-11-25 --- --- gtamsanalyzer.app.orig/Source/appDelegate.m +++ gtamsanalyzer.app/Source/appDelegate.m @@ -121,7 +121,7 @@ forKey: TACoderID ]; if([NSDEF objectForKey: TAGGVDir] == nil) - [[NSUserDefaults standardUserDefaults] setObject: @"/usr/X11R6/bin/gv" + [[NSUserDefaults standardUserDefaults] setObject: @"/usr/bin/gv" forKey: TAGGVDir ]; if([NSDEF objectForKey: TAGDotDir] == nil) [[NSUserDefaults standardUserDefaults] setObject: @"/usr/bin/dot" debian/patches/use-system-pcre.patch0000644000000000000000000000072112343247015014704 0ustar Description: Link against the system PCRE library. Author: Yavor Doganov Forwarded: no Last-Update: 2007-11-25 --- --- gtamsanalyzer.app.orig/Source/GNUmakefile +++ gtamsanalyzer.app/Source/GNUmakefile @@ -187,13 +187,9 @@ # GTAMSAnalyzer_C_FILES= \ -chartables.c \ -get.c \ -maketables.c \ -newline.c \ -pcre.c \ -pcreposix.c \ -study.c +newline.c + +ADDITIONAL_OBJC_LIBS += -lpcre -include GNUmakefile.preamble -include GNUmakefile.local debian/patches/gcc-warnings.patch0000644000000000000000000026670512344415661014246 0ustar Description: Fix a lot of warnings reported by GCC. implicit declaration of function 'foo' return makes integer from pointer without a cast assignment makes integer from pointer without a cast assignment makes pointer from integer without a cast passing argument N of 'foo' makes pointer from integer without a cast passing argument N of 'foo' makes integer from pointer without a cast passing argument N of 'foo' from incompatible pointer type passing argument N of 'foo' from distinct Objective-C type assignment from distinct Objective-C type distinct Objective-C type in return local declaration of 'foo' hides instance variable 'Foo' may not respond to '-bar' no '-foo' method found multiple methods named '-foo' found conflicting types for '-foo' class 'Foo' does not implement the 'Bar' protocol method possibly missing a [super dealloc] call control reaches end of non-void function no return statement in function returning non-void braces around scalar initializer case value 'N' not in enumerated type 'foo' 'foo' may be used uninitialized in this function variable 'foo' set but not used unused variable 'foo' extra tokens at end of #ifdef directive suggest explicit braces to avoid ambiguous 'else' suggest parentheses around assignment used as truth value Author: Yavor Doganov Bug-Debian: http://bugs.debian.org/749756 Forwarded: no Last-Update: 2014-06-06 --- --- gtamsanalyzer.app.orig/Source/appDelegate.m +++ gtamsanalyzer.app/Source/appDelegate.m @@ -1,11 +1,12 @@ #import "appDelegate.h" #import "myProject.h" #import "utils.h" +#import "tamsutils.h" #import "TAMSCharEngine.h" NSString * TAWorkItems = @"The items that appear in the work menu"; #define WORKBASE 4 -int pathNameComp(id first, id second, NSString *key) +NSComparisonResult pathNameComp(id first, id second, void *ctxt) { return [[first lastPathComponent] compare: [second lastPathComponent] options: NSCaseInsensitiveSearch]; } --- gtamsanalyzer.app.orig/Source/ctLimitCrit.m +++ gtamsanalyzer.app/Source/ctLimitCrit.m @@ -125,6 +125,7 @@ { [name release]; [coders release]; + [super dealloc]; } -(void) setName: (NSMutableString *) n --- gtamsanalyzer.app.orig/Source/AGRegex.m +++ gtamsanalyzer.app/Source/AGRegex.m @@ -95,7 +95,7 @@ } - (id)initWithPattern:(NSString *)pat options:(int)opts { - if (self = [super init]) { + if ((self = [super init])) { const char *emsg; int eloc, copts = 0; if (opts & AGRegexCaseInsensitive) copts |= PCRE_CASELESS; @@ -333,7 +333,7 @@ // add captured subpatterns if any count = [match count]; for (j = 1; j < count; j++) - if (group = [match groupAtIndex:j]) + if ((group = [match groupAtIndex:j])) [result addObject:group]; // set remaining range to the part after the split remainRange.location = matchRange.location + matchRange.length; @@ -352,7 +352,7 @@ // takes ownership of the passed match vector, free on dealloc - (id)initWithRegex:(AGRegex *)re string:(NSString *)str vector:(int *)mv count:(int)c { - if (self = [super init]) { + if ((self = [super init])) { regex = [re retain]; string = [str copy]; // really only copies if the string is mutable, immutable strings are just retained matchv = mv; @@ -430,7 +430,7 @@ @implementation AGRegexMatchEnumerator - (id)initWithRegex:(AGRegex *)re string:(NSString *)s range:(NSRange)r { - if (self = [super init]) { + if ((self = [super init])) { regex = [re retain]; string = [s copy]; // create one immutable copy of the string so we don't copy it over and over when the matches are created range = r; @@ -447,7 +447,7 @@ - (id)nextObject { AGRegexMatch *next; - if (next = [regex findInString:string range:range]) { + if ((next = [regex findInString:string range:range])) { range.location = [next range].location + [next range].length; if ([next range].length == 0) range.location++; @@ -461,7 +461,7 @@ - (NSArray *)allObjects { NSMutableArray *all = [NSMutableArray array]; AGRegexMatch *next; - while (next = [self nextObject]) + while ((next = [self nextObject])) [all addObject:next]; return all; } --- gtamsanalyzer.app.orig/Source/ctTagInfo.m +++ gtamsanalyzer.app/Source/ctTagInfo.m @@ -55,5 +55,6 @@ { [name release]; [coder release]; + [super dealloc]; } @end --- gtamsanalyzer.app.orig/Source/myProject.h +++ gtamsanalyzer.app/Source/myProject.h @@ -10,7 +10,6 @@ #import #import #import "MyDocument.h" -#import "myProject.h" #import "myResults.h" #define ABSPATHMODE 0 #define RELPATHMODE 1 @@ -149,6 +148,7 @@ -(void) front; -(void) back; -(void) setDirty; +-(void) setCodeListDirty; -(NSArray *) getHotCodeList; -(NSArray *) allCodeList; -(BOOL) isCodeActive: (NSString *) who; @@ -157,6 +157,7 @@ -(void) openMWFile: (MWFile *) who type: (int) what; -(BOOL) mwFileExists: (MWFile *) who; -(MWFile *) getMWFile; +-(void) dropMWFile: (MWFile *) who; -(MWFile *) searchFileName; -(NSMutableDictionary *) getReports; -(BOOL) isMyCode: (NSString *) ss; @@ -234,7 +235,7 @@ -(BOOL) codeSetExists: (NSString *) who; -(NSArray *) codesInCodeSet: (NSString *) who; -(void) updateCodeCount; - +-(void) convertTempToRealCodeSet: (NSString *) who; -(NSArray *) allCodeList; @@ -249,31 +250,32 @@ -(void) rebuildFileSetMenu; -(IBAction) editFileSet: (id) Sender; -(void) addFileToCurrSet: (MWFile *) who; --(NSArray *) allFileSetNames; +-(NSMutableArray *) allFileSetNames; -(NSString *) currFileSet; -(BOOL) isFileSet; -(IBAction) fileSetSelMore: (id) sender; -(IBAction) fileSetSelLess: (id) sender; -(IBAction) fileSetSel: (id) sender; --(NSArray *) hotFileSet; --(NSArray *) allFileList; +-(NSMutableArray *) hotFileSet; +-(NSMutableArray *) allFileList; -(void) addFile: (MWFile *) who toSet: (NSString *) s; -(IBAction) showFileSet: (id) sender; -(void) loadFileSetWithName: (NSString *) who; -(void) rebuildFileSetPopMenu; -(NSArray *) dataFileSetNames; --(int) hotFileCount; - --(NSArray *) allFileList; - +-(NSUInteger) hotFileCount; -(NSArray *) mySummReports; -(void) delSummReport:(NSString *) who; -(void) addSummReport:(NSString *) who report: (NSDictionary *) r global: (BOOL) g; -(BOOL) isMySummReport: (NSString *) who; -(void) rebuildSummReportMenu; - - +-(void) clearTempCodeStack; +-(NSString *) popTempCodeStack; +-(void) selectTempCodeSetWithin: (NSString *) who; +-(void) selectTempCodeSetFewer: (NSString *) who; +-(void) selectTempCodeSetMore: (NSString *) who; +-(void) newCode: (NSString *) what definition: (NSString *) info realColor: (NSColor *) whatColor; -(void) addAutoSet: (NSMutableDictionary *) what withName: (NSString *) who; -(NSMutableDictionary *) autoSetForName: (NSString *) who; --- gtamsanalyzer.app.orig/Source/MWDoubleDictionary.h +++ gtamsanalyzer.app/Source/MWDoubleDictionary.h @@ -13,7 +13,7 @@ NSMutableDictionary *root; } --(NSObject *) objectForKey1: (NSString *) who1 key2: (NSString *) who2; +-(id) objectForKey1: (NSString *) who1 key2: (NSString *) who2; -(void) setObject: (NSObject *) what forKey1: (NSString *) who1 key2: (NSString*) who2; -(void) incKey1: (NSString *) who1 key2: (NSString *) who2; -(void) decKey1: (NSString *) who1 key2: (NSString *) who2; @@ -26,7 +26,7 @@ -(int) sumForKey2: (NSString *) who2; -(int) sumForKey1: (NSString *) who1; -(int) diagSum; --(unsigned) count; +-(NSUInteger) count; -(NSArray *) toArray; -(void) removeAllObjects; -(void) removeObjectForKey1: (NSString*) who1 key2: (NSString*) who2; --- gtamsanalyzer.app.orig/Source/MyDocument.h +++ gtamsanalyzer.app/Source/MyDocument.h @@ -15,6 +15,8 @@ #import "tams.h" //#import "myProject.h" +@class myProject; + @interface MyDocument : NSDocument { //kludge for flags @@ -146,7 +148,7 @@ -(void) setReanalysisState: (BOOL) which; -(void) setTitleFromFile; -(void) setGWorkBench: (id) who; --(id) getGWorkBench; +-(myProject *) getGWorkBench; -(void) setMWFile: (MWFile *) who; -(MWFile *) getMyMWFile; -(void) scanForMetas; @@ -170,7 +172,7 @@ -(IBAction) cancelCodeWithComment: (id) sender; -(IBAction) editCodeSet: (id) Sender; -(void) scrollToTop; --(NSMutableArray *) hotCodeList; +-(NSArray *) hotCodeList; -(NSArray *) remakeCodeList; -(void) assignCode; -(void) loadtextViewWithData:(NSData *) data; @@ -203,8 +205,8 @@ -(IBAction) clearMediaFileTags: (id) sender; -(IBAction) speedUp: (id) sender; -(IBAction) slowDown: (id) sender; --(void) endTimer; #endif +-(void) endTimer; -(IBAction) selectColorFromWell:(id)Sender; -(IBAction) selectColorFromSwitch:(id) sender; -(IBAction) rebuildDocMacros: (id) sender; --- gtamsanalyzer.app.orig/Source/utils.h +++ gtamsanalyzer.app/Source/utils.h @@ -10,7 +10,7 @@ #import #define ADDCHAR(X) appendFormat: @"%C",X //#define ADDCHAR(X) appendString: charToNSS(X) -#define FORALL(X) {id temp; unsigned __cnt, __i; __cnt = [X count]; for( __i = 0; __i < __cnt; __i++) {temp = [X objectAtIndex: __i]; +#define FORALL(X) {id temp; NSUInteger __cnt; unsigned __i; __cnt = [X count]; for( __i = 0; __i < __cnt; __i++) {temp = [X objectAtIndex: __i]; #define ENDFORALL }} #define ISQUOTE(X) ([X characterAtIndex: 0] == '\"' && [X characterAtIndex: ([X length] -1)] == '\"') #define NSWARNING(X) NSRunAlertPanel(@"Warning!", X, @"Ok", nil, nil); --- gtamsanalyzer.app.orig/Source/MWDoubleDictionary.m +++ gtamsanalyzer.app/Source/MWDoubleDictionary.m @@ -23,7 +23,7 @@ [super dealloc]; } --(NSObject *) objectForKey1: (NSString *) who1 key2: (NSString *) who2; +-(id) objectForKey1: (NSString *) who1 key2: (NSString *) who2; { NSMutableDictionary *first; @@ -163,7 +163,7 @@ return ans; } --(unsigned) count +-(NSUInteger) count { NSArray *fk = [self firstKeys]; unsigned i; --- gtamsanalyzer.app.orig/Source/dotGraphWatcher.m +++ gtamsanalyzer.app/Source/dotGraphWatcher.m @@ -2,6 +2,7 @@ #import "utils.h" #import "tamsutils.h" #import "prefBoss.h" +#import "myResults.h" #import "MGWPopUpButton.h" @@ -430,8 +431,7 @@ } -(void) doDotGraph { - id columns; - int n; + NSArray *columns; /* if([[NSWorkspace sharedWorkspace] fullPathForApplication: @"Graphviz"] == nil) graphvizInstalled = NO; @@ -505,7 +505,6 @@ } ENDFORALL; - n = [colPool count]; //[snVarMenu setDelegate: self]; //[seVarMenu setDelegate: self]; /* @@ -578,7 +577,8 @@ if(tt == edgeAttribTable) return [pairAttribs count]; if(tt == snTable) return [[snDict allKeys] count]; - if(tt == seTable) return [seDict count]; + else // (tt == seTable) + return [seDict count]; } -(IBAction) delAttrib: (id) sender @@ -626,7 +626,6 @@ } - (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation { - int n; if(tableView == fieldList) { int currSpot; @@ -657,7 +656,6 @@ [tableView reloadData]; return YES; #else - n = [dndList count]; currSpot = row; FORALL(dndList) { @@ -680,9 +678,6 @@ } - (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard { - id testid; - testid = fieldList; - if(tableView == fieldList) { /* @@ -743,7 +738,7 @@ return [NSString stringWithFormat: @"%@%@", who, [snDict objectForKey: who]]; } - if(aTableView == seTable) + else // (aTableView == seTable) { NSArray *aa; NSDictionary *rr; @@ -823,7 +818,7 @@ -(IBAction) snAdd: (id) sender { - if([snValMenu count] == 0) return; + if([snValMenu numberOfItems] == 0) return; [snDict setObject: [NSString stringWithFormat: @"[shape=%@ style=%@]", nodeShapes[[[snShapeMenu selectedItem] tag]], borderStyle[[[snStyleMenu selectedItem] tag]]] @@ -852,7 +847,7 @@ } -(IBAction) seAdd: (id) sender { - if([seValMenu count] == 0) return; + if([seValMenu numberOfItems] == 0) return; [seDict setObject: [NSString stringWithFormat: @"[dir=%@ style=%@]", edgeType[[[seShapeMenu selectedItem] tag]], edgeStyle[[[seStyleMenu selectedItem] tag]]] --- gtamsanalyzer.app.orig/Source/fileListMgr.m +++ gtamsanalyzer.app/Source/fileListMgr.m @@ -3,19 +3,19 @@ @implementation fileListMgr - (int)numberOfRowsInTableView:(NSTableView *)aTableView { - if([[myProj getHotFileList] count] > 0) - NSLog(@"Filelstmgr: %d objects, 1st name: %@\n", [[myProj getHotFileList] -count], [[[myProj getHotFileList] objectAtIndex: 0] name]); -else NSLog(@"Filelstmgr: %d objects", [[myProj getHotFileList] count]); - return [[myProj getHotFileList] count]; + if([[myProj hotFileSet] count] > 0) + NSLog(@"Filelstmgr: %d objects, 1st name: %@\n", [[myProj hotFileSet] +count], [[[myProj hotFileSet] objectAtIndex: 0] name]); +else NSLog(@"Filelstmgr: %d objects", [[myProj hotFileSet] count]); + return [[myProj hotFileSet] count]; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { - NSLog(@"Filelstmgr: %d objects, 1st name: %@\n", [[myProj getHotFileList] -count], [[[myProj getHotFileList] objectAtIndex: rowIndex] name]); - return [[[myProj getHotFileList] objectAtIndex: rowIndex] name]; + NSLog(@"Filelstmgr: %d objects, 1st name: %@\n", [[myProj hotFileSet] +count], [[[myProj hotFileSet] objectAtIndex: rowIndex] name]); + return [[[myProj hotFileSet] objectAtIndex: rowIndex] name]; } - (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { --- gtamsanalyzer.app.orig/Source/MGWPopUpButton.h +++ gtamsanalyzer.app/Source/MGWPopUpButton.h @@ -14,7 +14,5 @@ -(NSString *) titleOfItemWithTag: (int) t; -(NSMenuItem *) itemWithTag: (int) t; -(int) tagOfSelectedItem; --(void) selectItemWithTag: (int) t; -(void) selectItemWithTagNumber: (NSNumber *) n; --(unsigned) count; @end --- gtamsanalyzer.app.orig/Source/MWFakeDoc.h +++ gtamsanalyzer.app/Source/MWFakeDoc.h @@ -27,4 +27,5 @@ -(void) recode: (NSString *) what first: (int) bwhere last: (int) ewhere from: (id) who withDef: (NSString *) myDef; -(void) addCode: (NSString *) what from: (int) bwhere to: (int) ewhere from: (id) who withDef: (NSString *) myDef; -(MWFile *) getMyMWFile; +-(void) writeAndClose; @end --- gtamsanalyzer.app.orig/Source/MWFile.h +++ gtamsanalyzer.app/Source/MWFile.h @@ -7,6 +7,7 @@ // #import +#import //#import "MyDocument.h" @interface MWFile : NSObject { @@ -20,6 +21,7 @@ - (NSString *) string; - (id) filePointer; +- (NSAttributedString *) attributedString; - (NSString *) path; - (NSString *) name; @@ -29,6 +31,7 @@ - (BOOL) open; -(BOOL) isReallyOpen; -(id) setOpenFakeFileWithWorkBench: (id) wb; +-(void) closeFakeFile; -(void) setOpen: (BOOL) state; -(void) setHasFile: (BOOL) state; --- gtamsanalyzer.app.orig/Source/MWFile.m +++ gtamsanalyzer.app/Source/MWFile.m @@ -47,7 +47,6 @@ { NSDictionary *myAttrib; - NSAttributedString *masterString; /* if([[self type] isEqualToString: @"rtf"] || [[self type] isEqualToString: @"RTF"] || [[self type] isEqualToString: @"RTFD"] @@ -57,6 +56,8 @@ { return [[[NSAttributedString alloc] initWithPath: [self path] documentAttributes: &myAttrib] autorelease]; } + else + return nil; } - (NSString *) string { @@ -83,6 +84,8 @@ [masterString release]; return [myString autorelease] ; } + else + return nil; } } @@ -138,7 +141,8 @@ if (fid == nil) return fid; [self setHasFile: YES]; open = YES; - [fid open]; + [(MWFile *)fid open]; + return fid; } -(void) closeFakeFile --- gtamsanalyzer.app.orig/Source/MGWPopUpButton.m +++ gtamsanalyzer.app/Source/MGWPopUpButton.m @@ -27,10 +27,6 @@ { return [[self selectedItem] tag]; } --(void) selectItemWithTag: (int) t -{ - [self selectItem: [self itemWithTag: t]]; -} -(void) selectItemWithTagNumber: (NSNumber *) n { --- gtamsanalyzer.app.orig/Source/docDelegate.m +++ gtamsanalyzer.app/Source/docDelegate.m @@ -1,4 +1,5 @@ #import "docDelegate.h" +#import "appDelegate.h" #import "myProject.h" #import "MyDocument.h" #define NOTIFICATIONDIRTY 1 --- gtamsanalyzer.app.orig/Source/GNUStepPatches.m +++ gtamsanalyzer.app/Source/GNUStepPatches.m @@ -2,6 +2,8 @@ #import "myProject.h" #import "myResults.h" +/* Overrides for -[NSWindow close]; unnecessary. */ +#if 0 @interface MyDocument (GSMyDocument) -(IBAction) close: (id) sender; @end @@ -33,4 +35,5 @@ { [self niceClose: sender]; } -@end \ No newline at end of file +@end +#endif --- gtamsanalyzer.app.orig/Source/MWExportWatcher.m +++ gtamsanalyzer.app/Source/MWExportWatcher.m @@ -106,6 +106,7 @@ //if([self global: @"nonregexcharflag"] || [self global: @"regexcharflag"]) return; } + return nil; } -(NSString *) processString: (NSString *) who line: (int) ln @@ -378,14 +379,13 @@ } else { - BOOL a; NSString *ans = [self getDataString]; [ans retain]; [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; - a = [[NSPasteboard generalPasteboard] setString: ans forType: NSStringPboardType]; + [[NSPasteboard generalPasteboard] setString: ans forType: NSStringPboardType]; [ans autorelease]; //get string @@ -420,9 +420,6 @@ } - (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard { - id testid; - testid = fieldList; - if(tableView == fieldList) { /* @@ -460,11 +457,10 @@ - (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id )info row:(int)row dropOperation:(NSTableViewDropOperation)operation { - int n; if(tableView == fieldList) { int currSpot; - n = [dndList count]; + [dndList count]; currSpot = row; FORALL(dndList) { --- gtamsanalyzer.app.orig/Source/MWFakeDoc.m +++ gtamsanalyzer.app/Source/MWFakeDoc.m @@ -174,7 +174,7 @@ { ctQChar *begChar, *endChar; int bTerminus, eTerminus; - int bNew, eNew, ll; + int ll; int p1, p2, pr1, pr2, po1, po2; NSMutableAttributedString *ss; NSColor *myC; @@ -240,7 +240,6 @@ [tc startSearch]; [tc setCharLocation: (ewhere)]; [tc readnext: endChar]; - eNew = [tc getCharLocation]; //[who adjustBy: eNew - eTerminus startingAt: ewhere for: [self getMyMWFile]]; [self adjustResultDocsAt: p2 + 1 forLength: po2 - pr2]; @@ -264,7 +263,6 @@ //get adjusted beginning and let the results know to adjust [tc setCharLocation: (bwhere)]; [tc readnext: (begChar)]; - bNew = [tc getCharLocation]; //[who adjustBy: bNew - bTerminus startingAt: bwhere for: [self getMyMWFile]]; [self adjustResultDocsAt: p1+1 forLength: po1 - pr1]; //if it's new make sure to add it @@ -325,7 +323,6 @@ { ctQChar *begChar, *endChar; int bTerminus, eTerminus; - int bNew; NSMutableAttributedString *ss; @@ -372,7 +369,6 @@ //get adjusted beginning and let the results know to adjust [tc setCharLocation: (bwhere)]; [tc readnext: (begChar)]; - bNew = [tc getCharLocation]; //[who adjustBy: bwhere - bTerminus startingAt: bwhere for: [self getMyMWFile]]; [self adjustResultDocsAt: bwhere forLength: bwhere - bTerminus]; //if it's new make sure to add it @@ -391,16 +387,12 @@ -(void) ConvertMovieTimeToHHMMSS: (BOOL) hhmmssFormat { - long l; - NSString *ss; NSMutableArray *tLoc = [[NSMutableArray alloc] init]; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; ctQChar *q; - NSRange r,s; NSString *timeCode; int tt, i, n; BOOL timeMode, hfmt; - double t1; NSString *theDocString; timeCode = [gPrefBoss getAVCode]; @@ -411,7 +403,6 @@ q = [[ctQChar alloc] init]; timeMode = NO; - r = NSMakeRange(0,0); while((tt = [tc scanNext: q]) != ENDOFFILE) { //scan through doc --- gtamsanalyzer.app.orig/Source/MWKeyedProject.m +++ gtamsanalyzer.app/Source/MWKeyedProject.m @@ -24,20 +24,26 @@ #import "MWKappa.h" #import "AGRegex.h" +@interface myProject (Private) +-(NSDictionary *) getSaveableNamedSearchList; +-(void) setUseableNamedSearchList: (NSDictionary *) who; +-(NSDictionary *) fileSetsForSaving; +-(void) loadFileSets: (NSDictionary *) savedFS; +@end + @implementation myProject(MWKeyedProject) - (NSData *) keyedDataRepresentation { NSMutableArray *fileArray = [NSMutableArray array]; NSMutableArray *resultArray = [NSMutableArray array]; NSMutableArray *searchArray = [NSMutableArray array]; - NSString *pPath, *tPath; + NSString *pPath; NSMutableData *myDat = [[NSMutableData alloc] init]; NSKeyedArchiver *myOut = [[NSKeyedArchiver alloc] initForWritingWithMutableData: myDat]; [myOut setOutputFormat: NSPropertyListXMLFormat_v1_0]; /*--Put my variables here */ NSLog(@"In keyeddatarep"); - tPath = [self fileName]; pPath = [savingFileName stringByDeletingLastPathComponent]; //make an array //add to it a version # @@ -191,13 +197,9 @@ MWFile *sfile; id testObj; - NSString *tPath;//= [self fileName]; NSString *pPath = [[self fileName] stringByDeletingLastPathComponent]; - int vers; masterArray = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; - tPath = [self fileName]; - vers = [[masterArray decodeObjectForKey: @"version"] intValue]; if((testObj = [masterArray decodeObjectForKey: @"autosets"]) != nil) [autoSetDict addEntriesFromDictionary: testObj]; IFSAVEDKEY(@"pathMode") --- gtamsanalyzer.app.orig/Source/MWKeyedResult.m +++ gtamsanalyzer.app/Source/MWKeyedResult.m @@ -31,24 +31,23 @@ #import "MWTAMSStringCategories.h" #define UPDATERECCOUNT [self updateRecCount]; +@interface myResults (Private) +-(NSMutableArray *) arrayFromSubset: (NSArray *) who; +-(id) subsetFromArray: (NSArray *) who; +-(void) markBackArray: (NSArray *) rows; +-(void) updateRecCount; +@end + @implementation myResults (MWKeyedResult) - (NSData *) keyedDataRepresentation { NSMutableData *myDat = [[NSMutableData alloc] init]; NSKeyedArchiver *rootArray = [[NSKeyedArchiver alloc] initForWritingWithMutableData: myDat]; [rootArray setOutputFormat: NSPropertyListXMLFormat_v1_0]; - NSMutableData *dd; - int ab; - NSMutableArray *nameList, *fixedDataArray, *nKeys; + NSMutableArray *nameList, *fixedDataArray; + NSArray *nKeys; NSMutableDictionary *nSets; - dd = [[NSMutableData alloc] init]; - if(gWorkBench) - { - ab = [gWorkBench absPath]; - } - else - ab = ABSPATHMODE; //1. save the version [rootArray encodeObject: @"10" forKey: @"version"]; @@ -162,13 +161,8 @@ id testObj; NSKeyedUnarchiver * rootArray; //NSMutableArray *fileList = [NSMutableArray array]; - NSString *tPath; - - int vers; rootArray = [[NSKeyedUnarchiver alloc] initForReadingWithData: mySavedData]; - tPath = [self fileName]; - vers = [[rootArray decodeObjectForKey: @"version"] intValue]; // BOOL apm; // NSMutableString *wbPath = [[NSMutableString alloc] init];f selRow = 0; --- gtamsanalyzer.app.orig/Source/MWResultToolbarDelegate.m +++ gtamsanalyzer.app/Source/MWResultToolbarDelegate.m @@ -59,6 +59,7 @@ { [myButtons dealloc]; [allButtons dealloc]; + [super dealloc]; } -(id) init { --- gtamsanalyzer.app.orig/Source/MWSortStackItem.h +++ gtamsanalyzer.app/Source/MWSortStackItem.h @@ -15,7 +15,7 @@ #import -int stackComp(id first, id second, NSMutableArray *sortStack); +NSComparisonResult stackComp(id first, id second, void *sortStack); @interface MWSortStackItem #ifdef NSOBJVERS --- gtamsanalyzer.app.orig/Source/MWSortStackItem.m +++ gtamsanalyzer.app/Source/MWSortStackItem.m @@ -10,17 +10,18 @@ #import "utils.h" #import "tamsutils.h" -int stackComp(id first, id second, NSMutableArray *sortStack) +NSComparisonResult stackComp(id first, id second, void *sortStack) { int i; int cnt; + NSMutableArray *array = (NSMutableArray *)sortStack; NSMutableDictionary *thisOne; NSComparisonResult cr; cr = NSOrderedAscending; - cnt = [sortStack count]; - for(i = 0; i < [sortStack count]; i++) + cnt = [array count]; + for(i = 0; i < cnt; i++) { - thisOne = [sortStack objectAtIndex: i]; + thisOne = [array objectAtIndex: i]; if([[thisOne objectForKey: @"type"] intValue] == SORTSTRING) { if([thisOne objectForKey: @"case"] == nil) --- gtamsanalyzer.app.orig/Source/MWSummaryReport.m +++ gtamsanalyzer.app/Source/MWSummaryReport.m @@ -102,7 +102,7 @@ return [[NSCalendarDate dateWithString:s1 calendarFormat: dateFormat] isEqualToDate: [NSCalendarDate dateWithString:s2 calendarFormat: dateFormat]]; } - if(t == SRCODETYPE) + else // (t == SRCODETYPE) { return [self isEqualToLevel: cl first: s1 second: s2]; } @@ -126,7 +126,7 @@ //create the right number of columns with the right headers //send a refresh - id tc; + NSArray *tc; tc = [dataTable tableColumns]; FORALL(tc) @@ -215,7 +215,7 @@ -(void) buildSummary { int fflag; - int i,j,n,m, i1; + int i,j,n,m, i1, i2; NSMutableArray *currValue, *summArray; id currData; int breakpnt; @@ -243,17 +243,13 @@ [currValue addObject: [[[self stringValue: currData field: summField] copy] autorelease]]; fflag = 0; //loop for all summArray - FORALL(groupData) + for (i2 = 0; i2 < [groupData count]; i2++) { if (summType == SUMMCOUNT) - { [summArray addObject: [[[NSMutableNumber alloc] initWithInt: 1]autorelease]]; - } - else - { + else [summArray addObject: [[[NSMutableNumber alloc] initWithString: [self stringValue: currData field: summField]] autorelease] ]; - } - }ENDFORALL; + } if(summType == SUMMCOUNT) [tot inc]; else --- gtamsanalyzer.app.orig/Source/MyDocument.m +++ gtamsanalyzer.app/Source/MyDocument.m @@ -36,6 +36,13 @@ #define SETCOLOR(X) [theDoc setTextColor: [gWorkBench colorForCode: X] range: [theDoc selectedRange]]; #define SETBASECOLOR [theDoc setTextColor: getColorForInt([gPrefBoss tagColorValue]) range: [theDoc selectedRange]]; +@interface MyDocument (Private) +-(void) lineNumberDocWithWidth: (int) width + startingAt: (int) begin + atBlanks: (BOOL) blanks + numberBlanks: (BOOL) cntBlanks; +@end + @implementation MyDocument @@ -112,7 +119,8 @@ case black: return [NSColor blackColor]; break; - default: ; + default: + return nil; } } -(void) newColorOn: (NSColor *) what @@ -203,7 +211,6 @@ -(IBAction) doColorize: (id) sender { - NSRange r,s; NSTextStorage *ts = [theDoc textStorage]; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; ctQChar *q; @@ -214,7 +221,6 @@ q = [[ctQChar alloc] init]; - r = [theDoc selectedRange]; [ts beginEditing]; while([tc scanNext: q] != ENDOFFILE) @@ -257,7 +263,6 @@ } -(IBAction) doColorizeRange: (NSRange) theRange { - NSRange r,s; NSTextStorage *ts = [theDoc textStorage]; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; MWFakeFile *mff; @@ -271,11 +276,10 @@ q = [[ctQChar alloc] init]; - r = [theDoc selectedRange]; - [ts beginEditing]; while([tc scanNext: q] != ENDOFFILE) { + NSRange s; if([q tokentype] == TOKEN || [q tokentype] == ENDTOKEN) { /* @@ -317,7 +321,7 @@ } -(IBAction) doColorOn: (id) sender { - NSRange r,s; + NSRange r; int myColor; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; [theDoc setAllowsUndo: YES]; @@ -337,6 +341,8 @@ myColor = gray; else if([[sender title] isEqualToString: @"Dark gray"] ==YES) myColor = dkgray; + else + myColor = otherColor; #ifdef COLOR2 { @@ -379,7 +385,6 @@ r = [theDoc selectedRange]; [theDoc setSelectedRange: NSMakeRange(0,0)]; - s = NSMakeRange(0,0); [ts beginEditing]; while([tc scanNext: qq] != ENDOFFILE) { @@ -402,6 +407,7 @@ #endif #ifdef COLOR3 + NSRange s; r = [theDoc selectedRange]; [theDoc setSelectedRange: NSMakeRange(0,0)]; s = NSMakeRange(0,0); @@ -681,7 +687,8 @@ { return [theDoc RTFDFromRange: NSMakeRange(0, [[theDoc string] length])]; } - + else + return nil; } - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType @@ -959,7 +966,6 @@ NSRange selRange; NSMutableString *ss; int loc; - int mc; int len, i; NSMutableDictionary *txtState; //mc = [gPrefBoss realColor]; @@ -1090,7 +1096,7 @@ NSRange currSel; ctQChar *begChar, *endChar; int bTerminus, eTerminus; - int bNew, lll; + int lll; NSMutableString *ss; [self setReanalysisState: NO]; @@ -1139,7 +1145,6 @@ //get adjusted beginning and let the results know to adjust [tc setCharLocation: (bwhere)]; [tc readnext: (begChar)]; - bNew = [tc getCharLocation]; //[who adjustBy: bwhere - bTerminus startingAt: bwhere for: [self getMyMWFile]]; [self adjustResultDocsAt: bwhere forLength: bwhere - bTerminus]; //if it's new make sure to add it @@ -1171,7 +1176,7 @@ NSRange currSel; ctQChar *begChar, *endChar; int bTerminus, eTerminus; - int bNew, eNew, lll, ll; + int lll, ll; int p1, p2, pr1, pr2, po1, po2; NSMutableString *ss; NSColor *myC; @@ -1236,7 +1241,6 @@ [tc startSearch]; [tc setCharLocation: (ewhere)]; [tc readnext: endChar]; - eNew = [tc getCharLocation]; //[who adjustBy: eNew - eTerminus startingAt: ewhere for: [self getMyMWFile]]; [self adjustResultDocsAt: p2 + 1 forLength: po2 - pr2]; @@ -1258,7 +1262,6 @@ //get adjusted beginning and let the results know to adjust [tc setCharLocation: (bwhere)]; [tc readnext: (begChar)]; - bNew = [tc getCharLocation]; //[who adjustBy: bNew - bTerminus startingAt: bwhere for: [self getMyMWFile]]; [self adjustResultDocsAt: p1+1 forLength: po1 - pr1]; //if it's new make sure to add it @@ -1315,8 +1318,6 @@ -(void) addCode: (NSString *) what from: (int) bwhere to: (int) ewhere from: (id) who withDef: (NSString *) myDef { - NSRange rr; - [theDoc setSelectedRange: NSMakeRange(bwhere, ewhere - bwhere)]; if([self isNew: what] || (![self isNew: what] && ((!myDef) ||[myDef isEqualToString: @""] == NO)) ) { @@ -1333,7 +1334,6 @@ //go back and adjust all the numbers //get the new selection - rr = [theDoc selectedRange]; //[who adjustBy: (rr.location + rr.length) - ewhere - ([what length] + 2) startingAt: ewhere for: [self getMyMWFile]]; // [self adjustResultDocsAt: ewhere forLength: (rr.location + rr.length) - ewhere - ([what length] + 2)]; @@ -1372,7 +1372,7 @@ -(IBAction) addItemToToolbar: (id) sender { int who; - NSString *name; + NSString *name; who = [theCodeList selectedRow]; if(who >= 0) { @@ -1466,10 +1466,8 @@ NSMutableString *theans, *theans1; NSRange where, newWhere, loc1, loc2; int l1, l2, r1, r2; - NSColor *myC; [self setReanalysisState: NO]; - myC = [gWorkBench colorForCode: aCode]; where = [theDoc selectedRange ]; r1 = where.location; r2 = where.location + where.length; @@ -1617,7 +1615,8 @@ } -(IBAction) newCode: (id) Sender { - NSMutableString *chkstr, *chk2; + NSMutableString *chkstr; + NSString *chk2; chkstr = [[NSMutableString alloc] initWithString: [theNewCode stringValue]]; //[codeColorMenu selectItemAtIndex: [codeColorMenu indexOfItemWithTag: inheritedColor]]; @@ -1684,11 +1683,9 @@ -(IBAction) integrateCodes: (id) sender { NSArray *aHotCodeList; - int n; //rebuild the codes aHotCodeList = [self remakeCodeList]; - n = [aHotCodeList count]; //go through mine FORALL(aHotCodeList) { @@ -1748,7 +1745,6 @@ ctQChar *q; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; NSRange rrr; - NSMutableArray *hotCodeList = [NSMutableArray array]; q = [[ctQChar alloc] init]; @@ -1773,7 +1769,7 @@ insertflag = -1; break; } - else if ((n = [temp compare: [q buff]]) == NSOrderedAscending) + else if ((n = [(NSString *)temp compare: [q buff]]) == NSOrderedAscending) //strcmp((char *)[temp cString],(char *) [[q buff] cString])) > 0)// ([[(NSString *)temp compare: [q buff]] isGreaterThan] == YES) { NSString *myans; @@ -1884,7 +1880,6 @@ NSDictionary *initState; NSMutableDictionary *myat; NSTextStorage *myTS; - NSUndoManager *myUndo; //int mc; int l1, l2, r1, r2; NSColor *myC; @@ -1897,9 +1892,8 @@ r1 = where.location; r2 = where.location + where.length; myTS = [theDoc textStorage]; - myUndo = [theDoc undoManager]; if([myTS length] < where.location) - initState = [myTS attributesAtIndex: where.location effectiveRange: nil]; + initState = [myTS attributesAtIndex: where.location effectiveRange: NULL]; else initState = [theDoc typingAttributes]; myat = [NSMutableDictionary dictionaryWithDictionary: [theDoc typingAttributes]]; @@ -2108,7 +2102,7 @@ { NSRange where,theEnd; NSMutableString *theCodeString; - NSMutableArray *hotCodeList; + NSArray *_hotCodeList; theCodeString = [[NSMutableString alloc] init]; //save location @@ -2116,19 +2110,19 @@ theEnd.location = [[theDoc string] length]; theEnd.length = 0; //refresh - hotCodeList = [self remakeCodeList]; + _hotCodeList = [self remakeCodeList]; //go to end [theDoc setSelectedRange: theEnd]; //spill out the codes [theCodeString appendString: [NSString stringWithFormat: @"Codes from file %@:\n", [[self getMyMWFile] name]]]; - FORALL(hotCodeList) + FORALL(_hotCodeList) { [theCodeString appendString: @"{"]; - [theCodeString appendString: [hotCodeList objectAtIndex: __i]]; + [theCodeString appendString: temp]; [theCodeString appendString: @"}"]; [theCodeString appendString: @"{/"]; - [theCodeString appendString: [hotCodeList objectAtIndex: __i]]; + [theCodeString appendString: temp]; [theCodeString appendString: @"}"]; [theCodeString ADDCHAR('\n')]; @@ -2347,16 +2341,14 @@ -(IBAction) removeLineNumbers: (id) sender { - NSMutableArray *numLoc; NSRange r; - int i, n, fflag, nflag; + int i, n, nflag; int tpart; MWCHAR ch; NSCharacterSet *nums; nums = [NSCharacterSet decimalDigitCharacterSet]; - fflag = 1; nflag = 1; tpart = 0; r.location = r.length = 0; @@ -2460,6 +2452,7 @@ ctQChar *q; NSMutableArray *theButtonList; NSMutableString *ss; + NSString *item; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; //clear existing macros @@ -2524,7 +2517,8 @@ { //is it already a button? //no, then add it with addItem - [myToolbar addItem: ss]; + item = [NSString stringWithString: ss]; + [myToolbar addItem: item]; [self addMacroItem: ss code: YES]; } else @@ -2546,6 +2540,7 @@ bookmarkInfo *bm; NSMutableArray *theButtonList; NSMutableString *ss; + NSString *item; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; //this is for the toolbar theButtonList = [[NSMutableArray alloc] init]; @@ -2654,7 +2649,8 @@ { //is it already a button? //no, then add it with addItem - [myToolbar addItem: ss]; + item = [NSString stringWithString: ss]; + [myToolbar addItem: item]; [self addMacroItem: ss code: YES]; } } @@ -2839,12 +2835,11 @@ -(IBAction) doRemoveCodesFromSelection: (id) sender { - NSRange n, ll, r; + NSRange n, r; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init]; NSMutableArray *aa= [[NSMutableArray alloc] init]; ctQChar *qq; int rslt; - int currLoc, l; unsigned r1; r1 = 0; //get the boundaries @@ -3359,11 +3354,9 @@ { NSMutableArray *codeHolder; ctQChar *q; - int errFlg; ctTagInfo *ti; TAMSCharEngine *tc = [[TAMSCharEngine alloc] initWithFileAndStart: [self getMyMWFile]]; ti = nil; - errFlg = 0; q = [[ctQChar alloc] init]; codeHolder = [[NSMutableArray alloc] init]; @@ -4304,7 +4297,8 @@ -(void) endTimer { -#ifdef MULTIMEDIA if(myMovie == nil) return; +#ifdef MULTIMEDIA + if(myMovie == nil) return; [myMovie release]; myMovie = nil; #ifdef USETIMER @@ -4324,7 +4318,6 @@ NSRange r; MWFakeFile *ff; int ch; - BOOL a; r = [theDoc selectedRange]; if(r.length == 0) return; @@ -4350,7 +4343,7 @@ declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; - a = [[NSPasteboard generalPasteboard] setString: nText forType: NSStringPboardType]; + [[NSPasteboard generalPasteboard] setString: nText forType: NSStringPboardType]; [nText autorelease]; } -(IBAction) requestCodeDefinitionOfSelection: (id) sender --- gtamsanalyzer.app.orig/Source/toolBarDelagate.h +++ gtamsanalyzer.app/Source/toolBarDelagate.h @@ -16,6 +16,7 @@ - (void)setupToolbar; -(void) addItem: (NSString *) ss; -(void) addText: (NSString *) ss; +-(void) addCmd: (NSString *) ss; -(void) addBar; - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar --- gtamsanalyzer.app.orig/Source/myProject.m +++ gtamsanalyzer.app/Source/myProject.m @@ -7,6 +7,8 @@ // #import "MWFile.h" #import "myProject.h" +#import "MWKeyedProject.h" +#import "MGWPopUpButton.h" #import "MyDocument.h" #import "tams.h" #import "utils.h" @@ -41,8 +43,13 @@ //Old makedirty[self updateChangeCount: NSChangeDone]; #define MAKECLEAN [self updateChangeCount: NSChangeCleared]; - - +@interface myProject (Private) +-(BOOL) shouldSave; +-(void) reloadFileSet; +-(void) loadCurrCodeSet; +-(void) removeFile: (MWFile *) who fromSet: (NSString *) s; +-(NSMutableArray *) getHotFileList; +@end int aStringComp(id first, id second, void *key) { @@ -211,8 +218,6 @@ } - (IBAction)saveDocumentAs:(id)sender { - int pm; - pm = absPathMode; if([self shouldSave] == NO) { NSWARNING(@"You must save or close all files (including search results) in this project before saving the project itself."); @@ -383,14 +388,13 @@ NSMutableArray *fileArray = [NSMutableArray array]; NSMutableArray *resultArray = [NSMutableArray array]; NSMutableArray *searchArray = [NSMutableArray array]; - NSString *pPath, *tPath; + NSString *pPath; // Insert code here to write your document from the given data. You can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead. //construct my path #ifdef USESXML if([aType isEqualToString: @"XML TAMS Project"] == YES) return [self keyedDataRepresentation]; #endif - tPath = [self fileName]; pPath = [savingFileName stringByDeletingLastPathComponent]; //make an array //add to it a version # @@ -548,8 +552,6 @@ -(void) setUseableNamedSearchList: (NSDictionary *) who { NSArray *ak; - NSMutableDictionary *convDict; - convDict = [[NSMutableDictionary alloc] init]; ak = [who allKeys]; FORALL(ak) { @@ -569,7 +571,6 @@ NSArray *fileList; MWFile *sfile; int vers; - NSString *tPath;//= [self fileName]; NSString *pPath = [[self fileName] stringByDeletingLastPathComponent]; #ifdef USESXML @@ -578,7 +579,6 @@ #endif masterArray = [NSUnarchiver unarchiveObjectWithData: data]; - tPath = [self fileName]; vers = [[masterArray objectAtIndex: 0] intValue]; if([[masterArray objectAtIndex: 0] isEqualToString: @"2.0c"] || vers >= 3) { @@ -789,7 +789,7 @@ -(void) openMWFile: (MWFile *) who type: (int) what { - id myfile; + id myfile = nil; NSDocumentController *myDC; NSString *myPath; myDC = [NSDocumentController sharedDocumentController]; @@ -866,9 +866,7 @@ -(IBAction) openSelectedFile: (id) Sender { int row; - NSDocumentController *myDC; - myDC = [NSDocumentController sharedDocumentController]; row = [fileListView selectedRow]; if(row < 0) return; [self openMWFile: [fList objectAtIndex: row] type: fileViewMode]; @@ -901,7 +899,6 @@ } - (void)windowControllerDidLoadNib:(NSWindowController *) aController { - id cButton; NSArray *myMenuItems; NSMenuItem *myItem; [codeListView setTarget: self]; @@ -1111,6 +1108,8 @@ { NSMutableDictionary *myEntry; NSMutableString *myDef, *oldDef; + + myDef = [NSMutableString string]; myEntry = [codeList objectForKey: what]; if(myEntry) { @@ -1124,7 +1123,6 @@ if(app) { oldDef = [myEntry objectForKey: @"definition"]; - myDef = [NSMutableString string]; if([gPrefBoss dateTimeValue]) {[myDef appendString: [[NSDate date] description]]; [myDef appendString: @": "]; } @@ -1825,7 +1823,7 @@ [self setCodeListClean]; return theHotCodeList; } - hc2 = [codeList allKeys]; + hc2 = [NSArray arrayWithArray: [codeList allKeys]]; hc = [NSMutableArray array]; FORALL(hc2) { @@ -2367,7 +2365,7 @@ MyDocument *md; ss = [NSMutableString string]; - cl = [self allCodeList]; + cl = [NSArray arrayWithArray: [self allCodeList]]; [cl retain]; FORALL(cl) { @@ -2496,11 +2494,10 @@ } -(void) localizePathForArray: (NSArray *) myArray { - NSString *pPath, *tPath; + NSString *pPath; // Insert code here to write your document from the given data. You can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead. //construct my path - tPath = [self fileName]; pPath = [savingFileName stringByDeletingLastPathComponent]; FORALL(myArray) { @@ -2622,7 +2619,7 @@ NSTextView *theDoc; MWFile *theMWFile; ctQChar *q; - ctTagInfo *ti; + ctTagInfo *ti = nil; int myloc; //TAMSCharEngine *tc = [[TAMSCharEngine alloc] initWithFileAndStart: [self getMyMWFile]]; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init];//initWithFileAndStart: [self getMyMWFile]]; @@ -2704,13 +2701,11 @@ NSTextView *theDoc; MWFile *theMWFile; ctQChar *q; - int errFlg; - ctTagInfo *ti; + ctTagInfo *ti = nil; TAMSCharEngine *tc = [[TAMSCharEngine alloc] init];//initWithFileAndStart: [self getMyMWFile]]; [tc addArrayToSearchList: openFiles]; [tc startSearch]; - errFlg = 0; q = [[ctQChar alloc] init]; [q retain]; @@ -2849,12 +2844,8 @@ } -(IBAction) addNamedSL: (id) Sender { - NSWindow *who; [searchListNameField setStringValue: @""]; - if([gPrefBoss detachedSheetValue]) - who = nil; - else - who = myWindow; + [gPrefBoss detachedSheetValue]; [NSApp beginSheet: searchListSheet modalForWindow: myWindow modalDelegate: self @@ -2867,7 +2858,7 @@ NSMutableString *currentCode; NSArray *codeArray, *tarray; NSMutableDictionary *who; - int n, i, j; + int n, i; int colorCode; NSRange r; NSNumber *nsColorNumber; @@ -2970,12 +2961,8 @@ } -(IBAction) addNamedSrch: (id) Sender { - NSWindow *who; [searchNameSheetField setStringValue: @""]; - if([gPrefBoss detachedSheetValue]) - who = nil; - else - who = myWindow; + [gPrefBoss detachedSheetValue]; [NSApp beginSheet: searchNameSheet modalForWindow: myWindow modalDelegate: self @@ -3010,7 +2997,6 @@ -(IBAction) doNamedSrch: (id) Sender { NSDictionary *who; - int n; if([searchNameMenu numberOfItems] <= 0) return; who = [namedSrch objectForKey: [[searchNameMenu selectedItem] title]]; @@ -3025,7 +3011,6 @@ [rawButton setIntValue: [[who objectForKey: @"raw"] intValue]]; [emptyButton setIntValue: [[who objectForKey: @"empty"] intValue]]; [exactButton setIntValue: [[who objectForKey: @"exact"] intValue]]; - n = [[who objectForKey: @"searchType"] intValue]; [searchTypeMenu selectItemAtIndex: st]; @@ -3167,9 +3152,8 @@ if(allFiles != nil) return [[self getHotFileList] count]; - else return 0; } - + return 0; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex @@ -3178,7 +3162,7 @@ return [[self allCodeList] objectAtIndex: rowIndex]; if(aTableView == fileSetTable) return [[[self allFileList] objectAtIndex: rowIndex] name]; - if(aTableView == fileListView) + else // (aTableView == fileListView) { return [[[self getHotFileList] objectAtIndex: rowIndex] name]; @@ -3188,6 +3172,8 @@ { if(aTableView == fileListView) return NO; + else + return YES; } - (void) codeSetDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { @@ -3316,7 +3302,7 @@ NSNumber *sr; NSArray *hc = [self allCodeList]; NSString *fs = [codeSetSelString stringValue]; - AGRegex *regex; + AGRegex *regex = nil; AGRegexMatch *match; if([codeSetSelRegex state] == NSOnState) @@ -3360,7 +3346,7 @@ { NSArray *hc = [self allCodeList]; NSString *fs = [codeSetSelString stringValue]; - AGRegex *regex; + AGRegex *regex = nil; AGRegexMatch *match; if([codeSetSelRegex state] == NSOnState) @@ -3830,7 +3816,7 @@ csa = [NSMutableArray array]; - hc = [self allCodeList]; + hc = [NSArray arrayWithArray: [self allCodeList]]; while((sr = [oe nextObject]) != nil) { [csa addObject: [[[hc objectAtIndex: [sr intValue]] copy] autorelease]]; @@ -3865,8 +3851,6 @@ -(IBAction) editCodeSet: (id) Sender { NSWindow *who; - NSArray *hc; - hc = [self allCodeList]; [codeSetName setStringValue: @""]; [self rebuildCodeSetPopMenu]; @@ -4010,7 +3994,7 @@ NSNumber *sr; NSArray *hc = [self allFileList]; NSString *fs = [fileSetSelString stringValue]; - AGRegex *regex; + AGRegex *regex = nil; AGRegexMatch *match; if([fileSetSelRegex state] == NSOnState) @@ -4051,7 +4035,7 @@ [regex release]; } --(NSArray *) allFileList +-(NSMutableArray *) allFileList { return allFiles; } @@ -4060,7 +4044,7 @@ { NSArray *hc = [self allFileList]; NSString *fs = [fileSetSelString stringValue]; - AGRegex *regex; + AGRegex *regex = nil; AGRegexMatch *match; if([fileSetSelRegex state] == NSOnState) @@ -4098,18 +4082,18 @@ ENDFORALL; } --(NSArray *) getHotFileList +-(NSMutableArray *) getHotFileList { return [self hotFileSet]; } --(int) hotFileCount +-(NSUInteger) hotFileCount { if([fileSetCurrName isEqualToString: @""] == YES) return [[self allFileList] count]; - return [[fileSets objectForKey: fileSetCurrName] count]; + return [(NSArray *)[fileSets objectForKey: fileSetCurrName] count]; } --(NSArray *) hotFileSet +-(NSMutableArray *) hotFileSet { if([fileSetCurrName isEqualToString: @""] == YES) return [self allFileList]; @@ -4167,7 +4151,7 @@ fList = na; } --(NSArray *) allFileSetNames +-(NSMutableArray *) allFileSetNames { NSMutableArray *ans =[NSMutableArray array]; [ans addObjectsFromArray: [fileSets allKeys]]; @@ -4331,9 +4315,9 @@ -(void) rebuildSummReportMenu { - int i, n, m; + int i, m; NSMenu *asmn; - NSMutableArray *w1, *w2; + NSMutableArray *w1; asmn = [[[NSApp delegate] summReportMenu] submenu]; m = [asmn numberOfItems]; @@ -4354,7 +4338,7 @@ for(i=0; i< m; i++) { [asmn addItemWithTitle: [w1 objectAtIndex: i] - action: nil + action: NULL keyEquivalent: @""]; } } @@ -4369,7 +4353,6 @@ NSMutableString *ans; NSMutableArray *nodeArray; NSTask *mytask; - NSFileHandle *h; /* if([[NSWorkspace sharedWorkspace] fullPathForApplication: @"Graphviz"] == nil) { --- gtamsanalyzer.app.orig/Source/myResults.h +++ gtamsanalyzer.app/Source/myResults.h @@ -93,7 +93,7 @@ NSMutableArray *univList, *repList, *blockList, *fileList, *colList; NSMutableString *limitString; NSData *mySavedData; - NSString *savedDataType; + NSMutableString *savedDataType; //NSArray *rootArray; varRegistry *myGlobals; NSMutableArray *myData; @@ -272,6 +272,7 @@ -(void) setGWorkBench: (id) who; -(void) setMWFile: (MWFile *) who; -(MWFile *) getMWFile; +-(void) loadSavedData; -(IBAction) moveWorkBenchForward: (id) sender; - (void) moveForward; -(IBAction) showCodeBrowser: (id) Sender; --- gtamsanalyzer.app.orig/Source/setMacroWatcher.m +++ gtamsanalyzer.app/Source/setMacroWatcher.m @@ -1,4 +1,5 @@ #import "myResults.h" +#import "myProject.h" #import "prefBoss.h" #import "setMacroWatcher.h" #import "utils.h" @@ -165,7 +166,6 @@ - (IBAction)loadMacro:(id)sender { NSMutableArray *revProg; - int n; if([macroMenu numberOfItems] == 0) return; //need to do memory mgmt here //[self zeroEditor: self]; @@ -174,7 +174,6 @@ [currMacro addEntriesFromDictionary: [myOverLord autoSetForName: [macroMenu titleOfSelectedItem]]]; //[[myOverLord autoSets] objectForKey: [macroMenu titleOfSelectedItem]]]; [revProg setArray: [currMacro objectForKey: @"program"]]; - n = [revProg count]; [currMacro setObject: revProg forKey: @"program"]; [nameView setStringValue: [macroMenu titleOfSelectedItem]]; [startMenu selectItemWithTitle: [currMacro objectForKey: @"start"]]; @@ -243,10 +242,8 @@ -(void) rebuildMenus { int i, n, m; - NSMutableDictionary *macros; NSArray *macroNames; - macros = [myOverLord autoSets]; macroNames = [myOverLord allAutoSetNames]; //build menus @@ -255,7 +252,7 @@ if(n >= 2) for(i = 2; i < n; i++) { - [startMenu removeItemAtIndex: 2]; + [(NSMenu *)startMenu removeItemAtIndex: 2]; } m = [macroNames count]; @@ -311,10 +308,8 @@ -(IBAction) zeroEditor: (id) sender { int i, n, m; - NSMutableDictionary *macros; NSArray *macroNames; - macros = [myOverLord autoSets]; macroNames = [myOverLord allAutoSetNames]; currMacro = [[NSMutableDictionary alloc] init]; [nameView setStringValue: @""]; @@ -330,7 +325,7 @@ if(n >= 2) for(i = 2; i < n; i++) { - [startMenu removeItemAtIndex: 2]; + [(NSMenu *)startMenu removeItemAtIndex: 2]; } m = [macroNames count]; @@ -451,7 +446,7 @@ - (int)numberOfRowsInTableView:(NSTableView *)aTableView { if(currMacro) - return [[currMacro objectForKey: @"program"] count]; + return [(NSArray *)[currMacro objectForKey: @"program"] count]; else return 0; } @@ -471,7 +466,7 @@ ff = 0; if([[md objectForKey: @"mode"] intValue] == SELECTCODESET) { - NSString *csItem; + NSString *csItem = nil; if([md objectForKey: @"type"] == nil) [md setObject: [NSNumber numberWithInt: SELECT] forKey: @"type"]; if([md objectForKey: @"exact"] == nil) --- gtamsanalyzer.app.orig/Source/toolBarDelagate.m +++ gtamsanalyzer.app/Source/toolBarDelagate.m @@ -29,6 +29,7 @@ [allButtons dealloc]; [codePool dealloc]; [textPool dealloc]; + [super dealloc]; } -(id) init { @@ -105,7 +106,6 @@ itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag { - NSMenuItem *m; NSToolbarItem *item = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier]; if ( [itemIdentifier isEqualToString:MGWDTBDelPair] ) { [item setLabel:MGWDTBDelPair]; --- gtamsanalyzer.app.orig/Source/myResults.m +++ gtamsanalyzer.app/Source/myResults.m @@ -28,6 +28,10 @@ #import #import #import "MWSortStackItem.h" +#import "dotGraphWatcher.h" +#import "summaryWatcher.h" +#import "setMacroWatcher.h" +#import "MWExportWatcher.h" #import "stringCategories.h" #import "MWTAMSStringCategories.h" //#define SIMON 1 @@ -50,21 +54,33 @@ #define MAKEDIRTY [self updateChangeCount: NSChangeDone]; #define DIRTYWARN if([dirtySourceFlag state] == NSOnState) if(NSYESNOQUESTION(@"Results may be out of synch with data files. Proceed?") == NO) return; +@interface myResults (Private) +-(IBAction) sortUp: (id) Sender; +-(BOOL) selectDataFrom: (NSArray *) + fromArray to: (NSMutableArray *) + toArray forCodeSet: (NSString *) + who type: (int) tp + exact: (BOOL) ex; +-(NSMutableArray*) applyAutoSetWithName: (NSString *) + who toArray: (NSMutableArray *) showing; +-(IBAction) doColorize: (id) sender; +@end + NSString *dateFmt[20] = -{{@"%m/%d/%y"}, //mm/dd/yy -{@"%m/%d/%Y"}, //mm/dd/yyyy -{@"%m-%d-%y"}, //mm-dd-yyyy -{@"%d/%m/%Y"}, //dd/mm/yyyy -{@"%d/%m/%y"}, //dd/mm/yy -{@"%B %d, %Y"}, //month dd, yyyy -{@"%d %B, %Y"}, //dd month, yyyy -{@"%I:%M"}, //hh:mm -{@"%I:%M %p"}, //hh:mm AM/PM -{@"%I:%M:%S"}, //hh:mm:ss -{@"%I:%M:%S %p"},//hh:mm:ss AM/PM - {@"%H:%M"}, //24hh:mm -{@"%H:%M:%S"}, //24hh:mm:ss -{@""} //other +{@"%m/%d/%y", //mm/dd/yy + @"%m/%d/%Y", //mm/dd/yyyy + @"%m-%d-%y", //mm-dd-yyyy + @"%d/%m/%Y", //dd/mm/yyyy + @"%d/%m/%y", //dd/mm/yy + @"%B %d, %Y", //month dd, yyyy + @"%d %B, %Y", //dd month, yyyy + @"%I:%M", //hh:mm + @"%I:%M %p", //hh:mm AM/PM + @"%I:%M:%S", //hh:mm:ss + @"%I:%M:%S %p",//hh:mm:ss AM/PM + @"%H:%M", //24hh:mm + @"%H:%M:%S", //24hh:mm:ss + @"" //other }; BOOL arrayContainsString(NSArray *a, NSString *s) @@ -134,14 +150,16 @@ } -int stringComp(id first, id second, NSString *key) +NSComparisonResult stringComp(id first, id second, void *ctxt) { - return [[first objectForKey: key] compare: [second objectForKey: key]]; + NSString *key = (NSString *)ctxt; + return [(NSString *)[first objectForKey: key] compare: [second objectForKey: key]]; } -int longFwdComp(id first, id second, NSString *key) +NSComparisonResult longFwdComp(id first, id second, void *ctxt) { int a, b; + NSString *key = (NSString *)ctxt; a = [[first objectForKey: key] intValue]; b = [[second objectForKey: key] intValue]; if(a < b) @@ -176,9 +194,8 @@ -(void) updateRecCount { - int r, n; + int n; n = [myData count]; - r = [theResults selectedRow]; [recCount setStringValue: [NSString stringWithFormat: @"%d/%d", n, [backData count]]]; [self updateChangeCount: NSChangeDone]; @@ -707,7 +724,8 @@ -(IBAction) deleteSourceCodes: (id) Sender { NSMutableArray *myLocalRecs; - id myRec, ans; + id myRec; + BOOL ans; NSEnumerator *locList; DIRTYWARN; if([self global: @"sectionsearch"] == YES || [self global: @"regexcharflag"] == YES || @@ -737,7 +755,7 @@ //go through and call the main docuement locList = [markedList reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) { @@ -754,7 +772,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -786,13 +804,9 @@ -(void) recodeDidEnd: (NSWindow *) mySheet returnCode: (int) returnCode contextInfo: (void *) contextInfo { NSMutableArray *myLocalRecs; - NSMutableString *myNewCodeName; id myRec; NSEnumerator *locList; - myNewCodeName = [[NSMutableString alloc] init]; - - if([markedList count]) { if(returnCode == 1) @@ -809,7 +823,7 @@ //go through and call the main docuement locList = [markedList reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) [gWorkBench openMWFile: [myRec objectForKey: @"_doc"] type: SOURCETYPE]; @@ -843,7 +857,6 @@ { NSString *ss; NSMutableArray *tempArray; - int n; //remove objects [codersList removeAllObjects]; @@ -852,7 +865,6 @@ //split object tempArray = convertStringToArray(ss, ','); [tempArray retain]; - n = [tempArray count]; FORALL(tempArray) { NSMutableString *tt; @@ -862,7 +874,6 @@ [codersList addObject: tt]; } ENDFORALL; - n = [codersList count]; //trim objects [tempArray release]; } @@ -953,8 +964,8 @@ } -(void) addCommentDidEnd: (NSWindow *) mySheet returnCode: (int) returnCode contextInfo: (NSArray *) hotList { - NSString *lgNewCodeName; - NSMutableString *thisCmnt, *theCmnt; + NSMutableString *thisCmnt; + NSString *theCmnt; NSMutableArray *myLocalRecs; id myRec; NSEnumerator *locList; @@ -973,7 +984,7 @@ //go through and call the main docuement locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) { @@ -1014,7 +1025,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -1056,10 +1067,8 @@ -(IBAction) doAppendCommentToMarked: (id) sender { - int row; NSMutableArray *hitList; NSWindow *who; - NSString *cmt; DIRTYWARN; hitList = [[NSMutableArray alloc] init]; @@ -1068,7 +1077,6 @@ NSWARNING(@"You can only add comments to simple searches."); return; } - row = [theResults selectedRow]; [hitList addObjectsFromArray: markedList]; [commentField setString: @""]; /* @@ -1310,12 +1318,11 @@ NSString * rstr; FORALL(backData) { - int b1, b2, e1, e2, l1, l2; + int b1, b2, e1, e2, l1; b1 = TAMSTART(rr); b2 = TAMSTART(temp); e1 = TAMEND(rr); e2 = TAMEND(temp); - l2 = [[temp objectForKey: @"_data"] length]; l1 = [kd length]; if(TAMSTART(rr) == TAMSTART(temp) && TAMEND(rr) == TAMEND(temp)) { @@ -1344,12 +1351,11 @@ NSString * rstr; FORALL(backData) { - int b1, b2, e1, e2, l1, l2; + int b1, b2, e1, e2, l1; b1 = TAMSTART(rr); b2 = TAMSTART(temp); e1 = TAMEND(rr); e2 = TAMEND(temp); - l2 = [[temp objectForKey: @"_data"] length]; l1 = [kd length]; if([self isOverlapped: temp and: rr]) { @@ -1394,7 +1400,6 @@ id myRec; NSEnumerator *locList; NSMutableString *oldCode; - NSMutableString *newData; oldCode = [NSMutableString string]; if(recodeFlag == 0) //this is addcode @@ -1424,7 +1429,7 @@ //go through and call the main docuement locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) { @@ -1472,7 +1477,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -1519,7 +1524,7 @@ //go through and call the main docuement locList = [markedList reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) { @@ -1571,7 +1576,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -1631,7 +1636,7 @@ [myLocalRecs sortUsingFunction: locationComp context: nil]; //go through and call the main docuement locList = [markedList reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { NSString *myHierCode; if([(MWFile *)[myRec objectForKey: @"_doc"] open] == NO) @@ -1686,7 +1691,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -1714,7 +1719,6 @@ if(returnCode == 1) { NSMutableString *oldDataCode; - int m, i; int clevel; //is there something there? clevel = [delRootLevels intValue]; @@ -1730,7 +1734,7 @@ [myLocalRecs sortUsingFunction: locationComp context: nil]; //go through and call the main docuement locList = [markedList reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { int oclevel; NSString *myHierCode; @@ -1791,7 +1795,7 @@ if([gPrefBoss batchOpenFiles] == 0) { locList = [myLocalRecs reverseObjectEnumerator]; - while(myRec = [locList nextObject]) + while((myRec = [locList nextObject])) { [(MWFile *)[myRec objectForKey: @"_doc"] closeFakeFile]; @@ -1897,9 +1901,7 @@ } -(IBAction) doAddRootCode: (id) sender { - NSArray *clist; NSWindow *who; - NSString *hcode; if(![markedList count]) return; if(![self global: @"simpleflag"]) @@ -1947,9 +1949,7 @@ -(IBAction) doDelRootCode: (id) sender { - NSArray *clist; NSWindow *who; - NSString *hcode; if(![markedList count]) return; if(![self global: @"simpleflag"]) @@ -2036,8 +2036,6 @@ // Implement to provide a persistent data representation of your document OR remove this and implement the file-wrapper or file path based save methods. NSMutableData *dd; - int first; - int ab; int cnt; MWFile *theDPtr; NSMutableArray *nameList, *fixedDataArray, *rootArray, *nKeys; @@ -2054,12 +2052,6 @@ if([type isEqualToString: @"TAMS Result"]) { rootArray = [[NSMutableArray alloc] init]; - if(gWorkBench) - { - ab = [gWorkBench absPath]; - } - else - ab = ABSPATHMODE; //1. save the version [rootArray addObject: @"10"]; FORALL(fileList) @@ -2104,7 +2096,7 @@ //6. save the named sets nSets = [[NSMutableDictionary alloc] init]; - nKeys = [namedSelDict allKeys]; + nKeys = [NSArray arrayWithArray: [namedSelDict allKeys]]; FORALL(nKeys) { [nSets setObject: [self arrayFromSubset: @@ -2139,8 +2131,7 @@ [rootArray addObject: [[autoHistoryStart copy] autorelease]]; //17. save media dictionary [rootArray addObject: [[mediaDict copy] autorelease]]; - dd = [NSArchiver archivedDataWithRootObject: rootArray]; - return dd; + return [NSArchiver archivedDataWithRootObject: rootArray]; } #ifdef HIER @@ -2220,7 +2211,7 @@ DATATAB(dd); DATASTRING(dd, @"");DATANL(dd); - while(key = [ns nextObject]) + while((key = [ns nextObject])) { ans = [temp objectForKey: key]; //if([ans length] == 0) continue; @@ -2284,7 +2275,7 @@ { if([what intValue] > 0 && [gPrefBoss TAScanForLN] == 1) { - DATASTRING(dd, what); + DATASTRING(dd, [what stringValue]); DATASTRING(dd, @"\\t"); } } @@ -2311,7 +2302,6 @@ newLineChar = '\r'; else newLineChar = '\n'; - first = 1; cnt = 1; if([myData count] == 0) {[dd release]; return nil;} //write the headers @@ -2338,7 +2328,7 @@ DATASTRING(dd, [[NSNumber numberWithInt: cnt] stringValue]); cnt++; ns = [colList objectEnumerator]; - while(key = [ns nextObject]) + while((key = [ns nextObject])) { DATATAB(dd); ans = [temp objectForKey: key]; @@ -2352,7 +2342,7 @@ { if([what intValue] > 0 && [gPrefBoss TAScanForLN] == 1) { - DATASTRING(dd, what); + DATASTRING(dd, [what stringValue]); DATASTRING(dd, @"\\t"); } } @@ -2595,8 +2585,6 @@ NSMutableArray *aa = [[NSMutableArray alloc] init]; FORALL(who) { - id testValue; - testValue = [backData objectAtIndex: [temp intValue]]; [aa addObject: [backData objectAtIndex: [temp intValue]]]; }ENDFORALL; return aa; @@ -2604,7 +2592,6 @@ - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)type { // Implement to load a persistent data representation of your document OR remove this and implement the file-wrapper or file path based load methods. - NSArray *rootArray; if([type isEqualToString: @"TAMS Result"] || [type isEqualToString: @"XML TAMS Result"]) { //rootArray = [NSUnarchiver unarchiveObjectWithData: data]; @@ -2960,7 +2947,7 @@ if([[temp objectForKey: @"code"] isEqualToString: [qq buff]] && [[temp objectForKey: @"coder"] isEqualToString: [qq coder]]) { - if([[temp objectForKey: @"state"] isEqualTo: @"Closed"]) + if([[temp objectForKey: @"state"] isEqualToString: @"Closed"]) { [temp setObject: @"Open" forKey: @"state"]; return; @@ -2998,29 +2985,20 @@ - (void) doTamsSearch: (NSString *) aLimString { - int nn; ctQChar *qq; #ifdef REGEXSEARCH - AGRegex *regex; - AGRegexMatch *match; NSArray *fl; - int rsi, rsj, rsk, rsnn3, rsnn, rsnn2; + int rsi, rsnn, rsnn2; int charZoom; int chtype; unsigned opt; long rsln; NSRange rsr, rsr2, rsr3; #endif -#ifdef SECTIONSEARCH - coderec *mySect; - - mySect = nil; -#endif #ifdef REGEXSEARCH #endif qq = nil; qq = [[ctQChar alloc] init]; - nn = [self global: @"simpleflag"]; //setup(); [tce setGCurrentTAMS: self]; #ifdef REGEXSEARCH @@ -3253,12 +3231,6 @@ case META: [self handlemeta: qq]; break; - if([tce hasSectionRun] == NO) - { - mySect = [tce ctOpenSectionRun]; - - } - break; case ENDOFFILE: [self handleAnEOF: [qq source]]; @@ -3518,7 +3490,7 @@ -(void) assignRepeat: (NSString *) rname withValue: (NSString *) rvalue { - NSMutableString *ss, *tt; + NSMutableString *ss; if([fieldMap count] > 0) { ss = [fieldMap objectForKey: rname]; @@ -3535,12 +3507,10 @@ { NSEnumerator *myenums ; coderec *mykey; - NSString *ss, *st; + NSString *ss; NSMutableArray *doneList; int n; int realcnt; - int fflag; - fflag = 1; //first time through the emptys realcnt = 0; n= 0; @@ -3567,11 +3537,11 @@ //set the repeats FORALL([tce ctRunVault]) { - st = [temp theName]; //for debugging + //st = [temp theName]; //for debugging //if([self isRepeat: [temp theName]]) if([temp runType] == REPEATRUN) { - if(ss = [temp record]) + if((ss = [temp record])) { [self assignRepeat: [temp theName] withValue: [ss copy]]; //[repVault setObject: [ss copy] forKey: ]; @@ -3615,7 +3585,7 @@ myenums = [[tce ctRunVault] objectEnumerator]; - while(mykey = [myenums nextObject]) + while((mykey = [myenums nextObject])) { NSMutableDictionary *myrec; @@ -3639,7 +3609,7 @@ { NSString *tt; - if(tt = [repVault objectForKey: temp]) + if((tt = [repVault objectForKey: temp])) [myrec setObject: tt forKey: temp]; else [myrec setObject: @"" forKey: temp]; @@ -3711,7 +3681,7 @@ FORALL(repList) { NSString *tt; - if(tt = [repVault objectForKey: temp]) + if((tt = [repVault objectForKey: temp])) { [myrec setObject: tt forKey: temp]; } @@ -3929,7 +3899,6 @@ -(void) handleSetRepeat: (NSString *) namelist { NSMutableArray *myUList; - int n; NSMutableString *s1, *s2, *s3; NSMutableArray *oneUVar; NSEnumerator *myen; @@ -3939,10 +3908,9 @@ myUList = convertStringToArray(namelist, ','); myen = [myUList objectEnumerator]; - n = [myUList count]; [s1 setString: @""]; [s2 setString: @""]; - while(s3 = [myen nextObject]) + while((s3 = [myen nextObject])) { oneUVar = convertStringToArray(s3, '='); if([oneUVar count] == 2) @@ -3973,7 +3941,6 @@ -(void) handleUniversal: (NSString *) namelist { NSMutableArray *myUList; - int n; NSMutableString *s1, *s2, *s3; NSMutableArray *oneUVar; NSEnumerator *myen; @@ -3983,10 +3950,9 @@ myUList = convertStringToArray(namelist, ','); myen = [myUList objectEnumerator]; - n = [myUList count]; [s1 setString: @""]; [s2 setString: @""]; - while(s3 = [myen nextObject]) + while((s3 = [myen nextObject])) { oneUVar = convertStringToArray(s3, '='); if([oneUVar count] == 2) @@ -4190,12 +4156,15 @@ if(limitString) return limitString; else - return @""; + { + NSMutableString *lim = [[NSMutableString alloc] init]; + [lim setString: @""]; + return [lim autorelease]; + } } -(IBAction) toggleCaseSensitive: (id) sender { - int state; if(caseSortFlag == NO) { NSLog(@"about to turn on case\n"); @@ -4732,7 +4701,7 @@ } --(void) handleSelect: (int) selectMode selectType: (int) st withString: (NSString *) compValue withCol: (NSString *) colName floatV: (int) fp regexV: (int) rf startArray: (NSMutableArray*) a1 endArray: (NSMutableArray*) a2 +-(void) handleSelect: (int) selMode selectType: (int) st withString: (NSString *) compValue withCol: (NSString *) colName floatV: (int) fp regexV: (int) rf startArray: (NSMutableArray*) a1 endArray: (NSMutableArray*) a2 { NSMutableArray *findList, *findFromList; NSRange a; @@ -4740,11 +4709,11 @@ AGRegexMatch *myRegexMatch; NSString *fString; - int n, i, cres, frflag; + int n, i, cres; findList = [[NSMutableArray alloc] init]; findFromList = [[NSMutableArray alloc] init]; - if(selectMode == SELECTREVERSE) + if(selMode == SELECTREVERSE) { [findList setArray: a1]; [findList removeObjectsInArray: a2]; @@ -4969,17 +4938,15 @@ default: ; } } - if(selectMode == SELECTADDITIONAL) + if(selMode == SELECTADDITIONAL) { n = [findList count]; if(n == 0) { NSWARNING(@"No records found"); - frflag=0; } else { - frflag = 1; for(i = 0; i0) { --- gtamsanalyzer.app.orig/Source/summaryWatcher.m +++ gtamsanalyzer.app/Source/summaryWatcher.m @@ -59,7 +59,6 @@ { NSArray *ngrp; NSDictionary *lo; - NSString *tt; ngrp = [self sortStack2Group]; [currGroups addObjectsFromArray: ngrp]; @@ -233,7 +232,7 @@ [summFieldCompLevel setIntValue: [[rep objectForKey: @"compLevel"] intValue]]; [countDupSwitch setIntValue: [[rep objectForKey: @"countDup"] intValue]]; [summTypePopMenu selectItemWithTagNumber: [rep objectForKey: @"summType"]]; - [summFieldType selectItem: [summFieldType itemAtIndex: [summFieldType indexOfItemWithTag: + [summFieldType selectItem: ()[summFieldType itemAtIndex: [summFieldType indexOfItemWithTag: [[rep objectForKey: @"summFieldType"] intValue]]]]; //[summFieldType selectItemWithTagNumber: [rep objectForKey: @"summFieldType"]]; if([resultClass reportScope: t] == 2) @@ -358,7 +357,6 @@ if(returnCode) { - id myReport; NSMutableDictionary *thisRep; thisRep = [self getCurrReport]; [self runSummReport: thisRep]; --- gtamsanalyzer.app.orig/Source/NSMutableNumber.m +++ gtamsanalyzer.app/Source/NSMutableNumber.m @@ -231,7 +231,7 @@ -(NSString *) description { - NSMutableString *rString, *fString; + NSMutableString *rString = nil, *fString; switch(_type) { --- gtamsanalyzer.app.orig/Source/TAMSCharEngine.m +++ gtamsanalyzer.app/Source/TAMSCharEngine.m @@ -32,7 +32,9 @@ #define PRINTCODER(X, Y) {if([gPrefBoss showCoder] && [(NSString *)Y length]){[X appendString:@" ["]; [X appendString: Y]; [X appendString: @"]"];}} - +@interface TAMSCharEngine (Private) +-(void) cleanUpTagVault; +@end @implementation TAMSCharEngine /* @@ -217,7 +219,7 @@ searchEnum = [gFileSearchList objectEnumerator]; [searchEnum retain]; oldDoc = hotSearchDocument; - if(hotSearchDocument = [searchEnum nextObject]) + if((hotSearchDocument = [searchEnum nextObject])) { [self setGTheData: [hotSearchDocument string]]; #ifdef SCANCODE @@ -269,18 +271,16 @@ -(MWCHAR) getNextChar { - unsigned localtest; MWCHAR c; id oldDoc; if(!gTheData) {[self setEOF: YES]; return EOF;} - localtest = dsLen; dsLen++; if(dsLen > [gTheData length]) { oldDoc = hotSearchDocument; - if(hotSearchDocument = [searchEnum nextObject]) + if((hotSearchDocument = [searchEnum nextObject])) { MWFile* tempSearchDocument = hotSearchDocument; hotSearchDocument = oldDoc; @@ -607,7 +607,6 @@ NSMutableString *ans; BOOL fnd; MWCHAR ch; - int tst; [qc clean]; //is there a current scanner? if([currScan scanLocation] == 0 || scanMode == SCANSTRING) @@ -646,7 +645,7 @@ } [ans appendString: tr]; if([currScan isAtEnd] == YES){ [qc setEnd: [currScan scanLocation]];[self handleFileEnd]; break;} - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; if([currScan isAtEnd] == YES) { if(warn)NSWARNING(@"Probable error at end of file"); @@ -657,7 +656,7 @@ if(ch == '\\') { [ans ADDCHAR(ch)]; - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; [qc setEnd: [currScan scanLocation]]; [ans ADDCHAR(ch)]; if([currScan isAtEnd] == YES) @@ -686,7 +685,7 @@ } [ans appendString: tr]; if([currScan isAtEnd] == YES){[qc setEnd: [currScan scanLocation]];[self handleFileEnd]; break;} - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; if([currScan isAtEnd] == YES) { [qc setEnd: [currScan scanLocation]]; @@ -738,7 +737,7 @@ if(warn)NSWARNING(@"Tag missing close brace at end of file"); break; } - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; if([currScan isAtEnd] == YES && ch == '"') { [ans ADDCHAR(ch)]; @@ -760,7 +759,7 @@ if(ch == '\\') { [ans ADDCHAR(ch)]; - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; [ans ADDCHAR(ch)]; if([currScan isAtEnd] == YES) { @@ -824,7 +823,7 @@ if(warn) NSWARNING(@"Tag missing close brace at end of file"); break; } - tst = [self scanNextChar: &ch]; + [self scanNextChar: &ch]; if([currScan isAtEnd] == YES && ch == '\"') { [ans ADDCHAR(ch)]; @@ -876,9 +875,6 @@ -(int) readnext: (ctQChar *)qc { MWCHAR c; - int i; - int meta; - int etag; c = [self getNextChar]; [qc setBuff: @""]; [qc setExtra: @""]; @@ -961,15 +957,12 @@ } /* we're in a tag so read the name */ - i =0; c = [self getNextChar]; [qc setTokenType: TOKEN]; if(cln) [qc setLine: cln]; - meta = etag = 0; - if(c == '!') {meta = 1; [qc setTokenType: META];} + if(c == '!') {[qc setTokenType: META];} else if(c == '\\' || c == '/') { - etag =1; [qc setTokenType: ENDTOKEN]; [qc setExtra: @""]; } @@ -1010,7 +1003,6 @@ { //this block is for reading the rest of the message int startflag; startflag = 1; - i = 0; do //while((c = [self getNextChar]) != '}') { @@ -1056,10 +1048,8 @@ -(int) readQChar: (ctQChar *) qc atIndex: (int) where { - int cloc; int ans; - cloc = [self getCharLocation]; [self setCharLocation: where]; ans = [self readnext: qc]; [self setCharLocation: where]; @@ -1188,7 +1178,7 @@ if([[temp objectForKey: @"code"] isEqualToString: mycode] && [[temp objectForKey: @"coder"] isEqualToString: mycoder]) { - if([[temp objectForKey: @"state"] isEqualTo: @"Open"]) + if([[temp objectForKey: @"state"] isEqualToString: @"Open"]) { [temp setObject: @"Closed" forKey: @"state"]; } @@ -1211,7 +1201,7 @@ if([[temp objectForKey: @"code"] isEqualToString: [md objectForKey:@"code"]] && [[temp objectForKey: @"coder"] isEqualToString: [md objectForKey: @"coder"]]) { - if([[temp objectForKey: @"state"] isEqualTo: @"Closed"]) + if([[temp objectForKey: @"state"] isEqualToString: @"Closed"]) { [temp setObject: @"Open" forKey: @"state"]; return; --- gtamsanalyzer.app.orig/Source/stringCategories.m +++ gtamsanalyzer.app/Source/stringCategories.m @@ -127,7 +127,7 @@ @implementation AGRegex (NSEscapeReplace) - (NSString *)replaceWithString:(NSString *)rep inString:(NSString *)str limit:(int)lim range: (NSRange) r { - [self replaceWithString: rep inString: [str substringWithRange: r] limit: lim]; + return [self replaceWithString: rep inString: [str substringWithRange: r] limit: lim]; } - (NSString *)replaceWithStringWithEscape:(NSString *)rep inString:(NSString *)str limit: (int) lim range: (NSRange) r raw: (int) rawflag { --- gtamsanalyzer.app.orig/Source/MWSummaryReport.h +++ gtamsanalyzer.app/Source/MWSummaryReport.h @@ -44,6 +44,6 @@ -(void) setDateFormat: (NSString *) df; -(void) setupTable; - (id) columnID: (NSString *) col row: (int) rowIndex; - +-(NSWindow *) window; @end --- gtamsanalyzer.app.orig/Source/TextFinder.m +++ gtamsanalyzer.app/Source/TextFinder.m @@ -305,7 +305,6 @@ if (text && [text isEditable] && [text shouldChangeTextInRange:[text selectedRange] replacementString:[self getReplaceString]]) { int regexOpt; - int rawflag; if([regexButton state]) { @@ -359,11 +358,7 @@ } else if([regexButton state]) { - NSArray *foundStrings; AGRegex *reg; - AGRegexMatch *match; - NSString *regResult; - NSMutableString *cntResult; int regexOpt, n; NSRange tr, br; NSTextStorage *textStorage = [text textStorage]; @@ -385,7 +380,7 @@ NSRange range, er, strPart; BOOL regexSrch; NSString *textContents = [text string]; - BOOL mlflag; + BOOL mlflag = NO; unsigned textLength; NSMutableAttributedString *temp; NSAutoreleasePool *ap; @@ -394,7 +389,6 @@ NSString *ss; NSMutableString *ss2; int rgxcnt; - unsigned long lastOne; textLength = [textContents length]; er = tr; temp = [[NSMutableAttributedString alloc] init]; @@ -411,7 +405,6 @@ //get the whole range //go forever n = 0; - lastOne = 0; if([regexButton state]) { regexSrch = YES; --- gtamsanalyzer.app.orig/Source/tableBrowser.m +++ gtamsanalyzer.app/Source/tableBrowser.m @@ -99,12 +99,11 @@ -(void)buildCrossReference { - NSMutableArray *myCol, *zoneList; + NSMutableArray *zoneList; NSMutableDictionary *myMatrix; xrefTableColumn *md; ctQChar *q; - myCol = [[NSMutableArray alloc] init]; theDData = myMatrix = [[NSMutableDictionary alloc] init]; zoneList = [[NSMutableArray alloc] init]; //set up the matrix @@ -131,7 +130,8 @@ { //MD is the column for a particular code - if(md = [myMatrix objectForKey: temp]) + if((md = [myMatrix objectForKey: temp])) + { if([md hasName: [q buff]] == YES) { [md incName: [q buff]]; @@ -140,8 +140,10 @@ { [md addName: [q buff] withValue: 1]; } + } - if(md = [myMatrix objectForKey: [q buff]]) + if((md = [myMatrix objectForKey: [q buff]])) + { if([md hasName: temp] == YES) { [md incName: temp]; @@ -150,13 +152,14 @@ { [md addName: temp withValue: 1]; } + } } ENDFORALL; } [zoneList addObject: [[q buff] copy]]; } if([q tokentype] == ENDTOKEN) { - id ss; + id ss = nil; FORALL(zoneList) { if([temp isEqualToString: [q buff]]) @@ -281,7 +284,7 @@ return [hotCodeList objectAtIndex: rowIndex]; } - if(m = [theDData objectForKey: [aTableColumn identifier]]) + if((m = [theDData objectForKey: [aTableColumn identifier]])) { return [NSNumber numberWithInt: [m cntForName: [hotCodeList objectAtIndex: rowIndex]]]; @@ -358,7 +361,7 @@ NSEnumerator *ten; ten = [tc objectEnumerator]; - while(t = [ten nextObject]) + while((t = [ten nextObject])) [theTable removeTableColumn: t]; } -(IBAction) niceClose: (id) Sender --- gtamsanalyzer.app.orig/Source/tamsutils.m +++ gtamsanalyzer.app/Source/tamsutils.m @@ -19,7 +19,8 @@ void DATASTRING(NSMutableData *W, NSString *X) { - NSStringEncoding se, n; + NSStringEncoding se; + int n; n = [gPrefBoss unicharValue]; switch(n) { case 601: @@ -101,7 +102,8 @@ NSCharacterSet *b; b= [NSCharacterSet characterSetWithCharactersInString: @">_"]; - tamsCharSet = [NSMutableCharacterSet alphanumericCharacterSet]; + tamsCharSet = [[[NSCharacterSet alphanumericCharacterSet] mutableCopy] + autorelease]; [tamsCharSet formUnionWithCharacterSet: b]; [tamsCharSet retain]; } @@ -158,7 +160,6 @@ BOOL isCodeNameLegal(NSString *who) { - NSCharacterSet *ss; int i, n; if(!tamsCharSet) @@ -322,7 +323,8 @@ case black: return [NSColor blackColor]; break; - default: ; + default: + return nil; } } @@ -364,7 +366,7 @@ { NSString *dt = [[NSDate date] description]; NSMutableString *ut = [NSMutableString stringWithString: dt]; - [ut replaceOccurrencesOfString: @":" withString: @"--" options: nil range: NSMakeRange(0, [ut length])]; + [ut replaceOccurrencesOfString: @":" withString: @"--" options: 0 range: NSMakeRange(0, [ut length])]; return ut; } NSString *uniqueTmpFileName() --- gtamsanalyzer.app.orig/Source/utils.m +++ gtamsanalyzer.app/Source/utils.m @@ -132,8 +132,6 @@ int nsSubString(NSString *first, NSString *sec, BOOL caseInsensitive) { NSRange rng; - NSRange nulRange = {NSNotFound, 0}; - if(caseInsensitive == YES) { debian/patches/series0000644000000000000000000000006712344415701012036 0ustar use-system-pcre.patch gv-path.patch gcc-warnings.patch debian/compat0000644000000000000000000000000212361422060010360 0ustar 9 debian/control0000644000000000000000000000210512370434630010571 0ustar Source: gtamsanalyzer.app Section: gnustep Priority: optional Maintainer: Debian GNUstep maintainers Uploaders: Yavor Doganov Build-Depends: debhelper (>= 9), gnustep-make (>= 2.6.6-2), libgnustep-gui-dev, libpcre3-dev, imagemagick Vcs-Git: git://anonscm.debian.org/pkg-gnustep/gtamsanalyzer.app.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-gnustep/gtamsanalyzer.app.git Standards-Version: 3.9.5 Homepage: http://tamsys.sourceforge.net/gtams/ Package: gtamsanalyzer.app Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${gnustep:Depends} Recommends: graphviz, gv Description: Text analysis application for GNUstep GTAMS Analyzer is a complete coding and analysis package, it is a port of TAMS Analyzer for MacOS X. GTAMS stands for GNUstep Text Analysis Markup System, it is a convention for identifying themes in text. The software offers a wide range of tools for applying themes to texts and identifying patterns of themes within and between texts. debian/changelog0000644000000000000000000001242112377671014011050 0ustar gtamsanalyzer.app (0.42-7build1) utopic; urgency=medium * Rebuild against libgnustep-gui0.24. -- Colin Watson Thu, 28 Aug 2014 11:16:44 -0700 gtamsanalyzer.app (0.42-7) unstable; urgency=medium * debian/source/format: Switch to 3.0 (quilt). * debian/compat: Set to 9. * debian/README.source: Delete. * debian/control (Build-Depends): Remove dpatch. Require debhelper >= 9 and gnustep-make >= 2.6.6-2. (Description): Reword to make it less confusing. (Vcs-Arch): Replace with Vcs-Git; add Vcs-Browser. (Standards-Version): Claim compliance with 3.9.5 as of this release. * debian/rules: Rewrite for modern dh. Enable hardening. * debian/install: New file. * debian/patches/*: Quiltify/rename and make patches DEP-3 compliant: - 00list -> series - 05_system_pcre.dpatch -> use-system-pcre.patch - 10_gv_path.dpatch -> gv-path.patch * debian/patches/gcc-warnings.patch: New; fix a lot of issues, still way too many remain (Closes: #749756). * debian/preinst: Delete; no longer needed. * debian/docs: Remove ReadMe.rtf and ReleaseNotes.html; a PDF variant of the former is installed and the latter is not very useful. * debian/GTAMSAnalyzer.desktop: Add Keywords field. * debian/copyright: Switch to format 1.0, add more copyright holders/licenses. -- Yavor Doganov Tue, 05 Aug 2014 17:18:32 +0300 gtamsanalyzer.app (0.42-6) unstable; urgency=low * debian/compat: Set to 7. * debian/control (Section): Change to `gnustep'. (Build-Depends): Require debhelper >= 7; remove version constraint for libgnustep-gui-dev. (Depends): Add ${misc:Depends} and ${gnustep:Depends}. Demote gv to... (Recommends): ... and remove abiword | abiword-gnome. (Description): Omit `Free World'; redundant. (Standards-Version): Compliant with 3.8.4 as of this release. (Vcs-Arch): New field. * debian/rules: Include /usr/share/GNUstep/debian/config.mk, export GNUSTEP_MAKEFILES, avoid gs_make usage. (d_app): Define and use for convenience. (OPTFLAG): No longer define; rework noopt handling to be compatible with gnustep-make/2.4.x (Closes: #581945). (install): Do not install the lintian override. Replace dh_clean -k with dh_prep. (binary-arch): Invoke gsdh_gnustep and conditionaly move arch-independent Resources to /usr/share/GNUstep. * debian/lintian-override: Delete. * debian/GTAMSAnalyzer.desktop: Make it valid. * debian/copyright: Use GPLv2+ blurbs; in the absence of a version "or later" is assumed. * debian/preinst: * debian/source/format: * debian/README.source: * debian/watch: New file. -- Yavor Doganov Fri, 28 May 2010 14:10:35 +0300 gtamsanalyzer.app (0.42-5) unstable; urgency=low * debian/control (Maintainer): Package adopted, set to the GNUstep team (Closes: #450891). (Uploaders): Add myself. (Section): Changed to `text', seems more appropriate. (Build-Depends): Bump debhelper to (>= 5) and libgnustep-gui-dev to (>= 0.12). Add dpatch, libpcre3-dev and imagemagick. Drop gnustep-make. (Homepage): Add. * debian/compat: Increase to 5. * debian/dirs: Delete. * debian/docs: Drop ReadMe.txt; has MuckOS EOLs so not viewable with `less' and most of the generic programs. * debian/rules: Include /usr/share/dpatch/dpatch.make. (LDFLAGS): Define. (OPTFLAG): Define conditionally based on the value of DEB_BUILD_OPTIONS. (build): Depend on the `patch' target. (build-stamp): Define GNUSTEP_MAKEFILES and honor the compiler flags. Convert the icon in XPM format. (clean): Rename to `clean-patched'; depend on it and `unpatch'. (clean-patched): Do not source GNUstep.sh and use gs_make. Delete the XPM icon here. (Closes: #450461). (install): Remove dh_installdirs invocation. Install using DESTDIR and GNUSTEP_INSTALLATION_DOMAIN=SYSTEM. Install the .desktop file and icon. Deal with the lintian override here. (binary-arch): Do not create symlink for the app wrapper. * debian/GTAMSAnalyzer.desktop: New file. * debian/menu (section): Changed to `Applications/Text' to comply with the new policy. (icon, longtitle): Add. * debian/patches/05_system_pcre.dpatch: New; use the system PCRE library for security concerns. * debian/patches/10_gv_path.dpatch: New; adjust the path to the `gv' binary. * debian/patches/00list: Create and populate accordingly. -- Yavor Doganov Sun, 25 Nov 2007 17:46:37 +0000 gtamsanalyzer.app (0.42-4) unstable; urgency=low * Fix installdir. -- Gürkan Sengün Wed, 8 Nov 2006 12:54:21 +0100 gtamsanalyzer.app (0.42-3) unstable; urgency=low * Rebuild against latest libgnustep-gui-dev. * Bump standards version. -- Gürkan Sengün Sun, 24 Sep 2006 13:52:14 +0200 gtamsanalyzer.app (0.42-2) unstable; urgency=low * Rebuild against latest libgnustep-gui. (closes: #350424) * Update manual page. * Bump standards version. * Add alternative abiword to recommends. (closes: #298992) -- Gürkan Sengün Tue, 31 Jan 2006 09:06:02 +0100 gtamsanalyzer.app (0.42-1) unstable; urgency=low * Initial Release. (closes: #285376) -- Gürkan Sengün Wed, 8 Dec 2004 21:01:49 +0100 debian/GTAMSAnalyzer.desktop0000644000000000000000000000062612344420507013147 0ustar [Desktop Entry] Name=GTAMSAnalyzer Name[bg]=GTAMSAnalyzer Comment=Qualitative Research Software for GNUstep Comment[bg]=Софтуер за изследване на текст за GNUstep Keywords=text;analysis; Keywords[bg]=текст;анализ; Version=1.0 Type=Application Categories=Utility;TextTools; Icon=/usr/lib/GNUstep/Applications/GTAMSAnalyzer.app/Resources/largeApp.tif Exec=GTAMSAnalyzer debian/manpages0000644000000000000000000000002712343214161010700 0ustar debian/GTAMSAnalyzer.1