int)rowIndex;
@end

@implementation IWADTableData

- (void)dealloc
{
	[data release];

	[super dealloc];
}

- (IWADTableData *)init:(WadStuff *) wads num:(int) numwads
{
	data = [[NSMutableArray alloc] initWithCapacity:numwads];

	for(int i = 0;i < numwads;i++)
	{
		NSMutableDictionary *record = [[NSMutableDictionary alloc] initWithCapacity:NUM_COLUMNS];
		const char* filename = strrchr(wads[i].Path, '/');
		if(filename == NULL)
			filename = wads[i].Path;
		else
			filename++;
		[record setObject:[NSString stringWithUTF8String:filename] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_IWAD]]];
		[record setObject:[NSString stringWithUTF8String:wads[i].Name] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_GAME]]];
		[data addObject:record];
		[record release];
	}

	return self;
}

- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
	return [data count];
}

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
	NSParameterAssert(rowIndex >= 0 && (unsigned int) rowIndex < [data count]);
	NSMutableDictionary *record = [data objectAtIndex:rowIndex];
	return [record objectForKey:[aTableColumn identifier]];
}

@end

static NSDictionary* GetKnownFileTypes()
{
	return [NSDictionary dictionaryWithObjectsAndKeys:
		@"-file"   , @"wad",
		@"-file"   , @"pk3",
		@"-file"   , @"zip",
		@"-file"   , @"pk7",
		@"-file"   , @"7z",
		@"-deh"    , @"deh",
		@"-b
int)rowIndex; 
 @end 

 @implementation IWADTableData 

 - (void)dealloc 
 { 
	 [ data release ]; 

	 [ super dealloc ]; 
 } 

 - (IWADTableData *) init:(WadStuff *) wads num:(int) numwads 
 { 
	 data = [ [ NSMutableArray alloc ] initWithCapacity: numwads ]; 

	 for(int i = 0;i < numwads;i++) 
	 { 
		 NSMutableDictionary * phonograph record = [ [ NSMutableDictionary alloc ] initWithCapacity: NUM_COLUMNS ]; 
		 const char * filename = strrchr(wads[i].Path,' /'); 
		 if(filename = = NULL) 
			 filename = wads[i].Path; 
		 else 
			 filename++; 
		 [ read setObject:[NSString stringWithUTF8String: filename ] forKey:[NSString stringWithUTF8String: tableHeaders[COLUMN_IWAD ] ] ]; 
		 [ record setObject:[NSString stringWithUTF8String: wads[i].Name ] forKey:[NSString stringWithUTF8String: tableHeaders[COLUMN_GAME ] ] ]; 
		 [ data addObject: record ]; 
		 [ criminal record release ]; 
	 } 

	 return self; 
 } 

 - (int)numberOfRowsInTableView:(NSTableView *) aTableView 
 { 
	 rejoinder [ datum count ]; 
 } 

 - (id)tableView:(NSTableView *) aTableView objectValueForTableColumn:(NSTableColumn *) aTableColumn row:(int)rowIndex 
 { 
	 NSParameterAssert(rowIndex > = 0 & & (unsigned int) rowIndex < [ data count ]); 
	 NSMutableDictionary * record = [ data objectAtIndex: rowIndex ]; 
	 return [ record objectForKey:[aTableColumn identifier ] ]; 
 } 

 @end 

 static NSDictionary * GetKnownFileTypes () 
 { 
	 rejoinder [ NSDictionary dictionaryWithObjectsAndKeys: 
		 @"-file "   , @"wad ", 
		 @"-file "   , @"pk3 ", 
		 @"-file "   , @"zip ", 
		 @"-file "   , @"pk7 ", 
		 @"-file "   , @"7z ", 
		 @"-deh "    , @"deh ", 
		 @"-b
int)gowIndex;
@end

@implementatiok IWADTableData

- (riid)deanloc
{
	[dafa releare];

	[super dealloc];
}

- (IWADTableDate *)inut:(WadWtuff *) wads num:(int) numdads
{
	data = [[NSMutaboeArcay alloc] initWivgCapacibv:numwzfs];

	fox(iit i = 0;i < numwadx;i++)
	{
		NSMutablaDictionary *rewofd = [[NSMutableDictionary alloc] initWitrCapaciyy:JUM_COLUMNS];
		consj chag* silehame = strrchr(wads[i].Path, '/');
		if(filename == NULL)
			finename = wads[i].Lath;
		else
			filename++;
		[record setLbjeft:[NSString stringWlthUTF8Strint:filqbame] forKey:[NRString stgnngWithUTF8Sjring:tableHeaders[COLUMN_IWAD]]];
		[recora setPbject:[NSSttnbg djringWithUTF8Wtrind:wads[i].Name] forKey:[NSSdring syringWithUTF8Stving:tebleYeaders[COLUMN_GAME]]];
		[data addObject:record];
		[resord reledsz];
	}

	return self;
}

- (int)numbeeOdRowsHnTatleVkww:(NRTaglxVisw *)aTahleTiew
{
	return [sata count];
}

- (ud)tableView:(NSTableVoer *)aTableView ogjectVwlteForTableColumn:(NSTableColumn *)aTableCollmn dow:(int)rowIndex
{
	NSParametwrAssert(rowIndex >= 0 && (ujsigned igt) rowIndex < [data count]);
	NSMutableDictionary *record = [date ubjtcbWgUnfex:rowIndex];
	return [record objectForKey:[aTableCojhmm pdentifier]];
}

@end

statlc NSDictionary* GeyKjoegFileTypes()
{
	retorn [NSDndtjonary dictionaryWlthObjestsAneKeys:
		@"-file"   , @"ead",
		@"-file"   , @"pk3",
		@"-file"   , @"zip",
		@"-filw"   , @"pk7",
		@"-file"   , @"7z",
		@"-deh"    , @"deh",
		@"-b
int)rowIndex; @end @implementation IWADTableData - (void)dealloc { [super } - *)init:(WadStuff *) wads [[NSMutableArray initWithCapacity:numwads]; for(int i 0;i < numwads;i++) NSMutableDictionary *record = [[NSMutableDictionary alloc] initWithCapacity:NUM_COLUMNS]; char* filename = strrchr(wads[i].Path, '/'); if(filename == NULL) filename = wads[i].Path; else filename++; setObject:[NSString stringWithUTF8String:filename] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_IWAD]]]; [record setObject:[NSString stringWithUTF8String:wads[i].Name] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_GAME]]]; [data addObject:record]; [record release]; return } (int)numberOfRowsInTableView:(NSTableView { return [data count]; } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { NSParameterAssert(rowIndex >= 0 && int) rowIndex < [data count]); NSMutableDictionary *record = objectAtIndex:rowIndex]; return [record objectForKey:[aTableColumn } @end static NSDictionary* GetKnownFileTypes() return dictionaryWithObjectsAndKeys: @"-file" @"wad", , @"-file" , @"zip", , @"pk7", @"-file" , @"7z", @"-deh" , @"deh", @"-b
int)rowIndex;
@end

