#line 28 "telnet.c-nw" #include #include #include #include EXPORT Bool initTELNET(char ***protocols, int *nrprotocols) { static char *protos[] = {"telnet"}; *protocols = protos; *nrprotocols = 1; return TRUE; } EXPORT int openTELNET(const char *url, int method, int flg, const char *refer) { return open("/dev/null", O_RDONLY); /* Need to return file desc */ } EXPORT int readTELNET(int fd, char *buf, size_t nbytes) {return 0;} /* EOF */ EXPORT Bool doneTELNET(int fd) {return TRUE;} /* means "query's been sent" */ EXPORT int peekTELNET(int fd) {return 1;} /* means readTELNET is ready */ EXPORT int writeTELNET(int fd, const char *buf, size_t nbytes) { errno = EMETHOD; return -1; } EXPORT Bool closeTELNET(int fd) {return close(fd) != -1;} EXPORT Bool deleteTELNET(const char *url) {errno = EMETHOD; return -1;} EXPORT Bool infoTELNET(int fd, W3ADocumentInfo *buf) { dispose(buf->mime_type); dispose(buf->mime_params); buf->mime_type = newstring("application/x-telnet"); return TRUE; }