Make and run a library

I tried many times to make and run a library to get the results as shown in the tester file but I get nothing or very strange results like " Y Y Y Y Y Y Y Y "

any help will be highly appreciated

Attached library files and the tester

Thanks,

spa.h (9.06 KB)

spa.c (34.9 KB)

spa_tester.c (3.74 KB)