initial checkin of c-implementaion of door_damon