More progress on build scripts

Created a config directory for configuration files.
Moved all absolute path variables to a projpaths.py file
All scripts can now universally learn absolute paths via projpaths.py
Moved the config_symbols class to the configuration.py file.
Moved libs to loader since they are only referred by the loader
This commit is contained in:
Bahadir Balban
2009-09-12 13:42:30 +03:00
parent 8ffd4537ea
commit 59f30a175a
152 changed files with 1037 additions and 248 deletions

View File

@@ -0,0 +1,33 @@
/*
* K&R Malloc
*
* System specifc code should implement `more_core'
*/
#include "k_r_malloc.h"
#include <stdlib.h>
#include <string.h>
void *
realloc(void *ptr, size_t size)
{
Header *bp;
void *new_ptr;
size_t old_size;
if (ptr == NULL)
return malloc(size);
bp = (Header *) ptr - 1; /* point to block header */
old_size = sizeof(Header) * bp->s.size;
new_ptr = malloc(size);
if (new_ptr == NULL) {
return NULL;
}
if (old_size <= size) {
memcpy(new_ptr, ptr, old_size);
} else {
memcpy(new_ptr, ptr, size);
}
free(ptr);
return new_ptr;
}