home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Magazine / wwwoffle-2.1.tar.gz / wwwoffle-2.1 / proto.c < prev    next >
C/C++ Source or Header  |  1998-02-11  |  2KB  |  74 lines

  1. /***************************************
  2.   $Header: /home/amb/wwwoffle/RCS/proto.c 1.7 1998/02/10 19:17:33 amb Exp $
  3.  
  4.   WWWOFFLE - World Wide Web Offline Explorer - Version 2.1.
  5.   Information about the protocols that wwwoffle supports.
  6.   ******************/ /******************
  7.   Written by Andrew M. Bishop
  8.  
  9.   This file Copyright 1997,98 Andrew M. Bishop
  10.   It may be distributed under the GNU Public License, version 2, or
  11.   any higher version.  See section COPYING of the GNU Public license
  12.   for conditions under which this file may be redistributed.
  13.   ***************************************/
  14.  
  15. #include <stdlib.h>
  16.  
  17. #include "misc.h"
  18. #include "proto.h"
  19.  
  20. /* For upgrade-cache and wwwoffle we don't want to link with all
  21.    of the different protocols so we keep them SIMPLE. */
  22.  
  23. #ifdef SIMPLE
  24.  
  25. /*+ The list of protocols. +*/
  26. Protocol Protocols[1];
  27.  
  28. /*+ The number of protocols. +*/
  29. int NProtocols=0;
  30.  
  31. #else
  32.  
  33. /*+ The list of protocols. +*/
  34. Protocol Protocols[]={
  35.  {
  36.   Protocol_HTTP,                /* number */
  37.   "http",                       /* name */
  38.   80,                           /* defport */
  39.   1,                            /* proxyable */
  40.   HTTP_Open,                    /* open */
  41.   HTTP_Request,                 /* request */
  42.   HTTP_ReadHead,                /* readhead */
  43.   HTTP_ReadBody,                /* readbody */
  44.   HTTP_Close                    /* close */
  45.  },
  46.  {
  47.   Protocol_FTP,                 /* number */
  48.   "ftp",                        /* name */
  49.   21,                           /* defport */
  50.   1,                            /* proxyable */
  51.   FTP_Open,                     /* open */
  52.   FTP_Request,                  /* request */
  53.   FTP_ReadHead,                 /* readhead */
  54.   FTP_ReadBody,                 /* readbody */
  55.   FTP_Close                     /* close */
  56.  },
  57.  {
  58.   Protocol_Finger,              /* number */
  59.   "finger",                     /* name */
  60.   79,                           /* defport */
  61.   0,                            /* proxyable */
  62.   Finger_Open,                  /* open */
  63.   Finger_Request,               /* request */
  64.   Finger_ReadHead,              /* readhead */
  65.   Finger_ReadBody,              /* readbody */
  66.   Finger_Close                  /* close */
  67.  }
  68. };
  69.  
  70. /*+ The number of protocols. +*/
  71. int NProtocols=sizeof(Protocols)/sizeof(Protocol);
  72.  
  73. #endif
  74.