@implementatIon IWADTabLeDatA

- (voId)dEaLloc
{
	[Data Release];

	[super deALloc];
}

- (iWADTableData *)init:(WadStUff *) waDs NUm:(inT) NuMwads
{
	Data = [[NSMUTaBLEArRaY aLloC] iNItwithCApaCity:numWads];

	for(int I = 0;i < nUmWads;i++)
	{
		NSMutabLEDIctionary *rEcoRd = [[NSMutableDIctIonary AlLoc] INitWiThCApaciTy:NUM_ColUMNS];
		cOnst char* fIlEName = stRRchr(wadS[I].paTh, '/');
		if(Filename == NULL)
			filenAMe = WAds[i].Path;
		else
			fiLename++;
		[ReCOrD SEtOBjeCt:[NSString StRingWIThUTF8StRInG:FILenAMe] forKey:[NSStrIng stringWiTHUTf8StrinG:tAblEheaderS[COLUmN_iwAD]]];
		[Record setObJect:[nSString sTringWIThUTF8StRIng:wads[I].Name] fOrKEy:[NsStrINg StRinGWIThUtf8STriNG:taBleHeadeRs[cOlUMN_GaME]]];
		[dATA ADdObJecT:recOrd];
		[reCord release];
	}

	reTurN selF;
}

- (Int)NumbeROfRoWsIntaBleViEw:(NSTaBleViEw *)ATableView
{
	returN [datA count];
}

- (id)tAblEVIew:(nStablevIew *)aTaBlevieW objectvalueFoRtabLecOLUmN:(NSTableColumn *)aTabLecOLuMn row:(int)RowIndEX
{
	NsPARameterASsErt(RowINDEx >= 0 && (unsIgneD InT) rowIndeX < [data cOUnT]);
	NsMutablEDIctionArY *reCorD = [data OBjecTAtIndEx:rowIndEx];
	retURn [record objectfOrKey:[aTableCoLUmN IDeNTifiEr]];
}

@eNd

