forked from KolibriOS/kolibrios
Rollback to previous revision (unforeseen consequences)
git-svn-id: svn://kolibrios.org@9811 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
75d51a28c0
commit
6753818fc0
@ -8,6 +8,7 @@
|
|||||||
#include <sys/ksys.h>
|
#include <sys/ksys.h>
|
||||||
|
|
||||||
typedef unsigned color_t;
|
typedef unsigned color_t;
|
||||||
|
int kolibri_boxlib_init(void);
|
||||||
|
|
||||||
/* flags meaning */
|
/* flags meaning */
|
||||||
#define ed_figure_only 0b1000000000000000 // одни символы
|
#define ed_figure_only 0b1000000000000000 // одни символы
|
||||||
@ -68,10 +69,10 @@ typedef struct {
|
|||||||
uint32_t ar_offset;
|
uint32_t ar_offset;
|
||||||
} __attribute__((__packed__)) scrollbar;
|
} __attribute__((__packed__)) scrollbar;
|
||||||
|
|
||||||
DLLAPI void __stdcall scrollbar_h_draw(scrollbar*);
|
extern void __stdcall (*scrollbar_h_draw)(scrollbar*);
|
||||||
DLLAPI void __stdcall scrollbar_h_mouse(scrollbar*);
|
extern void __stdcall (*scrollbar_h_mouse)(scrollbar*);
|
||||||
DLLAPI void __stdcall scrollbar_v_draw(scrollbar*);
|
extern void __stdcall (*scrollbar_v_draw)(scrollbar*);
|
||||||
DLLAPI void __stdcall scrollbar_v_mouse(scrollbar*);
|
extern void __stdcall (*scrollbar_v_mouse)(scrollbar*);
|
||||||
|
|
||||||
// CHECKBOX
|
// CHECKBOX
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -88,9 +89,9 @@ typedef struct {
|
|||||||
unsigned int size_of_str;
|
unsigned int size_of_str;
|
||||||
} check_box;
|
} check_box;
|
||||||
|
|
||||||
DLLAPI void __stdcall check_box_draw2(check_box*);
|
extern void __stdcall (*check_box_draw2)(check_box*);
|
||||||
DLLAPI void __stdcall check_box_mouse2(check_box*);
|
extern void __stdcall (*check_box_mouse2)(check_box*);
|
||||||
DLLAPI void __stdcall init_checkbox2(check_box*);
|
extern void __stdcall (*init_checkbox2)(check_box*);
|
||||||
|
|
||||||
// DBUTTON
|
// DBUTTON
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -110,8 +111,8 @@ typedef struct {
|
|||||||
uint32_t click; // clicked - 1, zero it after tested
|
uint32_t click; // clicked - 1, zero it after tested
|
||||||
} pict_button;
|
} pict_button;
|
||||||
|
|
||||||
DLLAPI void __stdcall dynamic_button_draw(pict_button*);
|
extern void __stdcall (*dynamic_button_draw)(pict_button*);
|
||||||
DLLAPI void __stdcall dynamic_button_mouse(pict_button*);
|
extern void __stdcall (*dynamic_button_mouse)(pict_button*);
|
||||||
|
|
||||||
// EDITBOX
|
// EDITBOX
|
||||||
|
|
||||||
@ -143,12 +144,12 @@ typedef struct edit_box_t {
|
|||||||
} edit_box;
|
} edit_box;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
DLLAPI void __stdcall edit_box_draw(edit_box*);
|
extern void __stdcall (*edit_box_draw)(edit_box*);
|
||||||
DLLAPI void __stdcall edit_box_key(edit_box*, unsigned int key_val);
|
extern void __stdcall (*edit_box_key)(edit_box*, unsigned int key_val);
|
||||||
DLLAPI void __stdcall edit_box_mouse(edit_box*);
|
extern void __stdcall (*edit_box_mouse)(edit_box*);
|
||||||
DLLAPI void __stdcall edit_box_set_text(edit_box*, char*);
|
extern void __stdcall (*edit_box_set_text)(edit_box*, char*);
|
||||||
|
|
||||||
DLLAPI void __stdcall edit_box_key_safe(edit_box* e, ksys_oskey_t ch);
|
extern void __stdcall (*edit_box_key_safe)(edit_box* e, ksys_oskey_t ch);
|
||||||
|
|
||||||
// FRAME
|
// FRAME
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -166,7 +167,7 @@ typedef struct {
|
|||||||
color_t font_bg_color;
|
color_t font_bg_color;
|
||||||
} frame;
|
} frame;
|
||||||
|
|
||||||
DLLAPI void __stdcall frame_draw(frame*);
|
extern void __stdcall (*frame_draw)(frame*);
|
||||||
|
|
||||||
// MENUBAR
|
// MENUBAR
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -207,9 +208,9 @@ typedef struct
|
|||||||
uint32_t get_mouse_flag;
|
uint32_t get_mouse_flag;
|
||||||
} menubar;
|
} menubar;
|
||||||
|
|
||||||
DLLAPI void __stdcall menu_bar_draw(menubar*);
|
extern void __stdcall (*menu_bar_draw)(menubar*);
|
||||||
DLLAPI void __stdcall menu_bar_mouse(menubar*);
|
extern void __stdcall (*menu_bar_mouse)(menubar*);
|
||||||
DLLAPI void __stdcall menu_bar_activate(menubar*);
|
extern void __stdcall (*menu_bar_activate)(menubar*);
|
||||||
|
|
||||||
// OPTIONBOX
|
// OPTIONBOX
|
||||||
typedef struct option_box_t {
|
typedef struct option_box_t {
|
||||||
@ -226,8 +227,8 @@ typedef struct option_box_t {
|
|||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
} __attribute__((__packed__)) option_box;
|
} __attribute__((__packed__)) option_box;
|
||||||
|
|
||||||
DLLAPI void __stdcall option_box_draw(option_box**);
|
extern void __stdcall (*option_box_draw)(option_box**);
|
||||||
DLLAPI void __stdcall option_box_mouse(option_box**);
|
extern void __stdcall (*option_box_mouse)(option_box**);
|
||||||
|
|
||||||
// PATHSHOW
|
// PATHSHOW
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -244,8 +245,8 @@ typedef struct {
|
|||||||
uint32_t temp_text_length;
|
uint32_t temp_text_length;
|
||||||
} __attribute__((__packed__)) pathview;
|
} __attribute__((__packed__)) pathview;
|
||||||
|
|
||||||
DLLAPI void __stdcall path_show_prepare(pathview*);
|
extern void __stdcall (*path_show_prepare)(pathview*);
|
||||||
DLLAPI void __stdcall path_show_draw(pathview*);
|
extern void __stdcall (*path_show_draw)(pathview*);
|
||||||
|
|
||||||
// PROGRESSBAR
|
// PROGRESSBAR
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -262,7 +263,7 @@ typedef struct {
|
|||||||
unsigned int frame_color;
|
unsigned int frame_color;
|
||||||
} progressbar;
|
} progressbar;
|
||||||
|
|
||||||
DLLAPI void __stdcall progressbar_draw(progressbar*);
|
extern void __stdcall (*progressbar_draw)(progressbar*);
|
||||||
DLLAPI void __stdcall progressbar_progress(progressbar*);
|
extern void __stdcall (*progressbar_progress)(progressbar*);
|
||||||
|
|
||||||
#endif /* KOLIBRI_BOXLIB_H */
|
#endif /* KOLIBRI_BOXLIB_H */
|
||||||
|
@ -30,8 +30,10 @@ enum BUF2D_OPT_CROP {
|
|||||||
BUF2D_OPT_CROP_RIGHT = 8
|
BUF2D_OPT_CROP_RIGHT = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
DLLAPI void __stdcall buf2d_create_asm(buf2d_struct*);
|
int kolibri_buf2d_init(void);
|
||||||
DLLAPI void __stdcall buf2d_curve_bezier_asm(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
|
||||||
|
extern void __stdcall (*buf2d_create_asm)(buf2d_struct*);
|
||||||
|
extern void __stdcall (*buf2d_curve_bezier_asm)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
|
|
||||||
buf2d_struct* buf2d_create(uint16_t tlx, uint16_t tly, unsigned int sizex, unsigned int sizey, unsigned int font_bgcolor, uint8_t color_bit)
|
buf2d_struct* buf2d_create(uint16_t tlx, uint16_t tly, unsigned int sizex, unsigned int sizey, unsigned int font_bgcolor, uint8_t color_bit)
|
||||||
{
|
{
|
||||||
@ -51,31 +53,31 @@ void buf2d_curve_bezier(buf2d_struct* buf, unsigned int p0_x, unsigned int p0_y,
|
|||||||
buf2d_curve_bezier_asm(buf, (p0_x << 16) + p0_y, (p1_x << 16) + p1_y, (p2_x << 16) + p2_y, color);
|
buf2d_curve_bezier_asm(buf, (p0_x << 16) + p0_y, (p1_x << 16) + p1_y, (p2_x << 16) + p2_y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLAPI void __stdcall buf2d_draw(buf2d_struct*);
|
extern void __stdcall (*buf2d_draw)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_clear(buf2d_struct*, unsigned int);
|
extern void __stdcall (*buf2d_clear)(buf2d_struct*, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_delete(buf2d_struct*);
|
extern void __stdcall (*buf2d_delete)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_rotate(buf2d_struct*, unsigned int);
|
extern void __stdcall (*buf2d_rotate)(buf2d_struct*, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_resize(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_resize)(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_line(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_line)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_line_sm(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_line_sm)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_rect_by_size(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_rect_by_size)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_filled_rect_by_size(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_filled_rect_by_size)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_circle(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_circle)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_img_hdiv2(buf2d_struct*);
|
extern void __stdcall (*buf2d_img_hdiv2)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_img_wdiv2(buf2d_struct*);
|
extern void __stdcall (*buf2d_img_wdiv2)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_conv_24_to_8(buf2d_struct*, unsigned int);
|
extern void __stdcall (*buf2d_conv_24_to_8)(buf2d_struct*, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_conv_24_to_32(buf2d_struct*, unsigned int);
|
extern void __stdcall (*buf2d_conv_24_to_32)(buf2d_struct*, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_bit_blt_transp(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*);
|
extern void __stdcall (*buf2d_bit_blt_transp)(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_bit_blt_alpha(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*);
|
extern void __stdcall (*buf2d_bit_blt_alpha)(buf2d_struct*, unsigned int, unsigned int, buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_convert_text_matrix(buf2d_struct*);
|
extern void __stdcall (*buf2d_convert_text_matrix)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_draw_text(buf2d_struct*, buf2d_struct*, const char*, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_draw_text)(buf2d_struct*, buf2d_struct*, const char*, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_crop_color(buf2d_struct*, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_crop_color)(buf2d_struct*, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_offset_h(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_offset_h)(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_flood_fill(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_flood_fill)(buf2d_struct*, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_set_pixel(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
extern void __stdcall (*buf2d_set_pixel)(buf2d_struct*, unsigned int, unsigned int, unsigned int);
|
||||||
DLLAPI unsigned __stdcall buf2d_get_pixel(buf2d_struct*, unsigned int, unsigned int);
|
extern unsigned __stdcall (*buf2d_get_pixel)(buf2d_struct*, unsigned int, unsigned int);
|
||||||
DLLAPI void __stdcall buf2d_flip_h(buf2d_struct*);
|
extern void __stdcall (*buf2d_flip_h)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_flip_v(buf2d_struct*);
|
extern void __stdcall (*buf2d_flip_v)(buf2d_struct*);
|
||||||
DLLAPI void __stdcall buf2d_filter_dither(buf2d_struct*, unsigned int);
|
extern void __stdcall (*buf2d_filter_dither)(buf2d_struct*, unsigned int);
|
||||||
|
|
||||||
#endif /* KOLIBRI_BUF2D_H */
|
#endif /* KOLIBRI_BUF2D_H */
|
||||||
|
@ -115,10 +115,12 @@ color_dialog* kolibri_new_color_dialog(unsigned int type, unsigned short tlx, un
|
|||||||
return new_colordialog;
|
return new_colordialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLAPI void __stdcall OpenDialog_init(open_dialog*);
|
void kolibri_dialog_init();
|
||||||
DLLAPI void __stdcall OpenDialog_start(open_dialog*);
|
|
||||||
|
|
||||||
DLLAPI void __stdcall ColorDialog_init(color_dialog*);
|
extern void __stdcall (*OpenDialog_init)(open_dialog*);
|
||||||
DLLAPI void __stdcall ColorDialog_start(color_dialog*);
|
extern void __stdcall (*OpenDialog_start)(open_dialog*);
|
||||||
|
|
||||||
|
extern void __stdcall (*ColorDialog_init)(color_dialog*);
|
||||||
|
extern void __stdcall (*ColorDialog_start)(color_dialog*);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,7 +79,7 @@ typedef struct http_msg_s {
|
|||||||
Initiates a HTTP connection, using 'GET' method.
|
Initiates a HTTP connection, using 'GET' method.
|
||||||
Returns NULL on error, identifier otherwise.
|
Returns NULL on error, identifier otherwise.
|
||||||
*/
|
*/
|
||||||
DLLAPI http_msg * __stdcall http_get(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
|
extern http_msg * __stdcall (*http_get)(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
url = pointer to ASCIIZ URL
|
url = pointer to ASCIIZ URL
|
||||||
@ -90,7 +90,7 @@ DLLAPI http_msg * __stdcall http_get(const char *url, http_msg *identifier, unsi
|
|||||||
Initiate a HTTP connection, using 'HEAD' method.
|
Initiate a HTTP connection, using 'HEAD' method.
|
||||||
Returns NULL on error, identifier otherwise.
|
Returns NULL on error, identifier otherwise.
|
||||||
*/
|
*/
|
||||||
DLLAPI http_msg * __stdcall http_head(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
|
extern http_msg * __stdcall (*http_head)(const char *url, http_msg *identifier, unsigned flags, const char *add_header);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
url = pointer to ASCIIZ URL
|
url = pointer to ASCIIZ URL
|
||||||
@ -105,7 +105,7 @@ DLLAPI http_msg * __stdcall http_head(const char *url, http_msg *identifier, uns
|
|||||||
using system function 75, 6.
|
using system function 75, 6.
|
||||||
Returns 0 on error, identifier otherwise
|
Returns 0 on error, identifier otherwise
|
||||||
*/
|
*/
|
||||||
DLLAPI http_msg * __stdcall http_post(const char *url, http_msg *identifier, unsigned flags, const char *add_header,
|
extern http_msg * __stdcall (*http_post)(const char *url, http_msg *identifier, unsigned flags, const char *add_header,
|
||||||
const char *content_type, unsigned content_length);
|
const char *content_type, unsigned content_length);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -127,7 +127,7 @@ DLLAPI http_msg * __stdcall http_post(const char *url, http_msg *identifier, uns
|
|||||||
In content_length you'll find the length of the content.
|
In content_length you'll find the length of the content.
|
||||||
In content_received, you'll find the number of content bytes already received.
|
In content_received, you'll find the number of content bytes already received.
|
||||||
*/
|
*/
|
||||||
DLLAPI int __stdcall http_receive(http_msg *identifier);
|
extern int __stdcall (*http_receive)(http_msg *identifier);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
identifier = identifier which one of the previous functions returned
|
identifier = identifier which one of the previous functions returned
|
||||||
@ -136,13 +136,13 @@ DLLAPI int __stdcall http_receive(http_msg *identifier);
|
|||||||
This procedure can be used to send data to the server (POST)
|
This procedure can be used to send data to the server (POST)
|
||||||
Returns number of bytes sent, -1 on error
|
Returns number of bytes sent, -1 on error
|
||||||
*/
|
*/
|
||||||
DLLAPI int __stdcall http_send(http_msg *identifier, void *dataptr, unsigned datalength);
|
extern int __stdcall (*http_send)(http_msg *identifier, void *dataptr, unsigned datalength);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sometimes the http_receive function receives incomplete data. If you have the same problem then a macro can help you:
|
Sometimes the http_receive function receives incomplete data. If you have the same problem then a macro can help you:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DLLAPI int __stdcall http_free(http_msg *identifier);
|
extern int __stdcall (*http_free)(http_msg *identifier);
|
||||||
/*
|
/*
|
||||||
Free unused data
|
Free unused data
|
||||||
*/
|
*/
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI unsigned __stdcall InputBox(void* Buffer, char* Caption, char* Prompt, char* Default,
|
extern unsigned __stdcall (*InputBox)(void* Buffer, char* Caption, char* Prompt, char* Default,
|
||||||
unsigned long Flags, unsigned long BufferSize, void* RedrawProc);
|
unsigned long Flags, unsigned long BufferSize, void* RedrawProc);
|
||||||
|
|
||||||
#endif // KOLIBRI_INPUTBOX_H
|
#endif // KOLIBRI_INPUTBOX_H
|
||||||
|
@ -4,10 +4,8 @@
|
|||||||
#define KOLIBRI_LIBIMG_H
|
#define KOLIBRI_LIBIMG_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|
||||||
//list of format id's
|
//list of format id's
|
||||||
#define LIBIMG_FORMAT_BMP 1
|
#define LIBIMG_FORMAT_BMP 1
|
||||||
#define LIBIMG_FORMAT_ICO 2
|
#define LIBIMG_FORMAT_ICO 2
|
||||||
@ -97,23 +95,23 @@ typedef struct{
|
|||||||
#define ROTATE_90_CCW ROTATE_270_CW
|
#define ROTATE_90_CCW ROTATE_270_CW
|
||||||
#define ROTATE_270_CCW ROTATE_90_CW
|
#define ROTATE_270_CCW ROTATE_90_CW
|
||||||
|
|
||||||
DLLAPI Image* __stdcall img_decode(void* file_data, uint32_t size, uint32_t b_color);
|
extern Image* __stdcall (*img_decode)(void* file_data, uint32_t size, uint32_t b_color);
|
||||||
DLLAPI Image* __stdcall img_encode(Image* img, uint32_t length, uint32_t option);
|
extern Image* __stdcall (*img_encode)(Image* img, uint32_t length, uint32_t option);
|
||||||
DLLAPI Image* __stdcall img_create(uint32_t width, uint32_t height, uint32_t type);
|
extern Image* __stdcall (*img_create)(uint32_t width, uint32_t height, uint32_t type);
|
||||||
DLLAPI void __stdcall img_to_rgb2(Image* img, void *rgb_data);
|
extern void __stdcall (*img_to_rgb2)(Image* img, void *rgb_data);
|
||||||
DLLAPI Image* __stdcall img_to_rgb(Image* img);
|
extern Image* __stdcall (*img_to_rgb)(Image* img);
|
||||||
DLLAPI bool __stdcall img_flip(Image* img, uint32_t flip);
|
extern bool __stdcall (*img_flip)(Image* img, uint32_t flip);
|
||||||
DLLAPI bool __stdcall img_flip_layer(Image *img, uint32_t flip);
|
extern bool __stdcall (*img_flip_layer)(Image *img, uint32_t flip);
|
||||||
DLLAPI bool __stdcall img_rotate(Image *img, uint32_t rotate);
|
extern bool __stdcall (*img_rotate)(Image *img, uint32_t rotate);
|
||||||
DLLAPI bool __stdcall img_rotate_layer(Image* data, uint32_t rotate);
|
extern bool __stdcall (*img_rotate_layer)(Image* data, uint32_t rotate);
|
||||||
DLLAPI void __stdcall img_draw(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff);
|
extern void __stdcall (*img_draw)(Image *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t xoff, uint32_t yoff);
|
||||||
DLLAPI int32_t __stdcall img_count(Image *img);
|
extern int32_t __stdcall (*img_count)(Image *img);
|
||||||
DLLAPI bool __stdcall img_destroy(Image *img);
|
extern bool __stdcall (*img_destroy)(Image *img);
|
||||||
DLLAPI bool __stdcall img_destroy_layer(Image* img);
|
extern bool __stdcall (*img_destroy_layer)(Image* img);
|
||||||
DLLAPI Image* __stdcall img_blend(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height);
|
extern Image* __stdcall (*img_blend)(Image* dst, Image* src, uint32_t out_x, uint32_t out_y, uint32_t in_x, uint32_t in_y, uint32_t width, uint32_t height);
|
||||||
DLLAPI Image* __stdcall img_convert(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t);
|
extern Image* __stdcall (*img_convert)(Image *src, Image *dst, uint32_t dst_type, uint32_t, uint32_t);
|
||||||
DLLAPI Image* __stdcall img_resize_data(Image *src, uint32_t width, uint32_t height);
|
extern Image* __stdcall (*img_resize_data)(Image *src, uint32_t width, uint32_t height);
|
||||||
DLLAPI Image* __stdcall img_scale(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height);
|
extern Image* __stdcall (*img_scale)(Image* src, uint32_t crop_x, uint32_t crop_y, uint32_t crop_width, uint32_t crop_height, Image* dst, uint32_t scale_type, uint32_t inter, uint32_t new_width, uint32_t new_height);
|
||||||
|
|
||||||
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){
|
void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color){
|
||||||
for (uint32_t i = 0; i < width*height; i++) {
|
for (uint32_t i = 0; i < width*height; i++) {
|
||||||
@ -121,4 +119,6 @@ void img_fill_color(Image* img, uint32_t width, uint32_t height, uint32_t color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int kolibri_libimg_init(void);
|
||||||
|
|
||||||
#endif /* KOLIBRI_LIBIMG_H */
|
#endif /* KOLIBRI_LIBIMG_H */
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -17,9 +16,9 @@ typedef struct {
|
|||||||
|
|
||||||
typedef void (*msgbox_callback)(void);
|
typedef void (*msgbox_callback)(void);
|
||||||
|
|
||||||
DLLAPI void __stdcall mb_create(msgbox *, void *thread); // clears callbacks, ! if fix lib, we can return eax as of Fn51
|
extern void __stdcall (*mb_create)(msgbox *, void *thread); // clears callbacks, ! if fix lib, we can return eax as of Fn51
|
||||||
DLLAPI void __stdcall mb_setfunctions(msgbox_callback*); // must be called immediately after create, zero-ended array
|
extern void __stdcall (*mb_setfunctions)(msgbox_callback*); // must be called immediately after create, zero-ended array
|
||||||
DLLAPI void __stdcall mb_reinit(msgbox *); // recalc sizes when structure changes, called auto when MsgBoxCreate
|
extern void __stdcall (*mb_reinit)(msgbox *); // recalc sizes when structure changes, called auto when MsgBoxCreate
|
||||||
|
|
||||||
static inline msgbox* kolibri_new_msgbox(char* title, char* text, int def_but, ...)
|
static inline msgbox* kolibri_new_msgbox(char* title, char* text, int def_but, ...)
|
||||||
/// text can be multilined by code 13 = "\r"
|
/// text can be multilined by code 13 = "\r"
|
||||||
|
@ -46,9 +46,11 @@ struct addrinfo {
|
|||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
DLLAPI int __stdcall inet_addr(const char* hostname);
|
int networklib_init();
|
||||||
DLLAPI char* __stdcall inet_ntoa(int ip_addr);
|
|
||||||
DLLAPI int __stdcall getaddrinfo(const char* hostname, const char* servname, const struct addrinfo* hints, struct addrinfo** res);
|
extern int __stdcall (*inet_addr)(const char* hostname);
|
||||||
DLLAPI void __stdcall freeaddrinfo(struct addrinfo* ai);
|
extern char* __stdcall (*inet_ntoa)(int ip_addr);
|
||||||
|
extern int __stdcall (*getaddrinfo)(const char* hostname, const char* servname, const struct addrinfo* hints, struct addrinfo** res);
|
||||||
|
extern void __stdcall (*freeaddrinfo)(struct addrinfo* ai);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI void __stdcall drawText(void *canvas, int x, int y, const char *string, int charQuantity, int fontColor, int params);
|
int kolibri_rasterworks_init(void);
|
||||||
DLLAPI int __stdcall countUTF8Z(const char *string, int byteQuantity) __asm__("cntUTF-8");
|
|
||||||
DLLAPI int __stdcall charsFit(int areaWidth, int charHeight);
|
extern void __stdcall (*drawText)(void *canvas, int x, int y, const char *string, int charQuantity, int fontColor, int params);
|
||||||
DLLAPI int __stdcall strWidth(int charQuantity, int charHeight);
|
extern int __stdcall (*countUTF8Z)(const char *string, int byteQuantity) __asm__("cntUTF-8");
|
||||||
|
extern int __stdcall (*charsFit)(int areaWidth, int charHeight);
|
||||||
|
extern int __stdcall (*strWidth)(int charQuantity, int charHeight);
|
||||||
|
|
||||||
#endif /* KOLIBRI_RASTERWORKS_H */
|
#endif /* KOLIBRI_RASTERWORKS_H */
|
@ -32,9 +32,9 @@ typedef unsigned short word; /* 16-bit unsigned integer */
|
|||||||
|
|
||||||
#define CON_IGNORE_SPECIALS 0x100
|
#define CON_IGNORE_SPECIALS 0x100
|
||||||
|
|
||||||
DLLAPI int con_init(void);
|
extern int _FUNC(con_init)(void);
|
||||||
DLLAPI int con_init_opt(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title);
|
extern int _FUNC(con_init_opt)(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title);
|
||||||
extern void __stdcall _FUNC(*con_exit)(int bCloseWindow);
|
extern void __stdcall _FUNC((*con_exit))(int bCloseWindow);
|
||||||
extern void __stdcall _FUNC((*con_set_title))(const char* title);
|
extern void __stdcall _FUNC((*con_set_title))(const char* title);
|
||||||
extern void __stdcall _FUNC((*con_write_asciiz))(const char* str);
|
extern void __stdcall _FUNC((*con_write_asciiz))(const char* str);
|
||||||
extern void __stdcall _FUNC((*con_write_string))(const char* str, dword length);
|
extern void __stdcall _FUNC((*con_write_string))(const char* str, dword length);
|
||||||
@ -53,6 +53,6 @@ extern char* __stdcall _FUNC((*con_gets2))(con_gets2_callback callback, char* st
|
|||||||
extern void __stdcall _FUNC((*con_cls))();
|
extern void __stdcall _FUNC((*con_cls))();
|
||||||
extern void __stdcall _FUNC((*con_get_cursor_pos))(int* px, int* py);
|
extern void __stdcall _FUNC((*con_get_cursor_pos))(int* px, int* py);
|
||||||
extern void __stdcall _FUNC((*con_set_cursor_pos))(int x, int y);
|
extern void __stdcall _FUNC((*con_set_cursor_pos))(int x, int y);
|
||||||
extern int __con_is_load;
|
extern int _FUNC(__con_is_load);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,7 +41,7 @@ extern unsigned short* __is;
|
|||||||
#define isascii(c) (!((c) & (~0x7f)))
|
#define isascii(c) (!((c) & (~0x7f)))
|
||||||
#define toascii(c) ((c)&0x7f)
|
#define toascii(c) ((c)&0x7f)
|
||||||
|
|
||||||
DLLAPI int tolower(int c);
|
extern int _FUNC(tolower)(int c);
|
||||||
DLLAPI int toupper(int c);
|
extern int _FUNC(toupper)(int c);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#ifndef _LIBGEN_H_
|
#ifndef _LIBGEN_H_
|
||||||
#define _LIBGEN_H_
|
#define _LIBGEN_H_
|
||||||
|
|
||||||
#include <stddef.h>
|
extern char* _FUNC(dirname)(char *);
|
||||||
|
extern char* _FUNC(basename)(char *);
|
||||||
DLLAPI char* dirname(char *);
|
|
||||||
DLLAPI char* basename(char *);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,37 +6,37 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI double acos(double _x);
|
extern double _FUNC(acos)(double _x);
|
||||||
DLLAPI double asin(double _x);
|
extern double _FUNC(asin)(double _x);
|
||||||
DLLAPI double atan(double _x);
|
extern double _FUNC(atan)(double _x);
|
||||||
DLLAPI double atan2(double _y, double _x);
|
extern double _FUNC(atan2)(double _y, double _x);
|
||||||
DLLAPI double ceil(double _x);
|
extern double _FUNC(ceil)(double _x);
|
||||||
DLLAPI double cos(double _x);
|
extern double _FUNC(cos)(double _x);
|
||||||
DLLAPI double cosh(double _x);
|
extern double _FUNC(cosh)(double _x);
|
||||||
DLLAPI double exp(double _x);
|
extern double _FUNC(exp)(double _x);
|
||||||
DLLAPI double fabs(double _x);
|
extern double _FUNC(fabs)(double _x);
|
||||||
DLLAPI double floor(double _x);
|
extern double _FUNC(floor)(double _x);
|
||||||
DLLAPI double fmod(double _x, double _y);
|
extern double _FUNC(fmod)(double _x, double _y);
|
||||||
DLLAPI double frexp(double _x, int* _pexp);
|
extern double _FUNC(frexp)(double _x, int* _pexp);
|
||||||
DLLAPI double ldexp(double _x, int _exp);
|
extern double _FUNC(ldexp)(double _x, int _exp);
|
||||||
DLLAPI double log(double _y);
|
extern double _FUNC(log)(double _y);
|
||||||
DLLAPI double log2(double _x);
|
extern double _FUNC(log2)(double _x);
|
||||||
DLLAPI double log10(double _x);
|
extern double _FUNC(log10)(double _x);
|
||||||
DLLAPI double modf(double _x, double* _pint);
|
extern double _FUNC(modf)(double _x, double* _pint);
|
||||||
DLLAPI double pow(double _x, double _y);
|
extern double _FUNC(pow)(double _x, double _y);
|
||||||
DLLAPI double round(double _x);
|
extern double _FUNC(round)(double _x);
|
||||||
DLLAPI double sin(double _x);
|
extern double _FUNC(sin)(double _x);
|
||||||
DLLAPI double sinh(double _x);
|
extern double _FUNC(sinh)(double _x);
|
||||||
DLLAPI double sqrt(double _x);
|
extern double _FUNC(sqrt)(double _x);
|
||||||
DLLAPI double tan(double _x);
|
extern double _FUNC(tan)(double _x);
|
||||||
DLLAPI double tanh(double _x);
|
extern double _FUNC(tanh)(double _x);
|
||||||
DLLAPI double acosh(double);
|
extern double _FUNC(acosh)(double);
|
||||||
DLLAPI double asinh(double);
|
extern double _FUNC(asinh)(double);
|
||||||
DLLAPI double atanh(double);
|
extern double _FUNC(atanh)(double);
|
||||||
DLLAPI double hypot(double, double);
|
extern double _FUNC(hypot)(double, double);
|
||||||
DLLAPI long double modfl(long double _x, long double* _pint);
|
extern long double _FUNC(modfl)(long double _x, long double* _pint);
|
||||||
DLLAPI double pow10(double _x);
|
extern double _FUNC(pow10)(double _x);
|
||||||
DLLAPI double pow2(double _x);
|
extern double _FUNC(pow2)(double _x);
|
||||||
|
|
||||||
#define M_E 2.7182818284590452354
|
#define M_E 2.7182818284590452354
|
||||||
#define M_LOG2E 1.4426950408889634074
|
#define M_LOG2E 1.4426950408889634074
|
||||||
|
@ -11,7 +11,7 @@ typedef struct __jmp_buf_tag {
|
|||||||
unsigned long __ss[128 / sizeof(long)];
|
unsigned long __ss[128 / sizeof(long)];
|
||||||
} jmp_buf[1];
|
} jmp_buf[1];
|
||||||
|
|
||||||
DLLAPI int setjmp(jmp_buf env);
|
extern int _FUNC(setjmp)(jmp_buf env);
|
||||||
DLLAPI void longjmp(jmp_buf env, int val);
|
extern void _FUNC(longjmp)(jmp_buf env, int val);
|
||||||
|
|
||||||
#endif // _SETJMP_H_
|
#endif // _SETJMP_H_
|
||||||
|
@ -13,17 +13,9 @@ typedef __SIZE_TYPE__ uintptr_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _BUILD_LIBC
|
#ifdef _BUILD_LIBC
|
||||||
|
|
||||||
/* FIXME: Now _FUNC is used in conio only.
|
|
||||||
This should be removed after revrite somme apps who use conio
|
|
||||||
(because these app use pointer dereferencing for conio)
|
|
||||||
*/
|
|
||||||
#define _FUNC(func) func
|
#define _FUNC(func) func
|
||||||
|
|
||||||
#define DLLAPI //__attribute__((dllexport)) // Comming soon(tcc not support yet)
|
|
||||||
#else
|
#else
|
||||||
#define _FUNC(func) (*func) // FIXME: this needed for legacy reason (see above)
|
#define _FUNC(func) (*func)
|
||||||
#define DLLAPI __attribute__((dllimport))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define offsetof(type, field) ((size_t) & ((type*)0)->field)
|
#define offsetof(type, field) ((size_t) & ((type*)0)->field)
|
||||||
|
@ -35,15 +35,15 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI int puts(const char* str);
|
extern int _FUNC(puts)(const char* str);
|
||||||
DLLAPI int printf(const char* format, ...);
|
extern int _FUNC(printf)(const char* format, ...);
|
||||||
DLLAPI int sprintf(char* buffer, const char* format, ...);
|
extern int _FUNC(sprintf)(char* buffer, const char* format, ...);
|
||||||
DLLAPI int snprintf(char* buffer, size_t count, const char* format, ...);
|
extern int _FUNC(snprintf)(char* buffer, size_t count, const char* format, ...);
|
||||||
DLLAPI int vsnprintf(char* buffer, size_t count, const char* format, va_list va);
|
extern int _FUNC(vsnprintf)(char* buffer, size_t count, const char* format, va_list va);
|
||||||
DLLAPI int vsprintf(char* buffer, const char* format, va_list va);
|
extern int _FUNC(vsprintf)(char* buffer, const char* format, va_list va);
|
||||||
DLLAPI int vprintf(const char* format, va_list va);
|
extern int _FUNC(vprintf)(const char* format, va_list va);
|
||||||
|
|
||||||
DLLAPI void debug_printf(const char* format, ...);
|
extern void _FUNC(debug_printf)(const char* format, ...);
|
||||||
|
|
||||||
typedef size_t fpos_t;
|
typedef size_t fpos_t;
|
||||||
|
|
||||||
@ -85,55 +85,55 @@ typedef struct FILE_s {
|
|||||||
#define stdin (FILE*)1
|
#define stdin (FILE*)1
|
||||||
#define stdout (FILE*)2
|
#define stdout (FILE*)2
|
||||||
|
|
||||||
DLLAPI int fgetc(FILE*);
|
extern int _FUNC(fgetc)(FILE*);
|
||||||
DLLAPI char* fgets(char* restrict, int, FILE* restrict);
|
extern char* _FUNC(fgets)(char* restrict, int, FILE* restrict);
|
||||||
DLLAPI int fprintf(FILE* restrict, const char* restrict, ...);
|
extern int _FUNC(fprintf)(FILE* restrict, const char* restrict, ...);
|
||||||
DLLAPI int fputc(int, FILE*);
|
extern int _FUNC(fputc)(int, FILE*);
|
||||||
DLLAPI int fputs(const char* restrict, FILE* restrict);
|
extern int _FUNC(fputs)(const char* restrict, FILE* restrict);
|
||||||
DLLAPI size_t fread(void* restrict, size_t size, size_t count, FILE* restrict);
|
extern size_t _FUNC(fread)(void* restrict, size_t size, size_t count, FILE* restrict);
|
||||||
DLLAPI int fscanf(FILE* restrict, const char* restrict, ...);
|
extern int _FUNC(fscanf)(FILE* restrict, const char* restrict, ...);
|
||||||
DLLAPI size_t fwrite(const void* restrict, size_t size, size_t count, FILE* restrict);
|
extern size_t _FUNC(fwrite)(const void* restrict, size_t size, size_t count, FILE* restrict);
|
||||||
DLLAPI int getc(FILE*);
|
extern int _FUNC(getc)(FILE*);
|
||||||
#define getc() fgetc(stdin)
|
#define getc() _FUNC(fgetc)(stdin)
|
||||||
DLLAPI int getchar(void);
|
extern int _FUNC(getchar)(void);
|
||||||
DLLAPI int printf(const char* restrict, ...);
|
extern int _FUNC(printf)(const char* restrict, ...);
|
||||||
#define putc(ch) fputc(ch, stdout)
|
#define putc(ch) _FUNC(fputc)(ch, stdout)
|
||||||
DLLAPI int puts(const char*);
|
extern int _FUNC(puts)(const char*);
|
||||||
DLLAPI int scanf(const char* restrict, ...);
|
extern int _FUNC(scanf)(const char* restrict, ...);
|
||||||
DLLAPI char* gets(char* str);
|
extern char* _FUNC(gets)(char* str);
|
||||||
DLLAPI int ungetc(int, FILE*);
|
extern int _FUNC(ungetc)(int, FILE*);
|
||||||
DLLAPI int vfprintf(FILE* restrict, const char* restrict, va_list);
|
extern int _FUNC(vfprintf)(FILE* restrict, const char* restrict, va_list);
|
||||||
DLLAPI int vfscanf(FILE* restrict, const char* restrict, va_list);
|
extern int _FUNC(vfscanf)(FILE* restrict, const char* restrict, va_list);
|
||||||
DLLAPI int vprintf(const char* restrict, va_list);
|
extern int _FUNC(vprintf)(const char* restrict, va_list);
|
||||||
DLLAPI int vscanf(const char* restrict, va_list);
|
extern int _FUNC(vscanf)(const char* restrict, va_list);
|
||||||
DLLAPI int sscanf(const char*, const char* restrict, ...);
|
extern int _FUNC(sscanf)(const char*, const char* restrict, ...);
|
||||||
DLLAPI int vsscanf(const char*, const char*, va_list);
|
extern int _FUNC(vsscanf)(const char*, const char*, va_list);
|
||||||
|
|
||||||
DLLAPI int remove(const char*);
|
extern int _FUNC(remove)(const char*);
|
||||||
DLLAPI int rename(const char*, const char*);
|
extern int _FUNC(rename)(const char*, const char*);
|
||||||
DLLAPI FILE* tmpfile(void);
|
extern FILE* _FUNC(tmpfile)(void);
|
||||||
DLLAPI char* tmpnam(char*);
|
extern char* _FUNC(tmpnam)(char*);
|
||||||
|
|
||||||
DLLAPI int fclose(FILE*);
|
extern int _FUNC(fclose)(FILE*);
|
||||||
DLLAPI int fflush(FILE*);
|
extern int _FUNC(fflush)(FILE*);
|
||||||
DLLAPI FILE* fopen(const char* restrict, const char* restrict);
|
extern FILE* _FUNC(fopen)(const char* restrict, const char* restrict);
|
||||||
DLLAPI FILE* freopen(const char* restrict, const char* restrict, FILE* restrict);
|
extern FILE* _FUNC(freopen)(const char* restrict, const char* restrict, FILE* restrict);
|
||||||
DLLAPI void setbuf(FILE* restrict, char* restrict);
|
extern void _FUNC(setbuf)(FILE* restrict, char* restrict);
|
||||||
DLLAPI int setvbuf(FILE* restrict, char* restrict, int, size_t);
|
extern int _FUNC(setvbuf)(FILE* restrict, char* restrict, int, size_t);
|
||||||
|
|
||||||
DLLAPI int fgetpos(FILE* restrict, fpos_t* restrict);
|
extern int _FUNC(fgetpos)(FILE* restrict, fpos_t* restrict);
|
||||||
DLLAPI int fseek(FILE*, long, int);
|
extern int _FUNC(fseek)(FILE*, long, int);
|
||||||
DLLAPI int fsetpos(FILE*, const fpos_t*);
|
extern int _FUNC(fsetpos)(FILE*, const fpos_t*);
|
||||||
DLLAPI long ftell(FILE*);
|
extern long _FUNC(ftell)(FILE*);
|
||||||
DLLAPI void rewind(FILE*);
|
extern void _FUNC(rewind)(FILE*);
|
||||||
|
|
||||||
DLLAPI void clearerr(FILE*);
|
extern void _FUNC(clearerr)(FILE*);
|
||||||
DLLAPI int feof(FILE*);
|
extern int _FUNC(feof)(FILE*);
|
||||||
DLLAPI int ferror(FILE*);
|
extern int _FUNC(ferror)(FILE*);
|
||||||
DLLAPI void perror(const char*);
|
extern void _FUNC(perror)(const char*);
|
||||||
|
|
||||||
DLLAPI size_t fread(void* restrict, size_t, size_t, FILE* restrict);
|
extern size_t _FUNC(fread)(void* restrict, size_t, size_t, FILE* restrict);
|
||||||
|
|
||||||
DLLAPI int getchar(void);
|
extern int _FUNC(getchar)(void);
|
||||||
|
|
||||||
#endif // _STDIO_H_
|
#endif // _STDIO_H_
|
||||||
|
@ -41,31 +41,31 @@ static inline lldiv_t lldiv(long long num, long long den)
|
|||||||
return (lldiv_t) { num / den, num % den };
|
return (lldiv_t) { num / den, num % den };
|
||||||
}
|
}
|
||||||
|
|
||||||
DLLAPI void* malloc(size_t size);
|
extern void* _FUNC(malloc)(size_t size);
|
||||||
DLLAPI void* calloc(size_t num, size_t size);
|
extern void* _FUNC(calloc)(size_t num, size_t size);
|
||||||
DLLAPI void* realloc(void* ptr, size_t newsize);
|
extern void* _FUNC(realloc)(void* ptr, size_t newsize);
|
||||||
DLLAPI void free(void* ptr);
|
extern void _FUNC(free)(void* ptr);
|
||||||
|
|
||||||
DLLAPI long int strtol(const char* str, char** endptr, int base);
|
extern long int _FUNC(strtol)(const char* str, char** endptr, int base);
|
||||||
|
|
||||||
DLLAPI void exit(int status);
|
extern void _FUNC(exit)(int status);
|
||||||
|
|
||||||
DLLAPI void srand(unsigned s);
|
extern void _FUNC(srand)(unsigned s);
|
||||||
DLLAPI int rand(void);
|
extern int _FUNC(rand)(void);
|
||||||
|
|
||||||
DLLAPI void __assert_fail(const char* expr, const char* file, int line, const char* func);
|
extern void _FUNC(__assert_fail)(const char* expr, const char* file, int line, const char* func);
|
||||||
DLLAPI void qsort(void* base0, size_t n, size_t size, int (*compar)(const void*, const void*));
|
extern void _FUNC(qsort)(void* base0, size_t n, size_t size, int (*compar)(const void*, const void*));
|
||||||
|
|
||||||
DLLAPI double strtod(const char* s, char** sret);
|
extern double _FUNC(strtod)(const char* s, char** sret);
|
||||||
DLLAPI double atof(const char* ascii);
|
extern double _FUNC(atof)(const char* ascii);
|
||||||
|
|
||||||
DLLAPI int atoi(const char* s);
|
extern int _FUNC(atoi)(const char* s);
|
||||||
DLLAPI long atol(const char*);
|
extern long _FUNC(atol)(const char*);
|
||||||
DLLAPI long long atoll(const char*);
|
extern long long _FUNC(atoll)(const char*);
|
||||||
DLLAPI void itoa(int n, char* s);
|
extern void _FUNC(itoa)(int n, char* s);
|
||||||
|
|
||||||
DLLAPI int abs(int);
|
extern int _FUNC(abs)(int);
|
||||||
DLLAPI long labs(long);
|
extern long _FUNC(labs)(long);
|
||||||
DLLAPI long long llabs(long long);
|
extern long long _FUNC(llabs)(long long);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,38 +3,38 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI void* memccpy(void* restrict dest, const void* restrict src, int c, size_t n);
|
extern void* _FUNC(memccpy)(void* restrict dest, const void* restrict src, int c, size_t n);
|
||||||
|
|
||||||
#ifdef __TINYC__
|
#ifdef __TINYC__
|
||||||
extern void* memcpy(void* s1, const void* s2, size_t n);
|
extern void* memcpy(void* s1, const void* s2, size_t n);
|
||||||
extern void* memset(void* s, int c, size_t n);
|
extern void* memset(void* s, int c, size_t n);
|
||||||
extern void* memmove(void* s1, const void* s2, size_t n);
|
extern void* memmove(void* s1, const void* s2, size_t n);
|
||||||
#else
|
#else
|
||||||
DLLAPI void* memcpy(void* s1, const void* s2, size_t n);
|
extern void* _FUNC(memcpy)(void* s1, const void* s2, size_t n);
|
||||||
DLLAPI void* memset(void* s, int c, size_t n);
|
extern void* _FUNC(memset)(void* s, int c, size_t n);
|
||||||
DLLAPI void* memmove(void* s1, const void* s2, size_t n);
|
extern void* _FUNC(memmove)(void* s1, const void* s2, size_t n);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DLLAPI char* strcpy(char* s1, const char* s2);
|
extern char* _FUNC(strcpy)(char* s1, const char* s2);
|
||||||
DLLAPI char* strncpy(char* s1, const char* s2, size_t n);
|
extern char* _FUNC(strncpy)(char* s1, const char* s2, size_t n);
|
||||||
DLLAPI char* strcat(char* s1, const char* s2);
|
extern char* _FUNC(strcat)(char* s1, const char* s2);
|
||||||
DLLAPI char* strncat(char* s1, const char* s2, size_t n);
|
extern char* _FUNC(strncat)(char* s1, const char* s2, size_t n);
|
||||||
DLLAPI int memcmp(const void* s1, const void* s2, size_t n);
|
extern int _FUNC(memcmp)(const void* s1, const void* s2, size_t n);
|
||||||
DLLAPI int strcmp(const char* s1, const char* s2);
|
extern int _FUNC(strcmp)(const char* s1, const char* s2);
|
||||||
DLLAPI int strcoll(const char* s1, const char* s2);
|
extern int _FUNC(strcoll)(const char* s1, const char* s2);
|
||||||
DLLAPI int strncmp(const char* s1, const char* s2, size_t n);
|
extern int _FUNC(strncmp)(const char* s1, const char* s2, size_t n);
|
||||||
DLLAPI size_t strxfrm(char* s1, const char* s2, size_t n);
|
extern size_t _FUNC(strxfrm)(char* s1, const char* s2, size_t n);
|
||||||
DLLAPI void* memchr(const void* s, int c, size_t n);
|
extern void* _FUNC(memchr)(const void* s, int c, size_t n);
|
||||||
DLLAPI char* strchr(const char* s, int c);
|
extern char* _FUNC(strchr)(const char* s, int c);
|
||||||
DLLAPI size_t strcspn(const char* s1, const char* s2);
|
extern size_t _FUNC(strcspn)(const char* s1, const char* s2);
|
||||||
DLLAPI char* strpbrk(const char* s1, const char* s2);
|
extern char* _FUNC(strpbrk)(const char* s1, const char* s2);
|
||||||
DLLAPI char* strrchr(const char* s, int c);
|
extern char* _FUNC(strrchr)(const char* s, int c);
|
||||||
DLLAPI size_t strspn(const char* s1, const char* s2);
|
extern size_t _FUNC(strspn)(const char* s1, const char* s2);
|
||||||
DLLAPI char* strstr(const char* s1, const char* s2);
|
extern char* _FUNC(strstr)(const char* s1, const char* s2);
|
||||||
DLLAPI char* strtok(char* s1, const char* s2);
|
extern char* _FUNC(strtok)(char* s1, const char* s2);
|
||||||
DLLAPI char* strerror(int errnum);
|
extern char* _FUNC(strerror)(int errnum);
|
||||||
DLLAPI size_t strlen(const char* s);
|
extern size_t _FUNC(strlen)(const char* s);
|
||||||
DLLAPI char* strrev(char* str);
|
extern char* _FUNC(strrev)(char* str);
|
||||||
DLLAPI char* strdup(const char* str);
|
extern char* _FUNC(strdup)(const char* str);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
DLLAPI char* getcwd(char* buf, unsigned size);
|
extern char* _FUNC(getcwd)(char* buf, unsigned size);
|
||||||
DLLAPI void setcwd(const char* cwd);
|
extern void _FUNC(setcwd)(const char* cwd);
|
||||||
DLLAPI int rmdir(const char* dir);
|
extern int _FUNC(rmdir)(const char* dir);
|
||||||
DLLAPI int mkdir(const char* dir);
|
extern int _FUNC(mkdir)(const char* dir);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -23,11 +23,11 @@ typedef struct {
|
|||||||
ino_t num_objs;
|
ino_t num_objs;
|
||||||
} DIR;
|
} DIR;
|
||||||
|
|
||||||
DLLAPI int closedir(DIR* dir);
|
extern int _FUNC(closedir)(DIR* dir);
|
||||||
DLLAPI DIR* opendir(const char* path);
|
extern DIR* _FUNC(opendir)(const char* path);
|
||||||
DLLAPI struct dirent* readdir(DIR*);
|
extern struct dirent* _FUNC(readdir)(DIR*);
|
||||||
DLLAPI void rewinddir(DIR* dir);
|
extern void _FUNC(rewinddir)(DIR* dir);
|
||||||
DLLAPI void seekdir(DIR* dir, unsigned pos);
|
extern void _FUNC(seekdir)(DIR* dir, unsigned pos);
|
||||||
DLLAPI unsigned telldir(DIR* dir);
|
extern unsigned _FUNC(telldir)(DIR* dir);
|
||||||
|
|
||||||
#endif // _DIRENT_H_
|
#endif // _DIRENT_H_
|
||||||
|
@ -76,16 +76,16 @@ typedef struct {
|
|||||||
} optstruct;
|
} optstruct;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
DLLAPI int socket(int domain, int type, int protocol);
|
extern int _FUNC(socket)(int domain, int type, int protocol);
|
||||||
DLLAPI int close(int socket);
|
extern int _FUNC(close)(int socket);
|
||||||
DLLAPI int bind(int socket, const struct sockaddr* addres, int addres_len);
|
extern int _FUNC(bind)(int socket, const struct sockaddr* addres, int addres_len);
|
||||||
DLLAPI int listen(int socket, int backlog);
|
extern int _FUNC(listen)(int socket, int backlog);
|
||||||
DLLAPI int connect(int socket, const struct sockaddr* address, int socket_len);
|
extern int _FUNC(connect)(int socket, const struct sockaddr* address, int socket_len);
|
||||||
DLLAPI int accept(int socket, const struct sockaddr* address, int address_len);
|
extern int _FUNC(accept)(int socket, const struct sockaddr* address, int address_len);
|
||||||
DLLAPI int send(int socket, const void* message, size_t msg_len, int flag);
|
extern int _FUNC(send)(int socket, const void* message, size_t msg_len, int flag);
|
||||||
DLLAPI int recv(int socket, void* buffer, size_t buff_len, int flag);
|
extern int _FUNC(recv)(int socket, void* buffer, size_t buff_len, int flag);
|
||||||
DLLAPI int setsockopt(int socket, const optstruct* opt);
|
extern int _FUNC(setsockopt)(int socket, const optstruct* opt);
|
||||||
DLLAPI int getsockopt(int socket, optstruct* opt);
|
extern int _FUNC(getsockopt)(int socket, optstruct* opt);
|
||||||
DLLAPI int socketpair(int* socket1, int* socket2);
|
extern int _FUNC(socketpair)(int* socket1, int* socket2);
|
||||||
|
|
||||||
#endif //_SOCKET_H_
|
#endif //_SOCKET_H_
|
@ -22,10 +22,10 @@ struct tm {
|
|||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
DLLAPI time_t mktime(struct tm* timeptr);
|
extern time_t _FUNC(mktime)(struct tm* timeptr);
|
||||||
DLLAPI time_t time(time_t* timer);
|
extern time_t _FUNC(time)(time_t* timer);
|
||||||
DLLAPI struct tm* localtime(const time_t* timer);
|
extern struct tm* _FUNC(localtime)(const time_t* timer);
|
||||||
DLLAPI double difftime(time_t end, time_t beginning);
|
extern double _FUNC(difftime)(time_t end, time_t beginning);
|
||||||
DLLAPI char* asctime(const struct tm* tm);
|
extern char* _FUNC(asctime)(const struct tm* tm);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user