iscntrl was not mentioned in the Makefile and therefor not built.

Change the isxxx functions to correctly handle values outside of character
range.


git-svn-id: svn://svn.cc65.org/cc65/trunk@33 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-06-08 18:35:04 +00:00
parent b05c1e1111
commit ca815af077
15 changed files with 84 additions and 27 deletions

View File

@@ -69,34 +69,19 @@ void* malloc (size_t size)
} else {
/* We must slice the block found */
struct freeblock* newblock;
newblock = (struct freeblock*) ((unsigned) f) + size;
/* We must slice the block found. Cut off space from the upper
* end, so we can leave the actual free block chain intact.
*/
/* Insert the new block (the remaining space) instead of the
* old one.
*/
newblock->size = f->size - size; /* Remaining size */
newblock->next = f->next;
newblock->prev = f->prev;
if (f->prev) {
/* We have a previous block */
f->prev->next = newblock;
} else {
/* This is the first block, correct the freelist pointer */
_hfirst = newblock;
}
if (f->next) {
/* We have a next block */
f->next->prev = newblock;
} else {
/* This is the last block, correct the freelist pointer */
_hlast = newblock;
}
/* Decrement the size of the block */
f->size -= size;
/* Set f to the now unused space above the current block */
f = (struct freeblock*) (((unsigned) f) + f->size);
}
/* Setup the pointer for the bock */
/* Setup the pointer for the block */
p = (unsigned*) f;
} else {