#include "../include/Sim2OS.h" namespace environment { namespace sim2os { void * Sim2OS::service_close (void) { if (have_all_arguments(1) == false) { std::cerr << "<" << name << "> Usage : int close(int fd);" << std::endl; return NULL; } int fd = static_cast(reinterpret_cast(arguments[1])); void * result = (void *) close(fd); error = errno; std::cout << "\n\t***** service : close *****" << std::endl; std::cout << "\tfd : " << (unsigned int) fd << std::endl; std::cout << "\tresult : " << static_cast(reinterpret_cast(result)) << std::endl; std::cout << "\terrno : " << (unsigned int) error << std::endl; return result; } }; };