Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8426 → Rev 8425

/programs/develop/ktcc/trunk/libc/include/kos32sys1.h
41,12 → 41,6
//Read/Write data as type (int char, etc.) at address "addr" with offset "offset". eg DATA(int, buff, 8);
#define DATA(type, addr, offset) *((type*)((uint8_t*)addr+offset))
 
typedef struct {
uint8_t blue;
uint8_t green;
uint8_t red;
}RGB;
typedef unsigned int color_t;
 
typedef union __attribute__((packed)) pos_t
/programs/develop/ktcc/trunk/libc/include/clayer/dialog.h
File deleted
/programs/develop/ktcc/trunk/samples/Makefile
1,27 → 1,24
CC=../bin/kos32-tcc
CFLAGS= -I ../libc/include
 
all:
$(CC) $(CFLAGS) asm_ex.c -lck -o asm_ex.kex
$(CC) $(CFLAGS) consoleio.c -lck -o consoleio.kex
$(CC) $(CFLAGS) files.c -lck -o files.kex
$(CC) $(CFLAGS) winbasics.c -lck -o winbasics.kex
$(CC) $(CFLAGS) dynamic.c -lck -lhttp -linputbox -o dynamic.kex
$(CC) $(CFLAGS) load_coff.c -o load_coff.kex -lck
$(CC) $(CFLAGS) graphics.c -lck -lgb -o graphics.kex
$(CC) $(CFLAGS) dir_example.c -lck -o dir_example.kex
$(CC) $(CFLAGS) getopt_ex.c -lck -o getopt_ex.kex
../bin/kos32-tcc asm_ex.c -lck -o asm_ex.kex -I ../libc/include
../bin/kos32-tcc consoleio.c -lck -o consoleio.kex -I ../libc/include
../bin/kos32-tcc files.c -lck -o files.kex -I ../libc/include
../bin/kos32-tcc winbasics.c -lck -o winbasics.kex -I ../libc/include
../bin/kos32-tcc dynamic.c -lck -lhttp -linputbox -o dynamic.kex -I ../libc/include
../bin/kos32-tcc load_coff.c -o load_coff.kex -lck -I ../libc/include
../bin/kos32-tcc clayer/msgbox.c -lck -lmsgbox -o clayer/msgbox.kex -I ../libc/include
../bin/kos32-tcc graphics.c -lck -lgb -o graphics.kex -I ../libc/include
../bin/kos32-tcc clayer/rasterworks.c -lck -lrasterworks -o clayer/rasterworks.kex -I ../libc/include
../bin/kos32-tcc clayer/boxlib.c -lck -lbox -o clayer/boxlib.kex -I ../libc/include
../bin/kos32-tcc clayer/libimg.c -lck -limg -o clayer/libimg.kex -I ../libc/include
../bin/kos32-tcc console/console.c -lck -limg -o console/console.kex -I ../libc/include
../bin/kos32-tcc dir_example.c -lck -o dir_example.kex -I ../libc/include
../bin/kos32-tcc net/tcpsrv_demo.c -lck -o net/tcpsrv_demo.kex -I ../libc/include
../bin/kos32-tcc net/nslookup.c -lck -lnetwork -o net/nslookup.kex -I ../libc/include
../bin/kos32-tcc getopt_ex.c -lck -o getopt_ex.kex -I ../libc/include
../bin/kos32-tcc tinygl/fps.c tinygl/gears.c -o gears.kex -I ../libc/include -ltinygl -lck
$(CC) $(CFLAGS) clayer/msgbox.c -lck -lmsgbox -o clayer/msgbox.kex
$(CC) $(CFLAGS) clayer/rasterworks.c -lck -lrasterworks -o clayer/rasterworks.kex
$(CC) $(CFLAGS) clayer/boxlib.c -lck -lbox -o clayer/boxlib.kex
$(CC) $(CFLAGS) clayer/libimg.c -lck -limg -o clayer/libimg.kex
$(CC) $(CFLAGS) clayer/dialog.c -lck -ldialog -o clayer/dialog.kex
$(CC) $(CFLAGS) net/tcpsrv_demo.c -lck -o net/tcpsrv_demo.kex
$(CC) $(CFLAGS) net/nslookup.c -lck -lnetwork -o net/nslookup.kex
$(CC) $(CFLAGS) tinygl/fps.c tinygl/gears.c -o tinygl/gears.kex -ltinygl -lck
 
