library database emulatory using structures in c code