/programs/cmm/examples/Tupfile.lua |
---|
0,0 → 1,7 |
if tup.getconfig("NO_CMM") ~= "" then return end |
if tup.getconfig("LANG") == "ru" |
then C_LANG = "LANG_RUS" |
else C_LANG = "LANG_ENG" -- this includes default case without config |
end |
tup.rule("example.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "example.com") |
tup.rule("collections.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "collections.com") |
/programs/cmm/examples/collections.c |
---|
0,0 → 1,17 |
#define MEMSIZE 4096*10 |
#include "../lib/io.h" |
#include "../lib/collection.h" |
void main() |
{ |
collection s; |
io.run("/sys/develop/board", ""); |
s.init(4096); |
s.add("lorem"); |
s.add("ipsum"); |
s.add("1234566"); |
debugln(s.get(0)); |
debugln(s.get(1)); |
debugln(s.get(2)); |
} |
/programs/cmm/examples/compile.bat |
---|
0,0 → 1,11 |
c-- example.c |
c-- collections.c |
@del @@example |
@del @@collections |
@rename example.com @@example |
@rename collections.com @@collections |
@del warning.txt |
@pause |
/programs/cmm/examples/example.c |
---|
0,0 → 1,46 |
#define MEMSIZE 0x3E80 |
#include "../lib/io.h" |
void main() |
{ |
int id, key, i; |
dword file; |
io.dir.load(0,DIR_ONLYREAL); |
loop() |
{ |
switch(WaitEvent()) |
{ |
case evButton: |
id=GetButtonID(); |
if (id==1) ExitProcess(); |
break; |
case evKey: |
key = GetKey(); |
if (key==013){ //Enter |
draw_window(); |
} |
break; |
case evReDraw: |
draw_window(); |
break; |
} |
} |
} |
void draw_window() |
{ |
proc_info Form; |
int i; |
i=0; |
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header"); |
GetProcessInfo(#Form, SelfInfo); |
while(i<io.dir.count) |
{ |
WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i)); |
i++; |
} |
WriteText(10,110,0x80,0,#param); |
} |
/programs/cmm/examples/. |
---|
Property changes: |
Added: tsvn:logminsize |
+5 |
\ No newline at end of property |