"Folder" : "extern",
"Files" : [
{
- "FileName" : "../../../sdk/extras/gui/controls/ToolBar.ec",
+ "FileName" : "$(ECERE_SDK_SRC)/extras/gui/controls/ToolBar.ec",
"Options" : {
"ExcludeFromBuild" : true
}
},
- "../../../sdk/extras/gui/controls/SearchBox.ec"
+ "$(ECERE_SDK_SRC)/extras/gui/controls/SearchBox.ec"
],
"Configurations" : [
{
ListBox source;
private:
-
+
ListBox list
{
parent = this, borderStyle = deep, hasVertScroll = true, hasHorzScroll = true;
}
// what if a child of some parent was added before that parent, should check to remove
// or is it imposible to get the backwards order from GetMultiSelection
-
+
//for(branch = (ExplorerFileBranch)row.tag; branch; branch = branch.parent)
// branches.Add(branch);
}
parent.DuplicateChildren(true, true, root, list);
}
}
-
+
*/
/*
copies.count = branches.count;
-
+
{
bool added = true;
uint b;
openArgsStartAt = 2;
else if(!strcmpi(argv[1], "find") && argc > 2)
{
- char * unquoted;
if(argv[2][0] == '\"')
- StripQuotes(argv[2], unquoted);
+ {
+ findWhat = new char[strlen(argv[2])+1];
+ StripQuotes(argv[2], findWhat);
+ }
else
- unquoted = argv[2];
- findWhat = CopyString(unquoted);
+ findWhat = CopyString(argv[2]);
if(argc > 3)
{
if(!strcmpi(argv[3], "in") && argc > 4)
}
else
searchPath = ""; // same
- }
+ }
else if(!strcmpi(argv[1], "search") && argc > 2)
searchPath = argv[2];
else if(!strcmpi(argv[1], "compare") && argc > 2)
if(argc == 3)
{
goPath = ""; // current dir
- comparedPaths.Add(goPath);
+ comparedPaths.Add(CopyString((const char *)goPath)); // TODO: Review whether this gets freed?
}
for(c = 2; c < argc; c++)
{
- char * s;
+ const char * s;
goPath = argv[c];
s = goPath;
if(s)
explorerWnd.Create();
explorerWnd.location = goPath;//explorerWnd.GoTo(goPath, false, false);
}
+ if(openArgsStartAt == -1)
+ break;
}
}
else if(searchPath)
explorerWnd.Create();
explorerWnd.view.columnsCompareStyle = true;
explorerWnd.comparedLocations = comparedPaths;
+ comparedPaths = null;
// delete comparedPaths;
}
+ if(comparedPaths)
+ {
+ comparedPaths.Free();
+ delete comparedPaths;
+ }
return true;
}
}
{
char path[MAX_LOCATION];
- property char *
+ property const char *
{
set
{
- char * unquoted;
GetWorkingDir(path, MAX_LOCATION);
if(value[0] == '\"')
+ {
+ char * unquoted = new char[strlen(value) + 1];
StripQuotes(value, unquoted);
+ PathCat(path, unquoted);
+ delete unquoted;
+ }
else
- unquoted = value;
- PathCat(path, unquoted);
+ PathCat(path, value);
if(!FileExists(path))
{
// this incomplete functionality is not quite at it's place in this class
StripLastDirectory(path, path);
if(FileExists(path))
{
- // TODO: message location does not exist,
+ // TODO: message location does not exist,
// this higher location exists though
// go there?
break;
}
if(!len)
{
- // TODO: message location does not exist,
+ // TODO: message location does not exist,
// unable to select alternate location
}
path[0] = '\0';
searchInSubDirs, searchStart, searchStop,
hasHeader
};
-static char * iconNames[Icon::enumSize] =
+static const char * iconNames[Icon::enumSize] =
{
"<:ecere>emblems/unreadable.png", /* missing */
int treeSplit;
int searchSplit;
-
+
ExplorerToolId lastViewId;
*/
menu = Menu { };
-
+
Menu fileMenu { menu, "File", f };
Menu windowMenu { menu, "Window", w };
MenuItem itemNewWindow { windowMenu, "New Window", n, NotifySelect = NewWindow_NotifySelect };
IconToolButton goUp { toolBar, this, icon = goUp, hotKey = { up, alt = true }, toolTip = "Go to Parent Folder";
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
- char * path = view.path;
+ const char * path = view.path;
char * newPath = new char[strlen(path)+1];
StripLastDirectory(path, newPath);
if(!newPath[0])
{
//((FileSystemCacheIterator)fileSystemIterator).cache = testCache;
//((FileSystemIterator)fileSystemIterator)
+ return true;
}
bool NotifyNodeOpen(FileSystemBox box, FileSystemBoxSelection selection)
//PrintLn(node.name);
if(box.selection.nodes.count == 1)
- itemString = node.name;
+ itemString = CopyString(node.name);
else
itemString = PrintString(box.selection.nodes.count, " items");
text = PrintString("Open ", itemString);
if(CreateNewFileDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
ew.Refresh();
}
+ return true;
}
//void NewFolder()
if(CreateDirectoryDialog { /*master = */ew/*, parent = parent*/, currentDirectory = selection ? ew.view.selection.node.path : ew.view.path }.Modal() == ok )
ew.Refresh();
}
+ return true;
}
//void GoTo(char * location/*, bool viewIsAtLocation, bool treeIsAtLocation*/)
- property char * location
+ property const char * location
{
set
{
}
return true;
}*/
-
+
/*bool ViewNotifyItemOpen(ExplorerView view, ExplorerFileItem item)
{
ExplorerFileBranch branch = tree.branch;
if(item.type.isFolderType)
{
ExplorerFileBranch child;
-
+
if(!branch.loaded || !branch.childrenLoaded)
BranchLoad(branch, tree.tree);
for(child = branch.children.first; child; child = child.next)
if(!strcmp(child.name, item.name))
break;
-
+
if(child)
{
if(branch.row.collapsed)
NotifyItemOpen = ViewNotifyItemOpen;
};
lastViewId = viewList;
-
+
tree.Load();
view.Load(tree.root);
}*/
void SearchStart()
{
char text[2048];
-
+
searchThread.active = true;
searchThread.optionSubdirs = options.subdirs.checked;
strcpy(searchThread.location, location.GetText());
strcpy(searchThread.nameSearch, findName.GetText());
strcpy(searchThread.contentSearch, findTextContent.GetText());
-
+
actions.startStop.text = "Stop Search";
actions.clear.disabled = false;
view.results.Clear();
view.browser.text = "Browser";
sprintf(text, "Search Results (Searching %s)", location.GetText());
view.results.text = text;
-
+
searchThread.Create();
}
void SearchTerminate()
{
char text[1024];
-
+
if(searchThread.terminate)
sprintf(text, "Search Results (%d item(s) found), Search was aborted.", searchThread.matchCount);
else
view.results.text = text;
sprintf(text, "Browser (%d item(s) searched)", searchThread.count);
view.browser.text = text;
-
+
actions.startStop.text = "Start Search";
}
class ExplorerSearchViewTree : ExplorerSearchView
{
-
+
DataField resultsFieldPath { "char *" };
ListBox results
{
OldList selection;
Link item;
-
+
listBox.GetMultiSelection(selection);
-
+
for(item = selection.first; item; item = item.next)
{
char path[MAX_LOCATION];
}
bool Lists_NotifyDoubleClick(ListBox listBox, int x, int y, Modifiers mods)
- {
+ {
if(listBox.currentRow)
{
char path[MAX_LOCATION];
public:
- property char * currentDirectory
+ property const char * currentDirectory
{
set
{
PathCat(currentDirectory, value);
FileFixCase(currentDirectory);
}
- get { return (char *)currentDirectory; }
+ get { return currentDirectory; }
};
private:
CreateNewFileDialog()
{
- FileNameType c;
+ //FileNameType c;
GetWorkingDir(currentDirectory, MAX_DIRECTORY);
FileFixCase(currentDirectory);
#ifdef __WIN32__
static char * rootName = "Entire Computer";
-static char * msNetwork = "Microsoft Windows Network";
+static const char * msNetwork = "Microsoft Windows Network";
#else
-static char * rootName = "File System";
+static const char * rootName = "File System";
#endif
private:
define guiApp = (GuiApplication)((__thisModule).application);
define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
-void MessageBoxTodo(char * message)
+void MessageBoxTodo(const char * message)
{
PrintLn("MessageBoxTodo(char * message) -- ", message);
MessageBox { type = ok, text = "MessageBoxTodo(char * message)", contents = message }.Modal();
}
-static char * fileIconNames[] =
+static const char * fileIconNames[] =
{
"<:ecere>mimeTypes/file.png", /* none */
};
define countOfCompIconNames = 6;
-static char * compIconNames[] =
+static const char * compIconNames[] =
{
/*
"<:ede>a.png",
virtual bool Window::NotifyNodeMenu(FileSystemBox box, Menu menu, FileSystemBoxSelection selection);
virtual bool Window::NotifyIteratorInit(FileSystemBox box, FileSystemIterator fileSystemIterator);
- property char * path
+ property const char * path
{
set
{
{
set
{
- delete comparedPaths;
+ if(comparedPaths)
+ {
+ comparedPaths.Free();
+ delete comparedPaths;
+ }
if(value && value.count)
comparedPaths = value;
if(locationBox)
delete map;
}
- FileSystemNode SelectLocation(char * location)
+ FileSystemNode SelectLocation(const char * location)
{
int c;
char * temp;
for(c = steps.count - 1; c >= 0; c--)
{
- char * t = steps[c];
+ //char * t = steps[c];
node = Find(steps[c], node);
if(!node)
break;
bool MenuOpen(MenuItem selection, Modifiers mods)
{
OpenNode();
+ return true;
}
bool MenuReplaceListItemByContainingDir(MenuItem selection, Modifiers mods)
~FileSystemBox()
{
+ if(comparedPaths)
+ {
+ comparedPaths.Free();
+ delete comparedPaths;
+ }
delete extensions;
delete path;
}
{
if(row)
{
- FileSystemNode node = (FileSystemNode)row.tag;
+ //FileSystemNode node = (FileSystemNode)row.tag;
}
return true;
}
{
if(row)
{
- FileSystemNode node = (FileSystemNode)row.tag;
+ //FileSystemNode node = (FileSystemNode)row.tag;
}
return true;
}
{
if(row)
{
- FileSystemNode node = (FileSystemNode)row.tag;
+ //FileSystemNode node = (FileSystemNode)row.tag;
}
return true;
}
bool NotifyKeyDown(ListBox listBox, DataRow row, Key key, unichar ch)
{
- bool result;
+ //bool result = false;
if((SmartKey)key == enter)
- result = OpenNode();
+ /*result = */OpenNode();
#if 0
else if((SmartKey)key == f2)
- result = RenameNode();
+ /*result = */RenameNode();
#endif
else if((SmartKey)key == f2)
{
FileSystemNode node = selection.node;
node.row.Edit(nameField);
}
- else
- result = true;
+ //else
+ //result = true;
return true;
}
};
int wWnd = fsb.show.clientSize.w;
int hWnd = fsb.show.clientSize.h;
- int wList = 0;//fsb.list.size.w + fsb.split.size.w;
+ //int wList = 0;//fsb.list.size.w + fsb.split.size.w;
- float scale = Min((float)(wWnd - 10) / wBmp, (float)(hWnd - 10) / hBmp);
+ //float scale = Min((float)(wWnd - 10) / wBmp, (float)(hWnd - 10) / hBmp);
- int wDraw = (int)(wBmp * scale);
- int hDraw = (int)(hBmp * scale);
+ //int wDraw = (int)(wBmp * scale);
+ //int hDraw = (int)(hBmp * scale);
#ifndef __linux__
surface.Filter(fsb.bitmap, (wWnd - wDraw) / 2, (hWnd - hDraw) / 2, 0, 0, wDraw, hDraw, wBmp, hBmp);
surface.Area(0, 0, fsb.clientSize.w - 1, fsb.clientSize.h - 1);
}
}
- }
+ };
bool OpenNode()
{
{
bool isRoot = !strcmp(path, "/");
char name[MAX_LOCATION];
- FileSystemNode parent;
- FileSystemNode node;
- FileListing listing { path, extensions = extensions };
+ //FileSystemNode parent;
+ //FileSystemNode node;
+ //FileListing listing { path, extensions = extensions };
if(!isRoot)
GetLastDirectory(path, name);
}
}
- bool ListIterator_OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+ bool ListIterator_OnObject(const char * name, const char * path, FileStats stats, bool isRootObject)
{
ProcessListItem(name, path, stats, false);
return false;
//void ListIterator_OnLeavingDirectory(char * path) { }
- void ProcessListItem(char * name, char * path, FileStats stats, bool isListItem)
+ void ProcessListItem(const char * name, const char * path, FileStats stats, bool isListItem)
{
if((!bits.foldersOnly && !bits.filesOnly) || (bits.foldersOnly && stats.attribs.isDirectory) || (bits.filesOnly && stats.attribs.isFile))
{
FileListing listing { path, extensions = extensions };
while(listing.Find())
{
- char * test;
+ //char * test;
FileSystemNode child = null;
if((!bits.foldersOnly && !bits.filesOnly) ||
(bits.foldersOnly && listing.stats.attribs.isDirectory) ||
(bits.filesOnly && listing.stats.attribs.isFile))
child = MakeAndAddToTreeFileSystemNodeFromFileListing(listing, parent);
if(child)
+ {
added = true;
- test = child.name;
- if(!test)
- PrintLn("error");
+ /*
+ test = child.name;
+ if(!test)
+ PrintLn("error");
+ */
+ }
}
if(!added)
added = true;
void LoadComparedList()
{
- int c, cmp/*, smallest*/, icon;//, equalCount;
+ int c/*, cmp*/ /*, smallest*/, icon;//, equalCount;
int count = comparedPaths ? comparedPaths.count : 0;
//bool allDone = false;
bool not;
void AddNode(FileSystemNode node)
{
DataRow row = list.AddRow();
- row.tag = (int)node;
+ row.tag = (intptr)node;
node.row = row;
incref node;
row.SetData(nameField, node);
(bits.filesOnly && listing.stats.attribs.isFile)))*/
{
bool textFileLinesStyle = false;
- char * test = listing.name;
+ const char * test = listing.name;
if(!test)
PrintLn("error");
result = MakeFileSystemNode(listing.stats, listing.name, listing.path, false, bits.previewPictures, false, displaySystem);
node.indent = addTo.indent + 1;
addTo.children.Add(node);
}
- row.tag = (int)node;
+ row.tag = (intptr)node;
node.row = row;
row.SetData(null, node);
if(bits.pathColumn)
}
public:
- /*//LinkElement<FileSystemNode> link;
+ /* LinkElement<FileSystemNode> link;
FileSystemNode parent;
FileSystemNodeType type;
property bool isListItem { set { bits.isListItem = value; } get { return bits.isListItem; } };
- property char * path
+ property const char * path
{
set { delete path; if(value && value[0]) path = CopyString(value); }
get { return path; } isset { return path && path[0]; }
}
- property char * name
+ property const char * name
{
set { delete name; if(value && value[0]) name = CopyString(value); }
get { return name; } isset { return name && name[0]; }
set { delete extension; if(value && value[0]) extension = CopyString(value); }
get { return extension; } isset { return extension && extension[0]; }
}
- property char * label
+ property const char * label
{
set { delete label; if(value && value[0]) label = CopyString(value); }
get { return label; } isset { return label && label[0]; }
}
- property char * info
+ property const char * info
{
set { delete info; if(value && value[0]) info = CopyString(value); }
get { return info; } isset { return info && info[0]; }
void OnDisplay(Surface surface, int x, int y, int width, FileSystemBox fsb, Alignment alignment, DataDisplayFlags displayFlags)
{
//int indentSize = (displayFlags.dropBox) ? 0 : 10;
- int indent = 16;
+ //int indent = 16;
int xStart;
int len;
int w, h;
//}
#endif
- bool OnGetDataFromString(char * string)
+ bool OnGetDataFromString(const char * string)
{
#if 0
if(string && *string)
return false;
}
- char * OnGetString(char * tempString, FileSystemToolWindow fileSysToolWnd, bool * needClass)
+ const char * OnGetString(char * tempString, void * unused /*FileSystemToolWindow fileSysToolWnd*/, bool * needClass)
{
return name ? name : "";
}
const bool pathAddName,
const bool previewPicture,
const bool isListItem,
- const DisplaySystem displaySystem)
+ /*const */DisplaySystem displaySystem)
{
int len = strlen(name);
char info[MAX_LOCATION];
if(pathAddName)
{
- bool isFile = stats.attribs.isFile;
- bool isFolder = stats.attribs.isDirectory;
+ //bool isFile = stats.attribs.isFile;
+ //bool isFolder = stats.attribs.isDirectory;
char full[MAX_LOCATION];
strcpy(full, path);
PathCat(full, name);
const bool previewPicture,
const int cmpIcon,
const bool cmpNot,
- const Array<int> exists,
- const DisplaySystem displaySystem)
+ /*const */Array<int> exists,
+ /*const */DisplaySystem displaySystem)
{
FileSystemNode node = MakeFileSystemNode(stats, name, path, pathAddName, previewPicture, false, displaySystem);
if(node)
iterateStartPath = true;
// COMPILER TOFIX: this will not compile (error: method class must be derived from class) -- bool Whatever/*FileSystemCache*/::OnFolder(...)
- bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+ bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path, FileStats stats, bool isRootObject)
{
bool result = true;
FileSystemCache cache = this.cache;
- uint dev = stats.dev;
- uint inode = stats.inode;
+ //uint dev = stats.dev;
+ //uint inode = stats.inode;
char * p;
FSCacheObject parent = isRootObject ? null : cache.normalParentStack.lastIterator.data;
FSCacheObject o { parent, name = CopyString(isRootObject ? path : name), stats = stats };
- FileStats s;
+ //FileStats s;
if(isRootObject)
{
// TODO see if we can find a parent for it
}
cache.objects.Add(o);
#if _DEBUG
+ /*
if(cache.objects.count % 1000 == 0)
PrintLn(path, " ----- ", cache.objects.count / 1000, " --------- ", dev);
- FileGetStatsLink(path, s);
+ */
+ //FileGetStatsLink(path, s);
+ /*
if(s.inode != inode)
{
PrintLn(s.inode);
PrintLn(inode);
- PrintLn("crap");
}
+ */
p = o.GetPath();
if(strcmp(p, path))
{
int c;
- PrintLn("damn");
PrintLn(p);
for(c = 0; c < cache.normalParentStack.count; c++)
{
PrintLn(p);
}
PrintLn(path);
- PrintLn("bad");
}
delete p;
#endif
+ /*
if(dev && inode && cache.bits.indexInodes)
{
FileSystemDeviceCache devCache = cache.deviceCaches[dev];
inodes.Add(o);
}
}
+ */
return result;
}
- void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(char * path)
+ void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(const char * path)
{
FileSystemCache cache = this.cache;
FSCacheObject o = cache.objects.lastIterator.data;
cache.normalParentStack.Add(o);
}
- void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(char * path)
+ void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(const char * path)
{
FileSystemCache cache = this.cache;
cache.normalParentStack.lastIterator.Remove();
void Special(char * path/*, Map<String, bool> linksPaths*//*Map<uint, Map<uint, bool>> devsInodesDone*/, DummyFileSystemCacheWindow dummyWindow)
{
FileSystemCacheIterator fsci { owner = dummyWindow, cache = this, iterateStartPath = true;
- bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+ bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path,
+ FileStats stats, bool isRootObject)
{
+ /*
+
uint dev = stats.dev;
uint inode = stats.inode;
FileSystemCache cache = this.cache;
}
else
PrintLn("no dev/inode");
+ */
return true;
}
};
}
}
-Array<String> GetPathDirNamesArray(char * path)
+Array<String> GetPathDirNamesArray(const char * path)
{
Array<String> names;
if(path && path[0])
{
- char * p = path;
+ const char * p = path;
char rest[MAX_LOCATION];
char name[MAX_FILENAME];
names = { };
{
char name[MAX_LOCATION] = "";
FileStats stats;
- if(followLinks)
+ //if(followLinks)
FileGetStats(startPath, stats);
- else
- FileGetStatsLink(startPath, stats);
+ /*else
+ FileGetStatsLink(startPath, stats);*/
GetLastDirectory(startPath, name);
listDirEntries = OnObject(owner, name, startPath, stats, true);
if(listDirEntries)
{
if(frame.listing.Find())
{
- FileStats stats = followLinks ? frame.listing.stats : frame.listing.lstats;
+ FileStats stats = /*followLinks ? */frame.listing.stats /*: frame.listing.lstats*/;
listDirEntries = OnObject(owner, frame.listing.name, frame.listing.path, stats, !iterateStartPath && stack.count == 1);
if(stats.attribs.isDirectory)
{
bool iterateStartPath;
virtual bool Iterate(char * startPath, bool followLinks);
- virtual bool any_object::OnObject(/*any_object data, */char * name, char * path, FileStats stats, bool isRootObject);
- virtual void any_object::OnEnteringDirectory(/*any_object data, */char * path);
- virtual void any_object::OnLeavingDirectory(/*any_object data, */char * path);
+ virtual bool any_object::OnObject(/*any_object data, */const char * name, const char * path, FileStats stats, bool isRootObject);
+ virtual void any_object::OnEnteringDirectory(/*any_object data, */const char * path);
+ virtual void any_object::OnLeavingDirectory(/*any_object data, */const char * path);
private:
}
// TODO: implement threaded iteration somehow....
+/*
static class IteratorThread : Thread
{
void Temp()
{
- //listing = FileListing { dir, extensions = filter.extensions }; // there should be a sorted = true/false
+ //listing = FileListing { dir, extensions = filter.extensions }; // there should be a sorted = true/false
}
}
+*/
int tag;
char path[MAX_LOCATION];
FileListing listing;
-
+
bool branched;
//DataRow result;
//DataRow browse;
terminate = false;
}
- virtual bool Window::NotifyUpdateSearchLocation(FileSystemSearch search, char * location);
+ virtual bool Window::NotifyUpdateSearchLocation(FileSystemSearch search, const char * location);
virtual bool Window::NotifySearchSortResults(FileSystemSearch search);
virtual bool Window::NotifySearchSortBrowser(FileSystemSearch search);
virtual bool Window::NotifySearchTerminated(FileSystemSearch search);
- bool SearchFileContent(String path)
+ bool SearchFileContent(const String path)
{
bool match = false;
File file = FileOpen(path, read);
find = SearchString(buffer, start, contentSearch, optionContentMatchCase, optionContentMatchWord);
// todo add a maximum line length possibility as param
- for(bstart = start;
- bstart < readCount && newLine && (!find || newLine < find);
+ for(bstart = start;
+ bstart < readCount && newLine && (!find || newLine < find);
bstart += (newLine - &buffer[bstart]) / sizeof(char))
{
newLine = strstr(&buffer[bstart], "\n");
find = SearchString(buffer, start, contentSearch, optionContentMatchCase, optionContentMatchWord);
file.Seek(seekBack, current);
}
- match = (bool)find;
+ match = find != null;
}
delete file;
}
return match;
}
-
- // I wonder if this is optimized at the c level to be compiled inline
+
+ // I wonder if this is optimized at the c level to be compiled inline
// and to use in-place in-stack memory for both the return value and the parameters
// if not, c should be more optimized...
// would the const have any impact on optimization?
// \\Nateus\data\ is not remote, etc...
// How to?
FileStats stats;
-
+
terminate = false;
count = 0;
matchCount = 0;
-
+
hasNameSearch = (strlen(nameSearch) != 0);
hasSizeSearch = false; // this is temporary
hasContentSearch = (strlen(contentSearch) != 0);
listLines = true;
lines = OldList { };
-
+
//SearchDir(location);
FileGetStats(location, stats);
strcpy(stack[0].path, location);
- stack[0].listing = FileListing { stack[0].path }; // there should be a sorted = true/false
+ stack[0].listing = FileListing { stack[0].path }; // there should be a sorted = true/false
//fsb.list.Clear();
// Binary Search sorting...
}
guiApp.Unlock();
}
-
+
for(frame = 0; frame >= 0 && !terminate; )
{
guiApp.Lock();
if(stack[frame].listing.Find())
{
count++;
-
+
//match = (strcmp(stack[frame].listing.name, nameSearch) == 0);
//match = (stack[frame].listing.name[0] == nameSearch[0]);
//match = (bool)strstr(stack[frame].listing.name, nameSearch);
-
+
if(hasNameSearch)
- match = (bool)SearchString(stack[frame].listing.name, 0, nameSearch, optionNameMatchCase, optionNameMatchWord);
+ match = SearchString(stack[frame].listing.name, 0, nameSearch, optionNameMatchCase, optionNameMatchWord) != null;
else
match = true;