restructure c code; get system icon size