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
))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the result of `(apply + (list -3 4 2))'?
Visually impaired? Let me spell it for you (wav file) download WAV