2001-02-09 01:52:44 +00:00
|
|
|
//======================================
|
|
|
|
//
|
|
|
|
// QuakeEd Project Management
|
|
|
|
//
|
|
|
|
//======================================
|
|
|
|
|
|
|
|
#import "qedefs.h"
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
#import "Preferences.h"
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-10-14 05:55:21 +00:00
|
|
|
Project * project;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
@implementation Project
|
|
|
|
|
|
|
|
- init
|
|
|
|
{
|
2001-10-14 05:55:21 +00:00
|
|
|
project = self;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================
|
|
|
|
//
|
|
|
|
// Project code
|
|
|
|
//
|
|
|
|
//===========================================================
|
|
|
|
- initVars
|
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSString *s = [[Preferences sharedInstance] objectForKey: ProjectPath];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
_basePath = [s stringByDeletingLastPathComponent];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
_progsPath = [_basePath stringByAppendingPathComponent: EntSubdir];
|
|
|
|
_mapPath = [_basePath stringByAppendingPathComponent: MapSubdir];
|
|
|
|
_finalMapPath = [_basePath stringByAppendingPathComponent: MapSubdir];
|
|
|
|
|
|
|
|
[pBasePathField setStringValue: s]; // in Project Inspector
|
|
|
|
|
|
|
|
if ((s = [projectInfo objectForKey: BSPFullVis])) {
|
|
|
|
_fullVisCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if ((s = [projectInfo objectForKey: BSPFastVis])) {
|
|
|
|
_fastVisCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if ((s = [projectInfo objectForKey: BSPNoVis])) {
|
|
|
|
_noVisCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if ((s = [projectInfo objectForKey: BSPRelight])) {
|
|
|
|
_relightCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if ((s = [projectInfo objectForKey: BSPLeakTest])) {
|
|
|
|
_leakTestCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if ((s = [projectInfo objectForKey: BSPEntities])) {
|
|
|
|
_entitiesCommand = [[[s componentsSeparatedByString: @"@"]
|
|
|
|
componentsJoinedByString: @"\""] retain];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
// Build list of wads
|
|
|
|
wadNames = [projectInfo objectForKey: WadFiles];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
// Build list of maps & descriptions
|
2001-06-03 04:52:36 +00:00
|
|
|
mapNames = [projectInfo objectForKey: MapNames];
|
|
|
|
descriptions = [projectInfo objectForKey: Descriptions];
|
|
|
|
[self changeString: @"_" to: @" " in: descriptions];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
[self initProjectSettings];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) initProjectSettings
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
[ppBasePath setStringValue: _basePath];
|
|
|
|
[ppFullVisField setStringValue: _fullVisCommand];
|
|
|
|
[ppFullVisField setStringValue: _fastVisCommand];
|
|
|
|
[ppNoVisField setStringValue: _noVisCommand];
|
|
|
|
[ppRelightField setStringValue: _relightCommand];
|
|
|
|
[ppLeakTestField setStringValue: _leakTestCommand];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Add text to the BSP Output window
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) addToOutput: (NSString *) string
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSRange range = NSMakeRange([pBSPOutputView textLength], 0);
|
|
|
|
|
|
|
|
[pBSPOutputView replaceCharactersInRange: range withString: string];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
range = NSMakeRange([pBSPOutputView textLength], 0);
|
|
|
|
[pBSPOutputView scrollRangeToVisible: range];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) clearBspOutput: (id) sender
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
[pBSPOutputView selectAll: self];
|
|
|
|
[pBSPOutputView delete: self];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
//- (void) print
|
|
|
|
//{
|
|
|
|
// [pBSPOutputView printPSCode: self];
|
|
|
|
// return;
|
|
|
|
//}
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
- initProject
|
|
|
|
{
|
|
|
|
[self parseProjectFile];
|
2001-06-03 04:52:36 +00:00
|
|
|
if (!projectInfo)
|
2001-02-09 01:52:44 +00:00
|
|
|
return self;
|
2001-06-03 04:52:36 +00:00
|
|
|
|
2001-02-09 01:52:44 +00:00
|
|
|
[self initVars];
|
2001-06-03 04:52:36 +00:00
|
|
|
// [pMapBrowser reuseColumns: YES];
|
|
|
|
[pMapBrowser loadColumnZero];
|
|
|
|
// [ppWadBrowser reuseColumns: YES];
|
|
|
|
[ppWadBrowser loadColumnZero];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
|
|
|
[things_i initEntities];
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Change a character to another in a Storage list of strings
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) changeString: (NSString *) f to: (NSString *) t in: (id) obj
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSMutableArray *newObj = [[NSMutableArray alloc] initWithCapacity: 10];
|
|
|
|
NSEnumerator *enumerator = [obj objectEnumerator];
|
|
|
|
id currentString;
|
|
|
|
|
|
|
|
while ((currentString = [enumerator nextObject])) {
|
|
|
|
[newObj addObject: [[currentString componentsSeparatedByString: f]
|
|
|
|
componentsJoinedByString: t]];
|
|
|
|
[currentString release];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
2001-06-03 04:52:36 +00:00
|
|
|
|
|
|
|
[obj release];
|
|
|
|
obj = newObj;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
// Fill the Maps or Wads browser
|
2001-02-09 01:52:44 +00:00
|
|
|
// (Delegate method - delegated in Interface Builder)
|
2001-06-03 04:52:36 +00:00
|
|
|
- (int) browser: (id) sender fillMatrix: (id) matrix inColumn: (int) column
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSString *name;
|
|
|
|
NSArray *list;
|
|
|
|
NSCell *cell;
|
|
|
|
int max;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (sender == pMapBrowser) {
|
|
|
|
list = mapNames;
|
|
|
|
} else {
|
|
|
|
if (sender == ppWadBrowser) {
|
|
|
|
list = wadNames;
|
|
|
|
} else {
|
|
|
|
list = nil;
|
|
|
|
NSLog (@"Project: Unknown browser to fill");
|
|
|
|
}
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
2001-06-03 04:52:36 +00:00
|
|
|
|
2001-02-09 01:52:44 +00:00
|
|
|
max = [list count];
|
2001-06-03 04:52:36 +00:00
|
|
|
for (i = 0; i < max; i++) {
|
|
|
|
name = [[list objectAtIndex: i] stringValue];
|
2001-02-09 01:52:44 +00:00
|
|
|
[matrix addRow];
|
2001-06-03 04:52:36 +00:00
|
|
|
cell = [matrix cellAtRow: i column: 0];
|
|
|
|
[cell setStringValue: name];
|
|
|
|
// [cell setLeaf: YES];
|
|
|
|
// [cell setLoaded: YES];
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Clicked on a map name or description!
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) mapWasClicked: (id) sender
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSString *fname;
|
2001-02-09 01:52:44 +00:00
|
|
|
id matrix;
|
|
|
|
int row;
|
|
|
|
id panel;
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
matrix = [sender matrixInColumn: 0];
|
2001-02-09 01:52:44 +00:00
|
|
|
row = [matrix selectedRow];
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
fname = [_mapPath stringByAppendingPathComponent:
|
|
|
|
[[mapNames objectAtIndex: row]
|
|
|
|
stringByAppendingPathExtension: @"map"
|
|
|
|
]
|
|
|
|
];
|
|
|
|
|
|
|
|
panel = NSGetInformationalAlertPanel (@"Loading...",
|
|
|
|
@"Loading map. Please wait...", nil, nil, nil);
|
|
|
|
[panel orderFront: self];
|
|
|
|
[quakeed_i doOpen: fname];
|
|
|
|
[panel performClose: self];
|
|
|
|
NSReleaseAlertPanel (panel);
|
|
|
|
|
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) setTextureWad: (NSString *) wadFile
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
int i, c;
|
|
|
|
NSString *name;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
NSLog (@"loading %s", wadFile);
|
|
|
|
|
|
|
|
// set the row in the settings inspector wad browser
|
|
|
|
c = [wadNames count];
|
|
|
|
for (i = 0; i < c; i++) {
|
|
|
|
name = [[wadNames objectAtIndex: i] stringValue];
|
|
|
|
if ([name isEqualToString: wadFile]) {
|
|
|
|
[ppWadBrowser selectCellAtRow: i column: 0];
|
2001-02-09 01:52:44 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
// update the texture inspector
|
|
|
|
[texturepalette_i initPaletteFromWadfile: wadFile];
|
|
|
|
[[map_i objectAtIndex: 0] setObject: wadFile forKey: @"wad"];
|
2001-02-09 01:52:44 +00:00
|
|
|
// [inspcontrol_i changeInspectorTo:i_textures];
|
|
|
|
|
|
|
|
[quakeed_i updateAll];
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Clicked on a wad name
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) wadWasClicked: (id) sender
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
id matrix;
|
|
|
|
int row;
|
|
|
|
NSString *name;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
matrix = [sender matrixInColumn: 0];
|
2001-02-09 01:52:44 +00:00
|
|
|
row = [matrix selectedRow];
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
name = [wadNames objectAtIndex: row];
|
2001-02-09 01:52:44 +00:00
|
|
|
[self setTextureWad: name];
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Read in the <name>.QE_Project file
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) parseProjectFile
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSString *path;
|
|
|
|
int rtn;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
if (!(path = [[Preferences sharedInstance] objectForKey: ProjectPath])) {
|
|
|
|
rtn = NSRunAlertPanel (@"Project Error",
|
|
|
|
@"A default project has not been found.\n"
|
|
|
|
, @"Open Project", nil, nil);
|
2001-02-09 01:52:44 +00:00
|
|
|
if ([self openProject] == nil)
|
|
|
|
while (1) // can't run without a project
|
2001-06-03 04:52:36 +00:00
|
|
|
[NSApp terminate: self];
|
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
[self openProjectWithFile: path];
|
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Loads and parses a project file
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (void) openProjectWithFile: (NSString *) path
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
[_projectPath release];
|
|
|
|
_projectPath = path;
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
[projectInfo release];
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
projectInfo = [NSMutableDictionary dictionaryWithContentsOfFile: path];
|
|
|
|
|
|
|
|
return;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Open a project file
|
2001-06-03 04:52:36 +00:00
|
|
|
- (id) openProject
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
int result;
|
|
|
|
NSArray *fileTypes = [NSArray arrayWithObject: @"forge"];
|
|
|
|
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
|
|
|
|
|
|
|
[openPanel setAllowsMultipleSelection: NO];
|
|
|
|
[openPanel setCanChooseDirectories: NO];
|
|
|
|
|
|
|
|
result = [openPanel runModalForTypes: fileTypes];
|
|
|
|
if (result == NSOKButton) {
|
|
|
|
NSArray *filenames = [[openPanel filenames] autorelease];
|
|
|
|
NSString *directory = [[openPanel directory] autorelease];
|
|
|
|
NSString *path = [directory stringByAppendingPathComponent: [filenames objectAtIndex: 0]];
|
|
|
|
|
|
|
|
[self openProjectWithFile: path];
|
|
|
|
|
|
|
|
return self;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
2001-06-03 04:52:36 +00:00
|
|
|
|
2001-02-09 01:52:44 +00:00
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
// Search for a string in an array
|
2001-02-09 01:52:44 +00:00
|
|
|
//
|
2001-06-03 04:52:36 +00:00
|
|
|
- (BOOL) searchForString: (NSString *) str in: (NSArray *) obj
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
NSEnumerator *enumerator = [obj objectEnumerator];
|
|
|
|
id name;
|
|
|
|
|
|
|
|
while ((name = [enumerator nextObject])) {
|
|
|
|
if ([[name stringValue] isEqualToString: str])
|
|
|
|
return YES;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
2001-06-03 04:52:36 +00:00
|
|
|
return NO;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) currentProject
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _projectPath;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) mapDirectory
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _mapPath;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) finalMapDirectory
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _finalMapPath;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) progDirectory
|
|
|
|
{
|
|
|
|
return _progsPath;
|
|
|
|
}
|
2001-02-09 01:52:44 +00:00
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) wad8
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _wad8 ? _wad8 : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) wad9
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _wad9 ? _wad9 : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) wad0
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _wad0 ? _wad0 : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) fullVisCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _fullVisCommand ? _fullVisCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) fastVisCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _fastVisCommand ? _fastVisCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) noVisCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _noVisCommand ? _noVisCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) relightCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _relightCommand ? _relightCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) leakTestCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _leakTestCommand ? _leakTestCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
2001-06-03 04:52:36 +00:00
|
|
|
- (NSString *) entitiesCommand
|
2001-02-09 01:52:44 +00:00
|
|
|
{
|
2001-06-03 04:52:36 +00:00
|
|
|
return _entitiesCommand ? _entitiesCommand : nil;
|
2001-02-09 01:52:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================
|
|
|
|
// C Functions
|
|
|
|
//====================================================
|
|
|
|
|
|
|
|
//
|
|
|
|
// Change a character to a different char in a string
|
|
|
|
//
|
|
|
|
void changeString(char cf,char ct,char *string)
|
|
|
|
{
|
|
|
|
int j;
|
|
|
|
|
|
|
|
for (j = 0;j < strlen(string);j++)
|
|
|
|
if (string[j] == cf)
|
|
|
|
string[j] = ct;
|
|
|
|
}
|
|
|
|
|
|
|
|
|