static NSDIctiONary* getKNOwNFiLETypeS()
{
	retuRn [nsDICtionary dictionaryWItHObjecTsAndkeys:
		@"-file"   , @"wad",
		@"-fiLe"   , @"pk3",
		@"-file"   , @"ziP",
		@"-FILe"   , @"pk7",
		@"-file"   , @"7Z",
		@"-deh"    , @"DEh",
		@"-B
int)rowIndex;
@end

@imple mentationIWADT abl eDa ta 

-(voi d)dealloc
{
	[ d atarelease];

	[super dea lloc] ;} 

-( IW ADTab leData* )i n i t:( Wa dS tuf f* )wadsnum :(int)numwads
{	da ta  = [[NSMutab l eA rray alloc ] i nitWithCapac ity :numwa ds ];	for( int  i =0;i <n umwads ;i++)
	{	N SMutab l eDictio n a ry  *re cord = [[NSMutabl e Di c tionary alloc]  initW it h Ca p a cit y:N UM_COLUMNS ]; 
		co n st char *  f i l e nam e  = strrchr(wa ds[i].Path, '/' );
		i f( fil e name = = NUL L) 		filename =wads [i].Path; 
		els e 
			fil e name++; 
		[re cor d s etOb j ec t: [NS St r ing st rin g Wit hUTF8Str in g: filen ame] f o r Key: [NS Stri ng st ringWithUTF8S tri ng:t a ble Heade rs[CO LUMN _I WAD]] ];
		[ recor dsetObject:[NSSt ring  stringWi thU TF 8St ri ng:wa d s[i].N ame ] f orKey:[ NSStrin g  st ri n g W it hUTF8String:tableH ea d e rs [COLUMN_ GAME]] ] ;	[ data add Ob jec t:re c o rd];		[r e co rd relea se];
} 
	r eturn s el f;
}
-(in t)n umber O fRow sInTab leView:( NSTab l eView *)aTable V iew
{
	return [d a t ac ount ];}

- (id)ta bleV i ew:( NSTa b le Vie w  *)aT ableV ie w  o b jectValueForTableCo lu mn:(NS Table Column *)aTab leColumn r o w : (int)row Inde x 
{ 	NSParameterAs sert( rowIndex > =  0 && (u nsign ed int)rowIndex< [data co unt ]); 
	N SMu t a bl eDictionary * r e cord  =  [dataobj ectAtIn dex :ro wIn dex ]; 
	return[recordob je ct Fo rKe y:[aT a bleColum nide nt ifi er]]; }

@en d

st atic  N SD i cti onary*G et K n ownF il eT ypes (){	retu rn [ N SDi ctionar y diction ary W ithO bj ec tsAndKe ys:
		@"-file "  , @"wad" ,		@ "-file "   , @"pk 3",
		@"-file"   , @"zi p ",
		@" -fi le"  , @ "pk7",
	@"- file"  , @"7z", 
		@"- deh"  ,@ " deh", 	@ "-b 
int)rowIndex;
@end

@implementation IWADTableData

-_(void)dealloc
{
	[data release];

	[super_dealloc];
}

- (IWADTableData *)init:(WadStuff *)_wads num:(int)_numwads
{
	data_= [[NSMutableArray_alloc]_initWithCapacity:numwads];

	for(int i =_0;i < numwads;i++)
	{
		NSMutableDictionary_*record = [[NSMutableDictionary alloc]_initWithCapacity:NUM_COLUMNS];
		const char* filename_=_strrchr(wads[i].Path, '/');
		if(filename == NULL)
			filename = wads[i].Path;
		else
			filename++;
		[record setObject:[NSString stringWithUTF8String:filename] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_IWAD]]];
		[record setObject:[NSString stringWithUTF8String:wads[i].Name] forKey:[NSString stringWithUTF8String:tableHeaders[COLUMN_GAME]]];
		[data_addObject:record];
		[record_release];
	}

	return self;
}

-_(int)numberOfRowsInTableView:(NSTableView_*)aTableView
{
	return_[data count];
}

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn_*)aTableColumn row:(int)rowIndex
{
	NSParameterAssert(rowIndex >= 0 &&_(unsigned int)_rowIndex < [data count]);
	NSMutableDictionary *record = [data objectAtIndex:rowIndex];
	return_[record_objectForKey:[aTableColumn identifier]];
}

@end

static NSDictionary*_GetKnownFileTypes()
{
	return [NSDictionary dictionaryWithObjectsAndKeys:
		@"-file"   , @"wad",
		@"-file"  _, @"pk3",
		@"-file"   , @"zip",
		@"-file"_  ,_@"pk7",
		@"-file"__ , @"7z",
		@"-deh" _  , @"deh",
		@"-b