#endif
#undef uint
-//bool eString_PathInsidePath(char * to, char * path)
-bool eString_PathInsideOf(char * path, char * of)
-{
- if(!path[0] || !of[0])
- return false; // What to do here? Ever used?
- else
- {
- char ofPart[MAX_FILENAME], ofRest[MAX_LOCATION];
- char pathPart[MAX_FILENAME], pathRest[MAX_LOCATION];
- strcpy(ofRest, of);
- strcpy(pathRest, path);
- for(; ofRest[0] && pathRest[0];)
- {
- SplitDirectory(ofRest, ofPart, ofRest);
- SplitDirectory(pathRest, pathPart, pathRest);
- if(fstrcmp(pathPart, ofPart))
- return false;
- }
- if(!ofRest[0] && !pathRest[0]) // paths are identical - should return false or true? (changed to false)
- return false;
- else if(!pathRest[0]) // not inside of, it's the other way around
- return false;
- return true;
- }
-}
public char * StripQuotes2(char * string, char * output)
{
else
{
// FIXED: This is how it should have been... Source locations are only for files not in project
- // if(eString_PathInsideOf(absolutePath, ide.workspace.projectDir))
+ // if(IsPathInsideOf(absolutePath, ide.workspace.projectDir))
// MakePathRelative(absolutePath, ide.workspace.projectDir, relativePath);
bool result = false;
if(prj)
String srcDir = null;
for(dir : ide.workspace.sourceDirs)
{
- if(eString_PathInsideOf(absolutePath, dir))
+ if(IsPathInsideOf(absolutePath, dir))
{
MakePathRelative(absoluteFilePath, dir, relativePath);
srcDir = dir;
if(SourceDirDialog(title, directory, null, sourceDir))
{
- if(eString_PathInsideOf(absolutePath, sourceDir))
+ if(IsPathInsideOf(absolutePath, sourceDir))
{
AddSourceDir(sourceDir);
MakePathRelative(absoluteFilePath, sourceDir, relativePath);
{
if(gdbHandle)
{
- char string[MAX_F_STRING];
+ // TODO: Improve this limit
+ static char string[MAX_F_STRING*3];
va_list args;
va_start(args, format);
if(ide.gdbDialog)
ide.gdbDialog.AddCommand(string);
#endif
- gdbHandle.Printf("%s\n", string);
+ strcat(string,"\n");
+ gdbHandle.Puts(string);
if(focus)
Process_ShowWindows(targetProcessId);
}
else
{
-#ifdef BSD
- // TODO: Fix on BSD
- fd = 0;
-#else
- fd = fileno(fifoFile.input);
-#endif
+ fd = fileno((FILE *)fifoFile.input);
//fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
}
}