c language, apue & unp & data_struct algorithm codes