proto.c
上传用户:seven77cht
上传日期:2007-01-04
资源大小:486k
文件大小:3k
- /***************************************
- $Header: /home/amb/wwwoffle/RCS/proto.c 1.9 1999/08/15 14:46:21 amb Exp $
- WWWOFFLE - World Wide Web Offline Explorer - Version 2.2.
- Information about the protocols that wwwoffle supports.
- ******************/ /******************
- Written by Andrew M. Bishop
- This file Copyright 1997,98 Andrew M. Bishop
- It may be distributed under the GNU Public License, version 2, or
- any higher version. See section COPYING of the GNU Public license
- for conditions under which this file may be redistributed.
- ***************************************/
- #include <stdlib.h>
- #include "misc.h"
- #include "proto.h"
- /* Allow this file to be compiled without including all of the protocol
- specific functions in the files http.c, ftp.c, finger.c etc.
- - Requires no Protocol entries to be defined. */
- #ifdef NO_PROTOCOLS
- /*+ The list of protocols. +*/
- Protocol Protocols[1];
- /*+ The number of protocols. +*/
- int NProtocols=0;
- #else /* NO_PROTOCOLS */
- /*+ The list of protocols. +*/
- Protocol Protocols[]={
- {
- Protocol_HTTP, /* number */
- "http", /* name */
- 80, /* defport */
- 1, /* proxyable */
- 1, /* postable */
- 1, /* putable */
- HTTP_Open, /* open */
- HTTP_Request, /* request */
- HTTP_ReadHead, /* readhead */
- HTTP_ReadBody, /* readbody */
- HTTP_Close /* close */
- },
- {
- Protocol_FTP, /* number */
- "ftp", /* name */
- 21, /* defport */
- 1, /* proxyable */
- 0, /* postable */
- 1, /* putable */
- FTP_Open, /* open */
- FTP_Request, /* request */
- FTP_ReadHead, /* readhead */
- FTP_ReadBody, /* readbody */
- FTP_Close /* close */
- },
- {
- Protocol_Finger, /* number */
- "finger", /* name */
- 79, /* defport */
- 0, /* proxyable */
- 0, /* postable */
- 0, /* putable */
- Finger_Open, /* open */
- Finger_Request, /* request */
- Finger_ReadHead, /* readhead */
- Finger_ReadBody, /* readbody */
- Finger_Close /* close */
- }
- };
- /*+ The number of protocols. +*/
- int NProtocols=sizeof(Protocols)/sizeof(Protocol);
- #endif /* NO_PROTOCOLS */