home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / c-client / rfc822.h < prev    next >
C/C++ Source or Header  |  1994-01-09  |  4KB  |  113 lines

  1. /*
  2.  * Program:    RFC-822 routines (originally from SMTP)
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    27 July 1988
  13.  * Last Edited:    13 September 1992
  14.  *
  15.  * Sponsorship:    The original version of this work was developed in the
  16.  *        Symbolic Systems Resources Group of the Knowledge Systems
  17.  *        Laboratory at Stanford University in 1987-88, and was funded
  18.  *        by the Biomedical Research Technology Program of the National
  19.  *        Institutes of Health under grant number RR-00785.
  20.  *
  21.  * Original version Copyright 1988 by The Leland Stanford Junior University.
  22.  * Copyright 1992 by the University of Washington.
  23.  *
  24.  *  Permission to use, copy, modify, and distribute this software and its
  25.  * documentation for any purpose and without fee is hereby granted, provided
  26.  * that the above copyright notices appear in all copies and that both the
  27.  * above copyright notices and this permission notice appear in supporting
  28.  * documentation, and that the name of the University of Washington or The
  29.  * Leland Stanford Junior University not be used in advertising or publicity
  30.  * pertaining to distribution of the software without specific, written prior
  31.  * permission.  This software is made available "as is", and
  32.  * THE UNIVERSITY OF WASHINGTON AND THE LELAND STANFORD JUNIOR UNIVERSITY
  33.  * DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE,
  34.  * INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  35.  * FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF
  36.  * WASHINGTON OR THE LELAND STANFORD JUNIOR UNIVERSITY BE LIABLE FOR ANY
  37.  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  38.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  39.  * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF
  40.  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  41.  *
  42.  */
  43.  
  44. /* Coddle certain compilers' 6-character symbol limitation */
  45.  
  46. #ifdef __COMPILER_KCC__
  47. #define rfc822_header rheadr
  48. #define rfc822_address_line radl
  49. #define rfc822_header_line rhdl
  50. #define rfc822_write_address rwaddr
  51. #define rfc822_address raddr
  52. #define rfc822_cat rcat
  53. #define rfc822_write_body_header rwbhdr
  54. #define rfc822_default_subtype rdfsty
  55. #define rfc822_parse_msg rpmsg
  56. #define rfc822_parse_content rpcont
  57. #define rfc822_parse_content_header rpcnth
  58. #define rfc822_parse_adrlist rpadrl
  59. #define rfc822_parse_address rpaddr
  60. #define rfc822_parse_routeaddr rpradr
  61. #define rfc822_parse_addrspec rpaspc
  62. #define rfc822_parse_phrase rpphra
  63. #define rfc822_parse_word rpword
  64. #define rfc822_cpy rcpy
  65. #define rfc822_quote rquot
  66. #define rfc822_cpy_adr rcpyad
  67. #define rfc822_skipws rskpws
  68. #define rfc822_contents rcntnt
  69. #define rfc822_output routpt
  70. #define rfc822_encode_body renbdy
  71. #define rfc822_base64 rbas64
  72. #define rfc822_binary rbinry
  73. #define rfc822_qprint rqprnt
  74. #define rfc822_8bit r8bit
  75. #endif
  76.  
  77. /* Function prototypes */
  78.  
  79. void rfc822_header  ();
  80. void rfc822_address_line  ();
  81. void rfc822_header_line  ();
  82. void rfc822_write_address  ();
  83. void rfc822_address  ();
  84. void rfc822_cat  ();
  85. void rfc822_write_body_header  ();
  86. char *rfc822_default_subtype  ();
  87. void rfc822_parse_msg  ();
  88. void rfc822_parse_content  ();
  89. void rfc822_parse_content_header  ();
  90. void rfc822_parse_adrlist  ();
  91. ADDRESS *rfc822_parse_address  ();
  92. ADDRESS *rfc822_parse_routeaddr  ();
  93. ADDRESS *rfc822_parse_addrspec  ();
  94. char *rfc822_parse_phrase  ();
  95. char *rfc822_parse_word  ();
  96. char *rfc822_cpy  ();
  97. char *rfc822_quote  ();
  98. ADDRESS *rfc822_cpy_adr  ();
  99. void rfc822_skipws  ();
  100. char *rfc822_contents  ();
  101.  
  102. #ifndef TCPSTREAM
  103. #define TCPSTREAM void
  104. #endif
  105. typedef long (*soutr_t) ();
  106. long rfc822_output  ();
  107. void rfc822_encode_body  ();
  108. long rfc822_output_body  ();
  109. void *rfc822_base64  ();
  110. unsigned char *rfc822_binary  ();
  111. unsigned char *rfc822_qprint  ();
  112. unsigned char *rfc822_8bit  ();
  113.