Add some generic functions

	new file:   include/ctype.h
	new file:   lib/ctype.c
	new file:   lib/malloc.c
	modified:   lib/string.c