Skip to content

Instantly share code, notes, and snippets.

View jerstlouis's full-sized avatar

Jerome St-Louis jerstlouis

View GitHub Profile
import "ecere"
struct __ecereClosure1DataStruct
{
int * x;
};
static int __ecereClosure1(struct __ecereClosure1DataStruct * __ecereClosure1Data, int y)
{
return (*__ecereClosure1Data->x) + y;
import "ecere"
int TestFunction(int x, int y)
{
PrintLn("x = ", x, ", y = ", y);
}
void TakeSomething(int test(int x, int y))
{
test(10, 20);
diff --git a/ecere/src/gui/controls/EditBox.ec b/ecere/src/gui/controls/EditBox.ec
index 46818b3..df7a4ea 100644
--- a/ecere/src/gui/controls/EditBox.ec
+++ b/ecere/src/gui/controls/EditBox.ec
@@ -1516,6 +1516,7 @@ private:
// ****** SYNTAX HIGHLIGHTING ******
bool lastWasStar = false;
bool firstWord = true;
+ bool wasInMultiLine = false;
if(!escaped) inPrep = false;
#include <stdio.h>
typedef enum { false, true } bool;
typedef struct
{
bool a:1;
} TestStruct;
int main()
property Container<int> foo
{
set
{
BuiltInContainer<int> * array = (void *)value;
// Use array->count and array->data
}
get
{
int count;
import "ecere"
struct SS
{
int x;
};
void Test()
{
struct SS *p;
void Test()
{
struct SS
{
uint a;
union
{
uint b;
uint c;
}x;
struct SS
{
uint a;
union
{
uint b;
uint c;
}x;
};
public define Phi = 1.6180339887;
bool IsPerfectSquare(uint64 number)
{
double root = sqrt(number);
uint64 square = (uint64)root * (uint64)root;
return square == number;
}
struct Matrix2x2
void TestFibonacci()
{
Fibonacci fibonacci { };
Iterator<uint64> i { fibonacci };
int c;
//while(i.Next())
while(i.Prev())
{
PrintLn(i.data);
}