📄 chicken.h
字号:
/* chicken.h - General headerfile for compiler generated executables;; Copyright (c) 2000-2007, Felix L. Winkelmann; Copyright (c) 2008, The Chicken Team; All rights reserved.;; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following; conditions are met:;; Redistributions of source code must retain the above copyright notice, this list of conditions and the following; disclaimer. ; Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following; disclaimer in the documentation and/or other materials provided with the distribution. ; Neither the name of the author nor the names of its contributors may be used to endorse or promote; products derived from this software without specific prior written permission. ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE; POSSIBILITY OF SUCH DAMAGE.*//* Configuration: */#ifndef ___CHICKEN#define ___CHICKEN#define C_MAJOR_VERSION 3/* * N.B. This file MUST not rely upon "chicken-config.h" */#if defined(HAVE_CONFIG_H) || defined(HAVE_CHICKEN_CONFIG_H)# include "chicken-config.h"#endif#if !defined(__GNUC__) && !defined(__WATCOMC__)# if HAVE_ALLOCA_H# include <alloca.h># else# ifdef _AIX# pragma alloca# else# ifndef alloca /* predefined by HP cc +Olibcalls */char *alloca ();# endif# endif# endif#elif (defined(__sun__) && defined(__svr4__)) || defined(__sgi__)# if HAVE_ALLOCA_H# include <alloca.h># endif#endif#ifdef __cplusplus# define C_extern extern "C"# define C_BEGIN_C_DECLS extern "C" {# define C_END_C_DECLS }#else# define C_extern extern# define C_BEGIN_C_DECLS# define C_END_C_DECLS#endif #define C_varextern C_extern#define C_fctimport#define C_fctexport#define C_externimport C_extern#define C_externexport C_extern#if defined(PIC)# if defined(__CYGWIN__) || defined(__MINGW32__)# ifndef C_BUILDING_LIBCHICKEN# undef C_varextern# define C_varextern C_extern __declspec(dllimport)# endif# elif defined(_MSC_VER)# undef C_fctimport# define C_fctimport __declspec(dllexport)# undef C_externimport# undef C_externexport# define C_externexport C_extern __declspec(dllexport)# undef C_varextern# undef C_fctexport# ifdef C_BUILDING_LIBCHICKEN# define C_varextern C_extern __declspec(dllexport)# define C_fctexport __declspec(dllexport)# define C_externimport C_extern __declspec(dllexport)# else# define C_varextern C_extern __declspec(dllimport)# define C_fctexport __declspec(dllimport)# define C_externimport C_extern __declspec(dllimport)# endif# elif defined(__WATCOMC__)# undef C_fctimport# define C_fctimport __declspec(dllexport)# undef C_externimport# undef C_externexport# define C_externexport C_extern __declspec(dllexport)# undef C_varextern# undef C_fctexport# ifdef C_BUILDING_LIBCHICKEN# define C_varextern C_extern __declspec(dllexport)# define C_fctexport __declspec(dllexport)# define C_externimport C_extern __declspec(dllexport)# else# define C_varextern C_extern __declspec(dllimport)# define C_fctexport __declspec(dllimport)# define C_externimport C_extern __declspec(dllimport)# endif# endif#endif#ifdef C_ENABLE_TLS# if defined(__GNUC__)# define C_TLS __thread# elif defined(_MSC_VER)# define C_TLS __declspec(thread)# endif#endif#ifndef C_TLS# define C_TLS#endif#ifndef C_STACK_GROWS_DOWNWARD# define C_STACK_GROWS_DOWNWARD -1#endif#if C_STACK_GROWS_DOWNWARD == -1# ifdef __hppa__# undef C_STACK_GROWS_DOWNWARD# define C_STACK_GROWS_DOWNWARD 0# else# undef C_STACK_GROWS_DOWNWARD# define C_STACK_GROWS_DOWNWARD 1# endif#endif#if defined(C_WINDOWS_GUI)# define C_MICROSOFT_WINDOWS#else# define C_GENERIC_CONSOLE#endif#define C_TIMER_INTERRUPTS#ifdef C_DEFAULT_TARGET_STACK_SIZE# define C_resize_stack(n) C_do_resize_stack(C_DEFAULT_TARGET_STACK_SIZE)#else# define C_resize_stack(n) C_do_resize_stack(n)#endif#ifndef C_SIXTY_FOUR# if defined (__alpha__) || defined (__sparc_v9__) || defined (__sparcv9) || defined(__ia64__) || defined(__x86_64__) || defined(__LP64__) || defined(__powerpc64__)# define C_SIXTY_FOUR# elif defined(__mips64) && (!defined(__GNUC__) || _MIPS_SZPTR == 64)# define C_SIXTY_FOUR# endif#endif#if defined(__APPLE__) && defined(__MACH__)# define C_MACOSX#endif#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)# define C_XXXBSD#endif#if defined(C_MACOSX) || defined(__linux__) || defined(C_XXXBSD)# define C_GNU_ENV#endif#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__DJGPP__) || defined(__MINGW32__) || defined(__WATCOMC__)# define C_NONUNIX#endif#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <ctype.h>#include <string.h>#include <setjmp.h>#include <limits.h>#include <time.h>#if !defined(C_NONUNIX) || defined(__MINGW32__) || defined(__WATCOMC__)# include <unistd.h># include <inttypes.h># include <sys/types.h>#endif#if defined(__MINGW32__)# include <sys/param.h>#elif defined(__CYGWIN__)# include <endian.h>#elif defined(__linux__)# include <endian.h>#elif defined(C_MACOSX) || defined(C_XXXBSD)# include <machine/endian.h>#elif defined(__hpux__)# include <arpa/nameser.h>#elif defined(_AIX)# include <sys/machine.h>#elif defined(__sun__)# include <sys/isa_defs.h>#elif defined(__svr4__)# include <sys/byteorder.h>#endif#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN# define C_BIG_ENDIAN#elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN# define C_BIG_ENDIAN#elif defined(__BIG_ENDIAN__)# define C_BIG_ENDIAN#elif defined(__sparc__) || defined(__POWERPC__) || defined(__MC68K__) || defined(__mips__)# define C_BIG_ENDIAN#endif#if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN# define C_LITTLE_ENDIAN#elif defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN# define C_LITTLE_ENDIAN#elif defined(__LITTLE_ENDIAN__)# define C_LITTLE_ENDIAN#elif defined (__alpha__) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__) || defined(__ia64__)# define C_LITTLE_ENDIAN#endif#ifdef __MINGW32__# include <malloc.h>#endif#ifdef _MSC_VER# include <malloc.h># include <io.h># define alloca _alloca# define strncasecmp strnicmp# define isatty _isattytypedef __int8 int8_t;typedef unsigned __int8 uint8_t;typedef __int16 int16_t;typedef unsigned __int16 uint16_t;typedef __int32 int32_t;typedef unsigned __int32 uint32_t;typedef __int64 int64_t;typedef unsigned __int64 uint64_t;# pragma warning(disable: 4101)#endif#ifdef __WATCOMC__# include <malloc.h>#endif/* For the easy FFI: */#define ___fixnum int#define ___number double#define ___bool int#define ___byte char#define ___scheme_value C_word
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -