-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Graeme Gregory <[email protected]>
- Loading branch information
0 parents
commit dca5228
Showing
895 changed files
with
66,290 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#include <ctype.h> | ||
|
||
/* | ||
* Definition of the ctype array | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Added a pointer to this table initialised to the | ||
* second element. This allows for locale handling | ||
* and also generates more efficient code for the | ||
* ctype macros which do not have to add 1 any more | ||
* to the supplied value to get the table offset. | ||
* | ||
* 24 Jan 95 DJW - Changed type of table to 'unsigned char'. This stops | ||
* the compiler generating warnings, and may well also | ||
* lead to better code in the ctype macros. | ||
*/ | ||
|
||
static unsigned char ctype_table[257] = { | ||
/* | ||
* We could theoretically put an array of values at | ||
* this point to allow for programmers forgetting to | ||
* cast char parameters to the macros to unsigned int | ||
* and thus using negative values instead of postive. | ||
* (except for -1 which is always a special case). | ||
*/ | ||
0, /* -1 index into array */ | ||
|
||
/* NUL SCH STX ETX EOT ENQ ACK BEL */ | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
|
||
/* BS HT LF VT FF CR SO SI */ | ||
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, | ||
|
||
/* DLE DC1 DC2 DC3 DC4 NAK SYN ETB */ | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
|
||
/* CAN EM SUB ESC FS GS RS US */ | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
|
||
/* SPACE ! " # $ % & ' */ | ||
_B|_S, _P, _P, _P, _P, _P, _P, _P, | ||
|
||
/* ( ) * + , - . / */ | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
|
||
/* 0 1 2 3 4 5 6 7 */ | ||
_X|_N, _X|_N, _X|_N, _X|_N, _X|_N, _X|_N, _X|_N, _X|_N, | ||
|
||
/* 8 9 : ; < = > ? */ | ||
_X|_N, _X|_N, _P, _P, _P, _P, _P, _P, | ||
|
||
/* @ A B C D E F G */ | ||
_P, _X|_U, _X|_U, _X|_U, _X|_U, _X|_U, _X|_U, _U, | ||
|
||
/* H I J K L M N O */ | ||
_U, _U, _U, _U, _U, _U, _U, _U, | ||
|
||
/* P Q R S T U V W */ | ||
_U, _U, _U, _U, _U, _U, _U, _U, | ||
|
||
/* X Y Z [ \ ] ^ _ */ | ||
_U, _U, _U, _P, _P, _P, _P, _P, | ||
|
||
/* ` a b c d e f g */ | ||
_P, _X|_L, _X|_L, _X|_L, _X|_L, _X|_L, _X|_L, _L, | ||
|
||
/* h i j k l m n o */ | ||
_L, _L, _L, _L, _L, _L, _L, _L, | ||
|
||
/* p q r s t u v w */ | ||
_L, _L, _L, _L, _L, _L, _L, _L, | ||
|
||
/* x y z { | } ~ DEL */ | ||
_L, _L, _L, _P, _P, _P, _P, _C, | ||
|
||
/* QL higH character set, 128 - 192 */ | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
_P, _P, _P, _P, _P, _P, _P, _P, | ||
|
||
/* QL high control char set */ | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C, | ||
_C, _C, _C, _C, _C, _C, _C, _C | ||
}; | ||
|
||
|
||
unsigned char * _ctype = &ctype_table[1]; | ||
|
||
int _ctypetemp; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* i s a l n u m | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
|
||
#define __LIBRARY__ | ||
|
||
#include <ctype.h> | ||
|
||
#undef isalnum | ||
|
||
int isalnum _LIB_F1_(int, c) | ||
{ | ||
return (_ctype[c]&(_U|_L|_N)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* i s a l p h a | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
|
||
#define __LIBRARY__ | ||
|
||
#include <ctype.h> | ||
|
||
#undef isalpha | ||
|
||
int isalpha _LIB_F1_(int, c) | ||
{ | ||
return (_ctype[c]&(_U|_L)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#define __LIBRARY__ | ||
|
||
#include <ctype.h> | ||
|
||
#undef isascii | ||
|
||
int isascii _LIB_F1_( int, c) | ||
{ | ||
return ((unsigned)(c)<=127); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s c n t r l | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef iscntrl | ||
|
||
int iscntrl( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_C); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <ctype.h> | ||
|
||
#undef iscsym | ||
|
||
int iscsym( c ) | ||
int c; | ||
{ | ||
return (isalnum(c) || (((unsigned int)(c) & 127U) == 0x5f)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <ctype.h> | ||
|
||
#undef iscsymf | ||
|
||
int iscsymf( c ) | ||
int c; | ||
{ | ||
return (isalpha(c)||(((unsigned int)(c)&127U)==0x5f)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s d i g i t | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isdigit | ||
|
||
int isdigit( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_N); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s g r a p h | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isgraph | ||
|
||
int isgraph( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&(_P|_U|_L|_N)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s l o w e r | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef islower | ||
|
||
int islower( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_L); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s p r i n t | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isprint | ||
|
||
int isprint( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&(_P|_U|_L|_N|_B)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s p u n c t | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef ispunct | ||
|
||
int ispunct( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_P); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s s p a c e | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isspace | ||
|
||
int isspace( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_S); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s u p p e r | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isupper | ||
|
||
int isupper( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_U); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* i s x d i g i t | ||
* | ||
* AMENDMENT HISTORY | ||
* ~~~~~~~~~~~~~~~~~ | ||
* 28 May 94 DJW - Amended to take account of fact that offset into | ||
* _ctype array no longer needs adjusting by one. | ||
*/ | ||
#include <ctype.h> | ||
|
||
#undef isxdigit | ||
|
||
int isxdigit( c ) | ||
int c; | ||
{ | ||
return (_ctype[c]&_X); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <ctype.h> | ||
|
||
#undef toascii | ||
|
||
int toascii( c ) | ||
int c; | ||
{ | ||
return ((unsigned int)(c) & 127U); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <ctype.h> | ||
|
||
#undef tolower | ||
|
||
int tolower( c ) | ||
int c; | ||
{ | ||
return (isupper(c)?((c)+('a'-'A')):(c)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <ctype.h> | ||
|
||
#undef toupper | ||
|
||
int toupper( c ) | ||
int c; | ||
{ | ||
return (islower(c)?((c)-('a'-'A')):(c)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; | ||
; This is the default vector for program initialisation | ||
; | ||
; It is is set to point to the _Cinit routine. | ||
; | ||
|
||
.globl __Cstart | ||
|
||
__Cstart: | ||
dc.l __Cinit | ||
|
Oops, something went wrong.