6502def.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __6502DEF_H__
00037 #define __6502DEF_H__
00038
00039 #include <ctype.h>
00040 #include <conio.h>
00041 #include <fcntl.h>
00042 #include <stdio.h>
00043 #include <stdint.h>
00044 #include <unistd.h>
00045
00046 #include "pfs.h"
00047
00048
00049 typedef uint8_t u8_t;
00050 typedef uint16_t u16_t;
00051 typedef uint32_t u32_t;
00052 typedef int32_t s32_t;
00053
00054 #define CC_CONF_REGISTER_ARGS 1
00055 #define CC_CONF_FASTCALL __fastcall__
00056
00057 #define CCIF
00058 #define CLIF
00059
00060 #define HAVE_SNPRINTF
00061 #define snprintf(buf, len, ...) sprintf(buf, __VA_ARGS__)
00062
00063 #define CLOCK_CONF_SECOND 2
00064 typedef unsigned short clock_time_t;
00065
00066 typedef unsigned short uip_stats_t;
00067
00068 #define UIP_ARCH_ADD32 1
00069 #define UIP_ARCH_CHKSUM 1
00070
00071 #define MAC_CONF_CHANNEL_CHECK_RATE 1
00072 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 1
00073
00074 #define LOADER_CONF_ARCH "lib/unload.h"
00075
00076 #if MTU_SIZE
00077 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + MTU_SIZE)
00078 #else
00079 #define UIP_CONF_BUFFER_SIZE (UIP_LLH_LEN + 1500)
00080 #endif
00081
00082 #if CONNECTIONS
00083 #define UIP_CONF_MAX_CONNECTIONS CONNECTIONS
00084 #else
00085 #define UIP_CONF_MAX_CONNECTIONS 10
00086 #endif
00087
00088 #if WITH_LOGGING
00089 #define LOG_CONF_ENABLED 1
00090 #define UIP_CONF_LOGGING 1
00091 #else
00092 #define LOG_CONF_ENABLED 0
00093 #define UIP_CONF_LOGGING 0
00094 #endif
00095
00096 #if WITH_BOOST
00097 #define UIP_CONF_TCP_SPLIT 1
00098 #else
00099 #define UIP_CONF_TCP_SPLIT 0
00100 #endif
00101
00102 #if WITH_FORWARDING
00103 #define UIP_CONF_IP_FORWARD 1
00104 #else
00105 #define UIP_CONF_IP_FORWARD 0
00106 #endif
00107
00108 #if WITH_CLIENT
00109 #define UIP_CONF_ACTIVE_OPEN 1
00110 #else
00111 #define UIP_CONF_ACTIVE_OPEN 0
00112 #endif
00113
00114 #if WITH_DNS
00115 #define UIP_CONF_UDP 1
00116 #else
00117 #define UIP_CONF_UDP 0
00118 #endif
00119
00120 #define CTK_CONF_WIDGET_FLAGS 0
00121 #define CTK_CONF_WINDOWS 0
00122 #define CTK_CONF_WINDOWMOVE 0
00123 #define CTK_CONF_WINDOWCLOSE 0
00124 #define CTK_CONF_ICONS 0
00125 #define CTK_CONF_MENUS 0
00126 #define CTK_CONF_SCREENSAVER 0
00127
00128 #if WITH_MOUSE
00129 #define CTK_CONF_MOUSE_SUPPORT 1
00130 #else
00131 #define CTK_CONF_MOUSE_SUPPORT 0
00132 #endif
00133
00134 #define ctk_arch_keyavail kbhit
00135 #define ctk_arch_getkey cgetc
00136 #define ctk_arch_isprint isprint
00137
00138 #define CFS_CONF_OFFSET_TYPE off_t
00139
00140 #if WITH_PFS
00141 #define cfs_open pfs_open
00142 #define cfs_close pfs_close
00143 #define cfs_read pfs_read
00144 #define cfs_write pfs_write
00145 #define cfs_seek pfs_seek
00146 #define cfs_remove pfs_remove
00147 #else
00148 #define CFS_READ (O_RDONLY)
00149 #define CFS_WRITE (O_WRONLY | O_CREAT | O_TRUNC)
00150 #define CFS_SEEK_SET (SEEK_SET)
00151 #define CFS_SEEK_CUR (SEEK_CUR)
00152 #define CFS_SEEK_END (SEEK_END)
00153 #define cfs_open open
00154 #define cfs_close close
00155 #define cfs_read read
00156 #define cfs_write write
00157 #define cfs_seek lseek
00158 #define cfs_remove remove
00159 #endif
00160
00161 #endif