fincsys_cpp.c
来自「FinC编译器源代码」· C语言 代码 · 共 1,930 行 · 第 1/5 页
C
1,930 行
__attribute__((dllimport)) long __attribute__((__cdecl__)) labs (long);
# 395 "D:/Bernard/DDE/mingw/include/stdlib.h" 3
typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
__attribute__((dllimport)) div_t __attribute__((__cdecl__)) div (int, int);
__attribute__((dllimport)) ldiv_t __attribute__((__cdecl__)) ldiv (long, long);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _beep (unsigned int, unsigned int);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _seterrormode (int);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _sleep (unsigned long);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _exit (int) ;
typedef int (* _onexit_t)(void);
_onexit_t __attribute__((__cdecl__)) _onexit( _onexit_t );
__attribute__((dllimport)) int __attribute__((__cdecl__)) _putenv (const char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _searchenv (const char*, const char*, char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _ecvt (double, int, int*, int*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _fcvt (double, int, int*, int*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _gcvt (double, int, char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _makepath (char*, const char*, const char*, const char*, const char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _splitpath (const char*, char*, char*, char*, char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _fullpath (char*, const char*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _itoa (int, char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _ltoa (long, char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _ultoa(unsigned long, char*, int);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _itow (int, wchar_t*, int);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _ltow (long, wchar_t*, int);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _ultow (unsigned long, wchar_t*, int);
__attribute__((dllimport)) __int64 __attribute__((__cdecl__)) _atoi64(const char *);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _i64toa(__int64, char *, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _ui64toa(unsigned __int64, char *, int);
__attribute__((dllimport)) __int64 __attribute__((__cdecl__)) _wtoi64(const wchar_t *);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _i64tow(__int64, wchar_t *, int);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _ui64tow(unsigned __int64, wchar_t *, int);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wgetenv(const wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wputenv(const wchar_t*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wfullpath (wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) unsigned int __attribute__((__cdecl__)) _rotl(unsigned int, int);
__attribute__((dllimport)) unsigned int __attribute__((__cdecl__)) _rotr(unsigned int, int);
__attribute__((dllimport)) unsigned long __attribute__((__cdecl__)) _lrotl(unsigned long, int);
__attribute__((dllimport)) unsigned long __attribute__((__cdecl__)) _lrotr(unsigned long, int);
__attribute__((dllimport)) int __attribute__((__cdecl__)) putenv (const char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) searchenv (const char*, const char*, char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) itoa (int, char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) ltoa (long, char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) ecvt (double, int, int*, int*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) fcvt (double, int, int*, int*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) gcvt (double, int, char*);
# 480 "D:/Bernard/DDE/mingw/include/stdlib.h" 3
void __attribute__((__cdecl__)) _Exit(int) ;
extern __inline__ void __attribute__((__cdecl__)) _Exit(int status)
{ _exit(status); }
typedef struct { long long quot, rem; } lldiv_t;
lldiv_t __attribute__((__cdecl__)) lldiv (long long, long long);
extern __inline__ long long __attribute__((__cdecl__)) llabs(long long _j)
{return (_j >= 0 ? _j : -_j);}
long long __attribute__((__cdecl__)) strtoll (const char* __restrict__, char** __restrict, int);
unsigned long long __attribute__((__cdecl__)) strtoull (const char* __restrict__, char** __restrict__, int);
long long __attribute__((__cdecl__)) atoll (const char *);
long long __attribute__((__cdecl__)) wtoll (const wchar_t *);
char* __attribute__((__cdecl__)) lltoa (long long, char *, int);
char* __attribute__((__cdecl__)) ulltoa (unsigned long long , char *, int);
wchar_t* __attribute__((__cdecl__)) lltow (long long, wchar_t *, int);
wchar_t* __attribute__((__cdecl__)) ulltow (unsigned long long, wchar_t *, int);
extern __inline__ long long __attribute__((__cdecl__)) atoll (const char * _c)
{ return _atoi64 (_c); }
extern __inline__ char* __attribute__((__cdecl__)) lltoa (long long _n, char * _c, int _i)
{ return _i64toa (_n, _c, _i); }
extern __inline__ char* __attribute__((__cdecl__)) ulltoa (unsigned long long _n, char * _c, int _i)
{ return _ui64toa (_n, _c, _i); }
extern __inline__ long long __attribute__((__cdecl__)) wtoll (const wchar_t * _w)
{ return _wtoi64 (_w); }
extern __inline__ wchar_t* __attribute__((__cdecl__)) lltow (long long _n, wchar_t * _w, int _i)
{ return _i64tow (_n, _w, _i); }
extern __inline__ wchar_t* __attribute__((__cdecl__)) ulltow (unsigned long long _n, wchar_t * _w, int _i)
{ return _ui64tow (_n, _w, _i); }
# 6 "../include/tiny/global.h" 2
# 1 "D:/Bernard/DDE/mingw/include/string.h" 1 3
# 40 "D:/Bernard/DDE/mingw/include/string.h" 3
# 1 "D:/Bernard/DDE/mingw/include/stddef.h" 1 3
# 1 "D:/Bernard/DDE/mingw/lib/gcc-lib/mingw32/3.2.3/include/stddef.h" 1 3
# 7 "D:/Bernard/DDE/mingw/include/stddef.h" 2 3
# 41 "D:/Bernard/DDE/mingw/include/string.h" 2 3
# 52 "D:/Bernard/DDE/mingw/include/string.h" 3
__attribute__((dllimport)) void* __attribute__((__cdecl__)) memchr (const void*, int, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) memcmp (const void*, const void*, size_t);
__attribute__((dllimport)) void* __attribute__((__cdecl__)) memcpy (void*, const void*, size_t);
__attribute__((dllimport)) void* __attribute__((__cdecl__)) memmove (void*, const void*, size_t);
__attribute__((dllimport)) void* __attribute__((__cdecl__)) memset (void*, int, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strcat (char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strchr (const char*, int);
__attribute__((dllimport)) int __attribute__((__cdecl__)) strcmp (const char*, const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) strcoll (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strcpy (char*, const char*);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) strcspn (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strerror (int);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) strlen (const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strncat (char*, const char*, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) strncmp (const char*, const char*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strncpy (char*, const char*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strpbrk (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strrchr (const char*, int);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) strspn (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strstr (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strtok (char*, const char*);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) strxfrm (char*, const char*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strerror (const char *);
__attribute__((dllimport)) void* __attribute__((__cdecl__)) _memccpy (void*, const void*, int, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _memicmp (const void*, const void*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strdup (const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _strcmpi (const char*, const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _stricmp (const char*, const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _stricoll (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strlwr (char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _strnicmp (const char*, const char*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strnset (char*, int, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strrev (char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strset (char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) _strupr (char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) _swab (const char*, char*, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _strncoll(const char*, const char*, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _strnicoll(const char*, const char*, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcscat (wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcschr (const wchar_t*, wchar_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcscmp (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcscoll (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcscpy (wchar_t*, const wchar_t*);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) wcscspn (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) wcslen (const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsncat (wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcsncmp(const wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsncpy(wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcspbrk(const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsrchr(const wchar_t*, wchar_t);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) wcsspn(const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsstr(const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcstok(wchar_t*, const wchar_t*);
__attribute__((dllimport)) size_t __attribute__((__cdecl__)) wcsxfrm(wchar_t*, const wchar_t*, size_t);
# 131 "D:/Bernard/DDE/mingw/include/string.h" 3
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcsdup (const wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wcsicmp (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wcsicoll (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcslwr (wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcsnset (wchar_t*, wchar_t, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcsrev (wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcsset (wchar_t*, wchar_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) _wcsupr (wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wcsncoll(const wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
# 159 "D:/Bernard/DDE/mingw/include/string.h" 3
__attribute__((dllimport)) void* __attribute__((__cdecl__)) memccpy (void*, const void*, int, size_t);
__attribute__((dllimport)) int __attribute__((__cdecl__)) memicmp (const void*, const void*, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strdup (const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) strcmpi (const char*, const char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) stricmp (const char*, const char*);
extern __inline__ int __attribute__((__cdecl__))
strcasecmp (const char * __sz1, const char * __sz2)
{return _stricmp (__sz1, __sz2);}
__attribute__((dllimport)) int __attribute__((__cdecl__)) stricoll (const char*, const char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strlwr (char*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) strnicmp (const char*, const char*, size_t);
extern __inline__ int __attribute__((__cdecl__))
strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
{return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strnset (char*, int, size_t);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strrev (char*);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strset (char*, int);
__attribute__((dllimport)) char* __attribute__((__cdecl__)) strupr (char*);
__attribute__((dllimport)) void __attribute__((__cdecl__)) swab (const char*, char*, size_t);
extern __inline__ int __attribute__((__cdecl__))
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
{return _wcsicmp (__ws1, __ws2);}
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsdup (wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcsicmp (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcsicoll (const wchar_t*, const wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcslwr (wchar_t*);
__attribute__((dllimport)) int __attribute__((__cdecl__)) wcsnicmp (const wchar_t*, const wchar_t*, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsnset (wchar_t*, wchar_t, size_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsrev (wchar_t*);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsset (wchar_t*, wchar_t);
__attribute__((dllimport)) wchar_t* __attribute__((__cdecl__)) wcsupr (wchar_t*);
# 7 "../include/tiny/global.h" 2
# 1 "../include/tiny/config.h" 1
# 9 "../include/tiny/global.h" 2
# 18 "../include/tiny/global.h"
typedef void* ADT;
typedef short Bool;
typedef Bool (*EqualFunc) (ADT a, ADT b);
typedef void (*UserFunc) (ADT value, ADT data);
# 1 "../include/tiny/mem.h" 1
# 1 "../include/tiny/global.h" 1
# 5 "../include/tiny/mem.h" 2
ADT mem_new (int p_size);
ADT mem_resize (ADT p_ptr, int p_size);
void mem_destroy (ADT p_ptr);
void mem_copy (ADT p_src, ADT p_dst, int p_size);
void mem_move (ADT p_src, ADT p_dst, int p_size);
void mem_set (ADT s, char c, int size);
void mem_debug ();
# 25 "../include/tiny/global.h" 2
# 1 "../include/tiny/object.h" 1
typedef struct _Object Object;
typedef void (*ObjectDestroy) (Object* self);
struct _Object
{
int refcount;
ObjectDestroy destroy;
};
Object* object_new ();
void object_destroy (Object* self);
void object_init_object (Object* self, ObjectDestroy p_destroy);
Object* object_addref (Object* self);
void object_unref (Object* self);
# 26 "../include/tiny/global.h" 2
# 5 "../include/finc/fincsys.h" 2
# 1 "../include/tiny/string.h" 1
typedef struct _String String;
struct _String
{
Object parent;
unsigned char* data;
};
String* string_new ();
String* string_new_str (unsigned char* text);
void string_destroy (String* self);
unsigned int string_hash(void* self);
void string_clear (String* self);
void string_set (String* self, String* p_text);
void string_set_str (String* self, unsigned char* p_text);
unsigned char string_at (String* self, int index);
Bool string_is_empty(String* self);
void string_add (String* self, String* p_text);
void string_add_str (String* self, unsigned char* p_text);
void string_add_char (String* self, signed char p_char);
signed int string_cmp (String* self, String* p_text);
signed int string_cmp_str (String* self, unsigned char* p_text);
Bool string_equal(void* self, void* other);
signed int string_ncmp (String* self, String* p_text, unsigned int p_pos, unsigned int p_size);
signed int string_ncmp_str (String* self, unsigned char* p_text, unsigned int p_pos, unsigned int p_size);
unsigned int string_get_size (String* self);
signed char string_get_char (String* self, unsigned int p_index);
unsigned char* string_get_str (String* self);
String* string_extract (String* self, unsigned int p_index, unsigned int p_size);
# 6 "../include/finc/fincsys.h" 2
# 1 "../include/tiny/vector.h" 1
typedef struct _Vector Vector;
struct _Vector
{
Object parent;
Object** data;
unsigned int size;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?