/programs/develop/ktcc/trunk/bin/lib/libck.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/develop/ktcc/trunk/libc/include/kos/console.h |
---|
File deleted |
/programs/develop/ktcc/trunk/libc/include/kos32sys1.h |
---|
40,6 → 40,8 |
//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)) |
#define X_W(X, W) ((X<<16)+W) |
#define Y_H X_W |
typedef struct { |
uint8_t blue; |
748,28 → 750,6 |
return val; |
} |
//added nonstatic inline because incomfortabre stepping in in debugger |
void __attribute__ ((noinline)) debug_board_write_str(const char* str); |
void __attribute__ ((noinline)) debug_board_printf(const char *format,...); |
/* copy body to only one project file |
void __attribute__ ((noinline)) debug_board_write_str(const char* str){ |
while(*str) |
debug_board_write_byte(*str++); |
} |
void __attribute__ ((noinline)) debug_board_printf(const char *format,...) |
{ |
va_list ap; |
char log_board[300]; |
va_start (ap, format); |
vsnprintf(log_board, sizeof log_board, format, ap); |
va_end(ap); |
debug_board_write_str(log_board); |
} |
*/ |
// TinyC don't support aliasing of static inline funcs, but support #define :) |
#ifndef __TINYC__ |
static inline void BeginDraw(void) __attribute__ ((alias ("begin_draw"))); |
/programs/develop/ktcc/trunk/libc/include/stdio.h |
---|
93,6 → 93,8 |
int vsprintf (char * s, const char * format, va_list arg ); |
int vfprintf ( FILE * stream, const char * format, va_list arg ); |
//debug |
void debug_printf(const char *format,...); |
int tiny_sprintf (char * s, const char * format, ... ); |
int tiny_snprintf (char * s, size_t n, const char * format, ... ); |
/programs/develop/ktcc/trunk/libc/stdio/debug.c |
---|
0,0 → 1,12 |
#include <stdarg.h> |
#include <kolibrisys.h> |
void debug_printf(const char *format,...) |
{ |
va_list ap; |
char log_board[300]; |
va_start (ap, format); |
vsnprintf(log_board, sizeof log_board, format, ap); |
va_end(ap); |
debug_out_str(log_board); |
} |
/programs/develop/ktcc/trunk/samples/build_all.sh |
---|
14,6 → 14,7 |
../tcc dir_example.c -lck -o /tmp0/1/dir_example |
../tcc net/tcpsrv_demo.c -lck -o /tmp0/1/tcpsrv_demo |
../tcc net/nslookup.c -lck -lnetwork -o /tmp0/1/nslookup |
../tcc net/http_tcp_demo.c -lck -lnetwork -o /tmp0/1/http_tcp_demo |
../tcc getopt_ex.c -lck -o /tmp0/1/getopt_ex |
../tcc tinygl/fps.c tinygl/gears.c -o /tmp0/1/gears -ltinygl -lck |
exit |
/programs/develop/ktcc/trunk/samples/winbasics.c |
---|
1,8 → 1,6 |
/* |
newlib-style window example |
*/ |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
10,6 → 8,8 |
#include "kos32sys1.h" |
struct kolibri_system_colors sys_color_table; |
void __attribute__ ((noinline)) debug_board_printf(const char *format,...); |
void __attribute__ ((noinline)) debug_board_write_str(const char* str); |
char statusbar[255]; |
char proc_info[1024]; |