/* Copyright 1990,1991,1992 Eric R. Smith. All rights reserved. */ #ifdef OWN_LIB #include "ctype.h" #else #include #include #endif #include /* WARNING: Bconmap is defined incorrectly * in the MiNT library osbind.h at patchlevel * <= 19 and in the GNU C library */ #ifdef __GNUC__ #undef Bconmap #define Bconmap(dev) (long)trap_14_ww(0x2c, dev) #endif #ifndef Bconmap #define Bconmap(dev) xbios(0x2c, dev) #endif /* configuration options */ /* make real processor exceptions (bus error, etc.) raise a signal */ #define EXCEPTION_SIGS /* deliberately fill memory with junk when allocating: used for testing */ #undef JUNK_MEM /* PATH_MAX is the maximum path allowed. The kernel uses this in lots of * places, so there isn't much point in file systems allowing longer * paths (they can restrict paths to being shorter if they want). */ #define PATH_MAX 128 /* maximum length of a string passed to ksprintf: this should be * no more than PATH_MAX */ #define SPRINTF_MAX PATH_MAX /* NOTE: NAME_MAX is a "suggested" maximum name length only. Individual * file systems may choose a longer or shorter NAME_MAX, so do _not_ * use this in the kernel for anything! */ #define NAME_MAX 14 /* * configuration section: put compiler specific stuff here */ #ifdef __GNUC__ #define EXITING volatile /* function never returns */ #else #define EXITING #endif #ifdef dLibs #define fullpath full_path #define SHORT_NAMES #endif #ifdef OWN_LIB /* Sigh. Some compilers are too clever for their * own good; gcc 2.1 now makes strcpy() and some * other string functions built-in; the built-in * definitions disagree with ours. So we redefine * them here. This also helps us to avoid conflict * with any library stuff, in the event that we * have to link in a library. */ #define strlen MS_len #define strcpy MS_cpy #define strncpy MS_ncpy #define strcat MS_cat #define strncat MS_ncat #define strcmp MS_cmp #define strncmp MS_ncmp #define strnicmp MS_nicmp #define stricmp MS_icmp #define strlwr MS_lwr #define strupr MS_upr #define sleep M_sleep #endif #ifdef SHORT_NAMES #define dispose_fileptr ds_fileptr #define dispose_region ds_region #define dispose_proc ds_proc #endif /* prototype macro thingy */ #ifdef __STDC__ #define P_(x) x #else #define P_(x) () #define const #endif #include "assert.h" #include "atarierr.h" #include "basepage.h" #include "types.h" #include "signal.h" #include "mem.h" #include "proc.h" #include "proto.h" #include "sproto.h" #ifndef NULL #define NULL ((void *)0) #endif #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #define check_addr(x) 0 #define yield() sleep(READY_Q, 0L) #define CTRL(x) ((x) & 0x1f) extern short timestamp, datestamp; /* in timeout.c */ typedef struct kbdvbase { long midivec; long vkbderr; long vmiderr; long statvec; long mousevec; long clockvec; long joyvec; long midisys; long ikbdsys; } KBDVEC; extern KBDVEC *syskey; #define ST 0 #define STE 0x00010000L #define MEGASTE 0x00010010L #define TT 0x00020000L extern long mch; extern int has_bconmap; /* set in main() */ extern int curbconmap; /* see xbios.c */