static OldList defines { };
static OldList imports { };
static NameSpace globalData;
-static OldList excludedSymbols { offset = (uint)&((Symbol)0).left };
+static OldList excludedSymbols { offset = (uint)(uintptr)&((Symbol)0).left };
static bool readOnly;
define app = (GuiApplication)__thisModule.application;
private:
-static void Dummy()
+static __attribute__((unused)) void Dummy()
{
-int a;
-a.OnGetString(null, null, null);
+ int a;
+ a.OnGetString(null, null, null);
}
static bool editing = true;
strcat(string, "</b>");
}
}
- else
- {
- printf("");
- }
}
if(printFunction)
strcat(string, ")");
break;
default:
- printf("");
+ break;
}
if(type.name && printName && type.kind != functionType && (type.kind != pointerType || type.type.kind != functionType))
{
for(funcType = type; funcType && (funcType.kind == pointerType || funcType.kind == arrayType); funcType = funcType.type);
if(funcType && funcType.kind == functionType && type != funcType)
{
- char typeString[1024];
Type param;
DocPrintType(funcType.returnType, string, false, fullName);
void Generate(File f)
{
- char string[1024];
char nsName[1024], temp[1024];
NameSpace * ns;
BTNamedLink link;
- int64 tag;
nsName[0] = 0;
ns = nameSpace;
if(nsName[0])
{
f.Printf("<FONT FACE=\"Arial\" SIZE=\"6\">%s</FONT><br><br>\n", nsName );
- tag = (int64)nameSpace;
f.Printf($"Module: <a href=\"api://%p\" style=\"text-decoration: none;\">%s</a><br>\n", (module && module.name) ? module : null, (!module || !module.name || !strcmp(nsName, "ecere::com")) ? "ecereCOM" : module.name);
}
else
- {
- tag = (int64)(!module || !module.name || !strcmp(nsName, "ecere::com") ? null : module);
f.Printf($"<FONT FACE=\"Arial\" SIZE=\"6\">Module %s</FONT><br>\n", (!module || !module.name || !strcmp(nsName, "ecere::com")) ? "ecereCOM" : module.name);
- }
nsName[0] = 0;
ns = nameSpace->parent;
char string[1024];
Method method;
Property prop;
- DataMember member;
char nsName[1024], temp[1024];
NameSpace * ns = cl.nameSpace;
Module module = cl.module;
if((prop.memberAccess == publicAccess || (prop.memberAccess == privateAccess && showPrivate)) && prop.name)
{
char * desc = ReadDoc(module, classDoc, cl, conversion, prop);
- DataRow mRow;
const char * name;
Type type = ProcessTypeString(prop.name, false);
name = RSearchString(prop.name, "::", strlen(prop.name), true, false);
DataRow functionsRow = null, definesRow = null;
APIPage page;
- char fileName[MAX_LOCATION];
-
strcpy(nsName, parentName ? parentName : "");
if(nameSpace->name)
{
page = parentRow.GetData(null);
}
+ for(ns = (NameSpace *)mainNameSpace.nameSpaces.first; ns; ns = (NameSpace *)((BTNode)ns).next)
{
- bool first = true;
-
- for(ns = (NameSpace *)mainNameSpace.nameSpaces.first; ns; ns = (NameSpace *)((BTNode)ns).next)
- {
- NameSpace * comNS = (comNameSpace != null) ? (NameSpace *)comNameSpace.nameSpaces.FindString(ns->name) : null;
- AddNameSpace(row, module, ns, comNS, nsName, showPrivate);
- }
- if(comNameSpace != null)
+ NameSpace * comNS = (comNameSpace != null) ? (NameSpace *)comNameSpace.nameSpaces.FindString(ns->name) : null;
+ AddNameSpace(row, module, ns, comNS, nsName, showPrivate);
+ }
+ if(comNameSpace != null)
+ {
+ for(ns = (NameSpace *)comNameSpace.nameSpaces.first; ns; ns = (NameSpace *)((BTNode)ns).next)
{
- for(ns = (NameSpace *)comNameSpace.nameSpaces.first; ns; ns = (NameSpace *)((BTNode)ns).next)
+ if(!mainNameSpace.nameSpaces.FindString(ns->name))
{
- if(!mainNameSpace.nameSpaces.FindString(ns->name))
- {
- AddNameSpace(row, module, ns, null, nsName, showPrivate);
- }
+ AddNameSpace(row, module, ns, null, nsName, showPrivate);
}
}
}
+
if(mainNameSpace.classes.first || (comNameSpace && comNameSpace.classes.first))
{
for(nameSpace = mainNameSpace ; nameSpace; nameSpace = (nameSpace == mainNameSpace) ? comNameSpace : null)
static void AddClass(DataRow parentRow, Module module, Class cl, char * nsName, bool showPrivate)
{
- char fileName[MAX_LOCATION];
- char string[1024];
Method method;
Property prop;
- DataMember member;
- Type param;
DataRow row;
DataRow methodsRow = null, virtualsRow = null, eventsRow = null;
DataRow propertiesRow = null, membersRow = null, conversionsRow = null, enumRow = null;
default:
{
char hex[20];
- sprintf(hex, "%p", row.tag);
+ sprintf(hex, "%p", (void *)(uintptr)row.tag);
view.GoToAnchor(hex);
}
}
char archiveFile[MAX_LOCATION];
char fileName[MAX_FILENAME];
char directory[MAX_LOCATION];
- char * location;
+ const char * location;
Archive archive = null;
if(SplitArchivePath(editString, archiveFile, &location))
{
if(block.type == BR && (!block.prev || !block.next || block.next.type != TEXT))
{
Block newBlock { type = TEXT, parent = block.parent, font = block.parent.font };
- int tw = 0, th = 0;
+ int th = 0;
display.FontExtent(block.font.font, " ", 1, null, &th);
if(!block.prev)
{
}
{
- int tw = 0, th = 0;
+ int th = 0;
int textPos = 0;
int sx = textBlock.startX, sy = textBlock.startY;
char * text = textBlock.text;
case Key { down, shift = true }:
case down:
{
- int tw = 0, th = 0;
+ int th = 0;
int textPos = 0;
int sx = textBlock.startX, sy = textBlock.startY;
char * text = textBlock.text;
break;
case enter:
{
- int tw = 0, th = 0;
+ int th = 0;
Block block;
Block newBlock;
int startY, startX;
Block block { type = BR, parent = parent, font = font };
Block newBlock { type = TEXT, parent = parent, font = font };
int startY = textBlock.startY, startX = textBlock.startX;
- int tw = 0, th = 0;
+ int th = 0;
display.FontExtent(textBlock.font.font, " ", 1, null, &th);
textBlock.parent.subBlocks.Insert(textBlock, block);
while(textPos < textBlock.textLen)
{
- int startPos = textPos;
int width = 0;
int x = 0;
bool lineComplete = false;
PathCat(programFilesDir, "ECERE SDK\\doc");
settings.docDir = programFilesDir;
}
- else if(homeDrive && homeDrive[0])
+ else if(homeDrive[0])
{
PathCat(homeDrive, "ECERE SDK\\doc");
settings.docDir = homeDrive;
}
- else if(winDir && winDir[0])
+ else if(winDir[0])
{
PathCat(winDir, "..\\ECERE SDK\\doc");
settings.docDir = winDir;
void ParseDirList(char * string, Container<String> list)
{
int c;
- byte * tokens[256];
+ char * tokens[256];
int numTokens = TokenizeWith(string, sizeof(tokens) / sizeof(byte *), tokens, ";", false);
list.Free();
for(c = 0; c < numTokens; c++)
//((GuiApplication)__thisModule).Unlock();
- if(path && strstr(path, "http://") == path)
+ if(strstr(path, "http://") == path)
{
HTTPFile httpFile {};
file = httpFile;
static OldList objectRequests;
-static void WriteBlock(File f, Block block)
+/*static void WriteBlock(File f, Block block)
{
static int indent = 0;
Block child;
WriteBlock(f, child);
indent --;
}
-}
+}*/
static void ComputeImageSize(Block block)
{
if(surface)
{
int maxH = height - BOTTOM_MARGIN;
- int h = 0;
if(html.defaultFont.font)
surface.TextFont(html.defaultFont.font.font);
newH = ComputeLine(surface, block, textPos, &nextBlock, &nextTextPos, ¢ered, &w, maxW, maxH - y, RenderFlags { lineW = true, width = true }, 0, null, null, &changeLine, true, y, LEFT_MARGIN);
if(changeLine)
- {
y += newH;
- h = 0;
- }
block = nextBlock;
textPos = nextTextPos;
block.bitmap = entry.bitmap;
else
{
- if(path && (strstr(path, "http://") == path || strstr(path, "https://") == path))
+ if(strstr(path, "http://") == path || strstr(path, "https://") == path)
{
RequestLink request;
objectsMutex.Wait();
OldList leftObjects { };
OldList rightObjects { };
AlignedObject object, nextObject;
- int h = 0;
Surface surface = display.GetSurface(0,0,null);
if(surface)
left - scroll.x, right - scroll.x);
if(changeLine)
- {
y += newH;
- h = 0;
- }
block = nextBlock;
textPos = nextTextPos;
}
void OpenFile(File f, char * firstReferer)
{
char referer[MAX_LOCATION] = "";
- char relocation[MAX_LOCATION];
bool opened = false;
clickedLink = null;
Font font;
AlignedObject object, nextObject;
- int h = 0;
surface.SetBackground(html.background);
if(html.background.a < 255)
surface.TextFont(font);
- //h = Max(h, newH);
RenderLine(this, surface, x - scroll.x, y - scroll.y, maxW, newH, block, textPos, nextBlock, nextTextPos, left - scroll.x, right - scroll.x);
if(changeLine)
- {
- // y += h;
y += newH;
- h = 0;
- }
block = nextBlock;
textPos = nextTextPos;
}
- //y += h;
}
void OnVScroll(ScrollBarAction action, int position, Key key)
OldList leftObjects { };
OldList rightObjects { };
AlignedObject object, nextObject;
- int h = 0;
Surface surface = display.GetSurface(0,0,null);
if(surface)
}
if(changeLine)
- {
y += newH;
- h = 0;
- }
+
block = nextBlock;
textPos = nextTextPos;
}
delete entryPtr;
}
- while(child = subBlocks.first)
+ while((child = subBlocks.first))
{
subBlocks.Remove(child);
delete child;
return GetKeyWordEx(input, keyWord, maxSize, true, false);
}
-static char * GetString(char * string, char * what, int count)
+/*static char * GetString(char * string, char * what, int count)
{
int wc, sc;
return null;
}
return string + sc;
-}
+}*/
#include <stdio.h>
// Parse entire file
while(!f.Eof() && block)
{
- byte ch = 0;
+ char ch = 0;
f.Getc(&ch);
#ifdef _DEBUG
}
else if(!strcmpi(keyWord, "maxlength"))
{
- int maxlength;
+ //int maxlength;
GetKeyWord(&string, keyWord, sizeof(keyWord));
- maxlength = atoi(keyWord);
+ //maxlength = atoi(keyWord);
}
else if(!strcmpi(keyWord, "value"))
{
{
int textPos = startTextPos;
Block block = startBlock;
- bool lineComplete = false;
int startSel, endSel;
Block startSelBlock = null, endSelBlock = null;
if(browser.textBlock != browser.selBlock || browser.curPosition != browser.selPosition)
break;
case TABLE:
RenderTable(browser, surface, x, y, w, h, left, right, block);
- lineComplete = true;
block = NextBlockUp(surface, block, null, RenderFlags { render = true });
textPos = 0;
break;
bool result = false;
int textPos = startTextPos;
Block block = startBlock;
- bool lineComplete = false;
for(;!result;)
{
break;
case TABLE:
result = PickTable(browser, surface, x, y, w, h, left, right, block, pickX, pickY, pickBlock, pickTextPos);
- lineComplete = true;
block = NextBlockUp(surface, block, null, RenderFlags { render = true });
textPos = 0;
break;
{
int textPos = startTextPos;
Block block = startBlock;
- bool lineComplete = false;
for(;;)
{
block.window.size.w, block.window.size.h);
//block.window.visible = false;
x += block.window.size.w;
- if(block.inputType == text)
- {
- printf("");
- }
}
break;
}
case IMAGE:
{
int bw = block.pWidth ? (w * block.pWidth / 100) : block.w;
- int bh = block.pHeight ? (h * block.pHeight / 100) : block.h;
- int dx, dy;
+ //int bh = block.pHeight ? (h * block.pHeight / 100) : block.h;
+ int dx;//, dy;
switch(block.halign)
{
break;
}
+ /*
switch(block.valign)
{
case bottom: dy = y + h - bh; break;
case top: dy = y; break;
case middle: dy = y + (h - bh) / 2; break;
}
+ */
x += bw;
break;
break;
case TABLE:
PositionTable(browser, surface, x, y, w, h, left, right, block);
- lineComplete = true;
block = NextBlockUp(surface, block, null, RenderFlags { render = true });
textPos = 0;
break;
if(cell.type == TD)
{
int c;
- bool centered = false;
+ int centered = 0;
int minW = 0, lineW = 0;
Block block;
int textPos = 0;
{
if(cell.type == TD)
{
- bool centered = false;
+ int centered = 0;
Block block;
int textPos = 0;
int c;
static void RenderCell(HTMLView browser, Surface surface, Block cell, int cellX, int y)
{
- bool centered = false;
+ int centered = 0;
Block block = cell;
int textPos = 0;
Block row = cell.parent;
int pickX, int pickY, Block* pickBlock, int * pickTextPos)
{
bool result = false;
- bool centered = false;
+ int centered = 0;
Block block = cell;
int textPos = 0;
Block row = cell.parent;
static void PositionCell(HTMLView browser, Surface surface, Block cell, int cellX, int y)
{
- bool centered = false;
+ int centered = 0;
Block block = cell;
int textPos = 0;
Block row = cell.parent;
void OnLoad(GlobalSettingsData data)
{
- IDESettings settings = (IDESettings)data;
#ifndef MAKEFILE_GENERATOR
+ IDESettings settings = (IDESettings)data;
globalSettingsDialog.ideSettings = settings;
ide.UpdateRecentMenus();
ide.UpdateCompilerConfigs(true);
{
#ifndef MAKEFILE_GENERATOR
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isActive;
+#else
+ return false;
#endif
}
{
#ifndef MAKEFILE_GENERATOR
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isPrepared;
+#else
+ return false;
#endif
}
numErrors++;
}
else if(compilingEC == 1 || (objDir && objDir == moduleName))
- continue;
+ {
+ bool skip = false;
+
+ // Filter out these warnings caused by eC generated C code:
+
+ // Declaration ordering bugs -- Awaiting topo sort implementation
+ if(strstr(line, "declared inside parameter list")) skip = true;
+ else if(strstr(line, "its scope is only this definition")) skip = true;
+ else if(strstr(line, "note: expected 'struct ") || strstr(line, "note: expected ‘struct "))
+ {
+ #define STRUCT_A "'struct "
+ #define STRUCT_B "‘struct "
+ char * struct1, * struct2, ch1, ch2;
+ struct1 = strstr(line, STRUCT_A);
+ if(struct1) { struct1 += sizeof(STRUCT_A)-1; } else { struct1 = strstr(line, STRUCT_B); struct1 += sizeof(STRUCT_B)-1; };
+
+ struct2 = strstr(struct1, STRUCT_A);
+ if(struct2) { struct2 += sizeof(STRUCT_A)-1; } else { struct2 = strstr(struct1, STRUCT_B); if(struct2) struct2 += sizeof(STRUCT_B)-1; };
+
+ if(struct1 && struct2)
+ {
+ while(ch1 = *(struct1++), ch2 = *(struct2++), ch1 && ch2 && (ch1 == '_' || isalnum(ch1)) && (ch2 == '_' || isalnum(ch2)));
+ if(ch1 == ch2)
+ skip = true;
+ }
+ }
+ // Pointers warnings (eC should already warn about relevant problems, more forgiving for function pointers, should cast in generated code)
+ else if((strstr(line, "note: expected '") || strstr(line, "note: expected ‘")) && strstr(line, "(*)")) skip = true;
+ else if(strstr(line, "expected 'void **") || strstr(line, "expected ‘void **")) skip = true;
+ else if(strstr(line, "from incompatible pointer type")) skip = true;
+ else if(strstr(line, "comparison of distinct pointer types lacks a cast")) skip = true;
+
+ // Things being defined for potential use -- Should mark as unused
+ else if(strstr(line, "unused variable") && (strstr(line, "'__") || strstr(line, "‘__") || strstr(line, "'class'") || strstr(line, "‘class’"))) skip = true;
+ else if(strstr(line, "defined but not used") && strstr(line, "__ecereProp")) skip = true;
+
+ // For preprocessed code from objidl.h (MinGW-w64 headers)
+ else if(strstr(line, "declaration does not declare anything")) skip = true;
+
+ // Location information that could apply to ignored warnings
+ else if(strstr(line, "In function '") || strstr(line, "In function ‘") ) skip = true;
+ else if(strstr(line, "At top level")) skip = true;
+ else if(strstr(line, "(near initialization for '") || strstr(line, "(near initialization for ‘")) skip = true;
+
+ if(skip) continue;
+ numWarnings++;
+ }
else if(strstr(line, "warning:"))
{
numWarnings++;
return project;
}
+#ifndef MAKEFILE_GENERATOR
static GccVersionInfo GetGccVersionInfo(CompilerConfig compiler, const String compilerCommand)
{
GccVersionInfo result = unknown;
return result;
}
};
+#endif
}
*/
-static bool LoadTerrain(Terrain terrain, char * fileName, Angle lat)
+static bool LoadTerrain(Terrain terrain, const char * fileName, Angle lat)
{
bool result = false;
File f = FileOpen(fileName, read);
}
}
-static char * names[7] = { "Adenine", "Cytosine", "Guanine", "Thymine", "Phosphate", "Desoxyribose", "Hydrogene" };
+static const char * names[7] = { "Adenine", "Cytosine", "Guanine", "Thymine", "Phosphate", "Desoxyribose", "Hydrogene" };
public class DNAModel : Object
{
int baseHeight;
int baseDepth;
int desoxyriboseWidth;
- char * textureFile;
+ const char * textureFile;
public:
bool Create(DisplaySystem displaySystem)
void ProcessKeyword(char * keyWord)
{
- NamedLink nl;
+ NamedLink64 nl;
EnumClassData tagData = class(MyTag).data;
for(nl = tagData.values.first; nl; nl = nl.next)
{