#include "i.h" static Transport HTTPtrans = { httpinit, httpconnect, httpwritereq, httpgethdr, httpgetdata, httpdefaultport }; static Transport FTPtrans = { ftpinit, ftpconnect, ftpwritereq, ftpgethdr, ftpgetdata, ftpdefaultport }; static Transport FILEtrans = { fileinit, fileconnect, filewritereq, filegethdr, filegetdata, filedefaultport }; // Track the scheme enums in i.h Transport *transports[TRANSMAX] = { nil, // NOSCHEME &HTTPtrans, // HTTP &HTTPtrans, // HTTPS &FTPtrans, // FTP &FILEtrans // FILE }; void transportinit(void) { httpinit(); ftpinit(); fileinit(); }