clean:
rm *.kex clayer/*.kex net/*.kex tinygl/*.kex
rm *.kex
rm clayer/*.kex
rm console/*.kex
rm net/*.kex
/programs/develop/ktcc/trunk/samples/build_all.sh
10,7 → 10,6
../tcc clayer/rasterworks.c -lck -lrasterworks -o /tmp0/1/rasterworks
../tcc clayer/boxlib.c -lck -lbox -o /tmp0/1/boxlib_ex
../tcc clayer/libimg.c -lck -limg -o /tmp0/1/libimg_ex
../tcc clayer/dialog.c -lck -ldialog -o /tmp0/1/dialog_ex
../tcc console/console.c -lck -limg -o /tmp0/1/console
../tcc dir_example.c -lck -o /tmp0/1/dir_example
../tcc net/tcpsrv_demo.c -lck -o /tmp0/1/tcpsrv_demo
/programs/develop/ktcc/trunk/samples/clayer/dialog.c
File deleted
/programs/develop/ktcc/trunk/samples/console/console.c
0,0 → 1,70
 
// Console dynamic link library. Sample by Ghost
 
#include <stdio.h>
#include <string.h>
#include <kolibrisys.h>
 
char* dllname="/sys/lib/console.obj";
int i;
 
char* imports[] = {"START","version","con_init","con_write_asciiz","con_printf","con_exit",NULL};
char* caption = "Console test - colors";
 
dword (* dll_start)(dword res);
dword* dll_ver;
void stdcall (* con_init)(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title);
void stdcall (* con_write_asciiz)(const char* string);
void cdecl (* con_printf)(const char* format,...);
void stdcall (* con_exit)(dword bCloseWindow);
 
struct import{
char *name;
void *data;
};
 
void link(struct import *exp, char** imports){
dll_start = (dword (*)(dword))
_ksys_cofflib_getproc(exp, imports[0]);
dll_ver = (dword*)
_ksys_cofflib_getproc(exp, imports[1]);
con_init = (void stdcall (*)(dword , dword, dword, dword, const char*))
_ksys_cofflib_getproc(exp, imports[2]);
con_write_asciiz = (void stdcall (*)(const char*))
_ksys_cofflib_getproc(exp, imports[3]);
con_printf = (void cdecl (*)(const char*,...))
_ksys_cofflib_getproc(exp, imports[4]);
con_exit = (void stdcall (*)(dword))
_ksys_cofflib_getproc(exp, imports[5]);
}
 
int main(int argc, char **argv){
 
struct import * hDll;
int a,b,c,d;
 
if((hDll = (struct import *)_ksys_cofflib_load(dllname)) == 0){
debug_out_str("can't load lib\n");
return 1;
}
link(hDll, imports);
debug_out_str("dll loaded\n");
 
if(dll_start(1) == 0){
debug_out_str("dll_start failed\n");
return 1;
}
 
con_init(-1, -1, -1, -1, caption);
 
for(i = 0; i < 256; i++){
con_printf("Color 0x%02X: ", i);
con_write_asciiz("Text sample.");
 
con_printf(" printf %s test %d\n", "small", i);
 
}
 
con_exit(0);
debug_out_str("all right's ;)\n");
}
/programs/develop/ktcc/trunk/lib/proc_lib/Makefile
File deleted
/programs/develop/ktcc/trunk/lib/proc_lib/loadproclib.asm
File deleted