Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Mark Jawad Newsgroups: scea.yaroze.freetalk Subject: Re: I/O on the Yaroze [non-blocking] Date: Tue, 27 Jan 1998 03:46:29 -0600 Organization: Student at the University Of Illinois Lines: 101 Message-ID: <34CDACF5.6CA@uiuc.edu> References: <34B29D0E.5D23@snrc.uow.edu.au> <34B4300A.3DD5@playstation.sony.com> <34B43B9E.4585@concentric.net> <34B50CA8.88D@playstation.sony.com> <34B70118.2D76@ix.netcom.com> <34C832A0.1C35@charlie.cns.iit.edu> Reply-To: jawad@uiuc.edu NNTP-Posting-Host: istanbul-6.slip.uiuc.edu Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------616DE6931F8" X-Mailer: Mozilla 2.02 (OS/2; I) This is a multi-part message in MIME format. --------------616DE6931F8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ed Federmeyer wrote: > * For some reason, the macros reference _ctype_, > * which doesn't exist in the libps.a. So we do this the > * hard/kludgy way. > * If someone knows the trick to making work in the > * Yaroze-world, let me know... > */ I caught that bug back in September, but didn't bother to post my changes which fix it. Anyways, here's my modified ctype.h file. Its not Sony Certified or anything, but it works just fine (as far as I'm aware, at least ;) ... Enjoy! -Mark J. --------------616DE6931F8 Content-Type: text/plain; charset=us-ascii; name="CTYPE.H" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="CTYPE.H" /***************************************************************** * * Copyright (c) 1996 Sony Computer Entertainment Inc. * All Rights Reserved. * * Ver 1.00 * *****************************************************************/ #ifndef _CTYPE_H #define _CTYPE_H #define _U 0x01 /* upper case letter */ #define _L 0x02 /* lower case letter */ #define _N 0x04 /* digit */ #define _S 0x08 /* space, tab, newline, vertical tab, formfeed, or carriage return */ #define _P 0x10 /* punctuation character */ #define _C 0x20 /* control character or delete */ #define _X 0x40 /* hexadecimal digit [0-9a-fA-F]*/ #define _B 0x80 /* blank (space) */ extern char _ctype_[]; #if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) extern "C" { #endif extern char toupper(char); extern char tolower(char); #if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) } #endif /* Original Sony Stuff #define isalpha(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L)) #define isupper(c) ((_ctype_+1)[(unsigned char)(c)]&_U) #define islower(c) ((_ctype_+1)[(unsigned char)(c)]&_L) #define isdigit(c) ((_ctype_+1)[(unsigned char)(c)]&_N) #define isxdigit(c) ((_ctype_+1)[(unsigned char)(c)]&(_X|_N)) #define isspace(c) ((_ctype_+1)[(unsigned char)(c)]&_S) #define ispunct(c) ((_ctype_+1)[(unsigned char)(c)]&_P) #define isalnum(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L|_N)) #define isprint(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N|_B)) #define isgraph(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N)) #define iscntrl(c) ((_ctype_+1)[(unsigned char)(c)]&_C) #define isascii(c) ((unsigned)(c)<=0x7f) #define toascii(c) ((unsigned char)(c)&0x7f) #define _toupper(c) ((unsigned char)(c)-'a'+'A') #define _tolower(c) ((unsigned char)(c)-'A'+'a') */ // Fixed by MAJ 9/25/97 #define isalpha(c) ((unsigned char)(c)&(_U|_L)) #define isupper(c) ((unsigned char)(c)&_U) #define islower(c) ((unsigned char)(c)&_L) #define isdigit(c) ((unsigned char)(c)&_N) #define isxdigit(c) ((unsigned char)(c)&(_X|_N)) #define isspace(c) ((unsigned char)(c)&_S) #define ispunct(c) ((unsigned char)(c)&_P) #define isalnum(c) ((unsigned char)(c)&(_U|_L|_N)) #define isprint(c) ((unsigned char)(c)&(_P|_U|_L|_N|_B)) #define isgraph(c) ((unsigned char)(c)&(_P|_U|_L|_N)) #define iscntrl(c) ((unsigned char)(c)&_C) #define isascii(c) ((unsigned)(c)<=0x7f) #define toascii(c) ((unsigned char)(c)&0x7f) #define _toupper(c) ((unsigned char)(c)-'a'+'A') #define _tolower(c) ((unsigned char)(c)-'A'+'a') #endif _CTYPE_H --------------616DE6931F8--