Skip to content

Commit eaba36f

Browse files
committed
first commit
0 parents  commit eaba36f

File tree

287 files changed

+9269
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+9269
-0
lines changed

ASSERT/XASSERT.C

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* _Assert function */
2+
#include <assert.h>
3+
#include <stdio.h>
4+
#include <stdlib.h>
5+
6+
void _Assert(char *mesg)
7+
{ /* print assertion message and abort */
8+
fputs(mesg, stderr);
9+
fputs(" -- assertion failed\n", stderr);
10+
abort();
11+
}

CTYPE/ISALNUM.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isalnum function */
2+
#include <ctype.h>
3+
4+
int (isalnum)(int c)
5+
{ /* test for alphanumeric character */
6+
return (_Ctype[c] & (_DI|_LO|_UP|_XA));
7+
}

CTYPE/ISALPHA.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isalpha function */
2+
#include <ctype.h>
3+
4+
int (isalpha)(int c)
5+
{ /* test for alphabetic character */
6+
return (_Ctype[c] & (_LO|_UP|_XA));
7+
}

CTYPE/ISCNTRL.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* iscntrl function */
2+
#include <ctype.h>
3+
4+
int (iscntrl)(int c)
5+
{ /* test for control character */
6+
return (_Ctype[c] & (_BB|_CN));
7+
}

CTYPE/ISDIGIT.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isdigit function */
2+
#include <ctype.h>
3+
4+
int (isdigit)(int c)
5+
{ /* test for digit */
6+
return (_Ctype[c] & _DI);
7+
}

CTYPE/ISGRAPH.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isgraph function */
2+
#include <ctype.h>
3+
4+
int (isgraph)(int c)
5+
{ /* test for graphic character */
6+
return (_Ctype[c] & (_DI|_LO|_PU|_UP|_XA));
7+
}

CTYPE/ISLOWER.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* islower function */
2+
#include <ctype.h>
3+
4+
int (islower)(int c)
5+
{ /* test for lowercase character */
6+
return (_Ctype[c] & _LO);
7+
}

CTYPE/ISPRINT.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isprint function */
2+
#include <ctype.h>
3+
4+
int (isprint)(int c)
5+
{ /* test for printable character */
6+
return (_Ctype[c] & (_DI|_LO|_PU|_SP|_UP|_XA));
7+
}

CTYPE/ISPUNCT.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* ispunct function */
2+
#include <ctype.h>
3+
4+
int (ispunct)(int c)
5+
{ /* test for punctuation character */
6+
return (_Ctype[c] & _PU);
7+
}

CTYPE/ISSPACE.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* isspace function */
2+
#include <ctype.h>
3+
4+
int (isspace)(int c)
5+
{ /* test for spacing character */
6+
return (_Ctype[c] & (_CN|_SP|_XS));
7+
}

0 commit comments

Comments
 (0)