Welcome to the CHICKEN Scheme pasting service
return #f from C thunk added by alynpost on Thu Jan 10 14:27:51 2013
(declare (foreign-declare #<<EOF #include <unistd.h> #include <errno.h> EOF )) (define isatty? (foreign-safe-lambda* bool ((int fd)) #<<EOF int r; r = isatty(fd); printf("fd=%d r=%d e=%d\n", fd, r, errno); switch(r) { case 0: switch(errno) { case ENOTTY: return C_SCHEME_FALSE; default: c0re_die("isatty"); } case 1: return C_SCHEME_TRUE; default: c0re_die("isatty"); } EOF ))