static void mu_return_token(char *last, int trailing) { /* Get address and length of the token */ parsed.data = first; parsed.length = last - first; /* Account for characters processed, return token */ first = last + trailing; NIP(-1); /* make room for result */ ST1 = (cell) parsed.data; TOP = parsed.length; #ifdef DEBUG_TOKEN fprintf(stderr, "%.*s\n", parsed.length, parsed.data); #endif }
void mu_select() { int count; cell nfds = SP[3]; fd_set *readfds = (fd_set *) ST3; fd_set *writefds = (fd_set *) ST2; fd_set *exceptfds = (fd_set *) ST1; struct timeval *timeout = (struct timeval *) TOP; NIP(4); while((count = select(nfds, readfds, writefds, exceptfds, timeout)) == -1) { if (errno == EINTR) continue; throw_strerror(); } TOP = count; }
void mu_push_parsed() { DUP; NIP(-1); ST1 = (cell) parsed.data; TOP = parsed.length; }