This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with GCC 12.2.0 with -O2: | |
// warning: ‘strcpy’ offset 0 is out of the bounds [0, 0] [-Warray-bounds] | |
// no warning without -O2 | |
extern char * strcpy(char * , const char * ); | |
struct Inst { int bla; }; | |
struct Class { int offset; }; | |
static struct Class * classFoo; // No problem without static here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Code generated from eC source file: GuiApplication.ec */ | |
#if defined(_WIN32) | |
#define __runtimePlatform 1 | |
#elif defined(__APPLE__) | |
#define __runtimePlatform 3 | |
#else | |
#define __runtimePlatform 2 | |
#endif | |
#if defined(__GNUC__) || defined(__clang__) | |
#if defined(__clang__) && defined(__WIN32__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public import "ecere" | |
public class CubeTris : Object | |
{ | |
public: | |
bool Create(const DisplaySystem displaySystem) | |
{ | |
bool result = false; | |
if(this) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "ecere" | |
class MyCube : Cube | |
{ | |
int extraStuff; | |
} | |
Map<String, Array<MyCube>> cubesMap { }; | |
class CubesMapTestForm : Window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/default.cf b/default.cf | |
index fc8cba400..62ac27520 100644 | |
--- a/default.cf | |
+++ b/default.cf | |
@@ -80,13 +80,13 @@ export DYLD_LIBRARY_PATH = $(_CF_DIR)obj/$(HOST_PLATFORM)$(COMPILER_SUFFIX)$(DEB | |
endif | |
# HARD CODED PLATFORM-SPECIFIC OPTIONS | |
-LDFLAGS +=$(if $(LINUX_TARGET), -Wl$(comma)--no-undefined,) | |
-LDFLAGS +=$(if $(OSX_TARGET), -framework cocoa -framework OpenGL -L/usr/local/opt/openssl/lib,) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MODULE_NAME "HelloCube" | |
#include "ecere.hpp" | |
class HelloCube : public Window | |
{ | |
public: | |
Cube cube; | |
Light light; | |
Camera camera; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21c21 | |
< return __x<<8 | __x>>8; | |
--- | |
> return (__x<<8) | (__x>>8); | |
26c26 | |
< return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; | |
--- | |
> return (__x>>24) | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | (__x<<24); | |
31c31 | |
< return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename TPT> inline CPPClass & ensureTemplatized(CPPClass & _class, const char * name) | |
{ | |
if(!_class.impl || !_class.impl->templateClass) | |
{ | |
char type[1024]; | |
strcpy(type, "CPP"); | |
strcat(type, name); | |
strcat(type, "<"); | |
{ | |
const char * t1 = TypeName<TPT>::get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "ecere" | |
class Form1 : Window | |
{ | |
caption = $"Form1"; | |
background = formColor; | |
borderStyle = sizable; | |
hasMaximize = true; | |
hasMinimize = true; | |
hasClose = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "ecere" | |
class Form1 : Window | |
{ | |
caption = $"Form1"; | |
background = formColor; | |
borderStyle = sizable; | |
hasMaximize = true; | |
hasMinimize = true; | |
hasClose = true; |
NewerOlder