added digittoint function for problem 008 to common.c