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

  1. /*
  2.  * Program:    MH mail routines
  3.  *
  4.  * Author(s):    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.  *        Andrew Cohen
  13.  *        Internet: cohen@bucrf16.bu.edu
  14.  *
  15.  * Date:    23 February 1992
  16.  * Last Edited:    29 October 1992
  17.  *
  18.  * Copyright 1992 by the University of Washington
  19.  *
  20.  *  Permission to use, copy, modify, and distribute this software and its
  21.  * documentation for any purpose and without fee is hereby granted, provided
  22.  * that the above copyright notice appears in all copies and that both the
  23.  * above copyright notice and this permission notice appear in supporting
  24.  * documentation, and that the name of the University of Washington not be
  25.  * used in advertising or publicity pertaining to distribution of the software
  26.  * without specific, written prior permission.  This software is made
  27.  * available "as is", and
  28.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  29.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  30.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  31.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  32.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  33.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  34.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  35.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  36.  *
  37.  */
  38.  
  39. /* Build parameters */
  40.  
  41. #define MHRC strcat (strcpy (tmp,myhomedir ()),"/.mhrc")
  42.  
  43.  
  44. /* Command bits from mh_getflags() */
  45.  
  46. #define fSEEN 1
  47. #define fDELETED 2
  48. #define fFLAGGED 4
  49. #define fANSWERED 8
  50.  
  51.  
  52. /* MH I/O stream local data */
  53.  
  54. typedef struct mh_local {
  55.   unsigned int dirty : 1;    /* disk copy of .mhrc needs updating */
  56.   char *dir;            /* spool directory name */
  57.   char *buf;            /* temporary buffer */
  58.   unsigned long buflen;        /* current size of temporary buffer */
  59.   unsigned long *number;    /* mh message numbers */
  60.   char **header;        /* message headers */
  61.   char **body;            /* message bodies */
  62.   char *seen;            /* local seen status */
  63. } MHLOCAL;
  64.  
  65.  
  66. /* Convenient access to local data */
  67.  
  68. #define LOCAL ((MHLOCAL *) stream->local)
  69.  
  70. /* Function prototypes */
  71.  
  72. DRIVER *mh_valid  ();
  73. int mh_isvalid  ();
  74. void *mh_parameters  ();
  75. char *mh_file  ();
  76. void mh_find  ();
  77. void mh_find_bboards  ();
  78. void mh_find_all  ();
  79. void mh_find_all_bboards  ();
  80. long mh_subscribe  ();
  81. long mh_unsubscribe  ();
  82. long mh_subscribe_bboard  ();
  83. long mh_unsubscribe_bboard  ();
  84. long mh_create  ();
  85. long mh_delete  ();
  86. long mh_rename  ();
  87. MAILSTREAM *mh_open  ();
  88. int mh_select  ();
  89. int mh_numsort  ();
  90. void mh_close  ();
  91. void mh_fetchfast  ();
  92. void mh_fetchflags  ();
  93. ENVELOPE *mh_fetchstructure  ();
  94. char *mh_fetchheader  ();
  95. char *mh_fetchtext  ();
  96. char *mh_fetchbody  ();
  97. void mh_setflag  ();
  98. void mh_clearflag  ();
  99. void mh_search  ();
  100. long mh_ping  ();
  101. void mh_check  ();
  102. void mh_expunge  ();
  103. long mh_copy  ();
  104. long mh_move  ();
  105. long mh_append  ();
  106. void mh_gc  ();
  107. short mh_getflags  ();
  108. char mh_search_all  ();
  109. char mh_search_answered  ();
  110. char mh_search_deleted  ();
  111. char mh_search_flagged  ();
  112. char mh_search_keyword  ();
  113. char mh_search_new  ();
  114. char mh_search_old  ();
  115. char mh_search_recent  ();
  116. char mh_search_seen  ();
  117. char mh_search_unanswered  ();
  118. char mh_search_undeleted  ();
  119. char mh_search_unflagged  ();
  120. char mh_search_unkeyword  ();
  121. char mh_search_unseen  ();
  122. char mh_search_before  ();
  123. char mh_search_on  ();
  124. char mh_search_since  ();
  125. unsigned long mh_msgdate  ();
  126. char mh_search_body  ();
  127. char mh_search_subject  ();
  128. char mh_search_text  ();
  129. char mh_search_bcc  ();
  130. char mh_search_cc  ();
  131. char mh_search_from  ();
  132. char mh_search_to  ();
  133. typedef char (*search_t)  ();
  134. search_t mh_search_date  ();
  135. search_t mh_search_flag  ();
  136. search_t mh_search_string  ();
  137.  
  138. /* This is embarassing */
  139.  
  140. extern char *bezerk_file  ();
  141. extern int bezerk_lock  ();
  142. extern void bezerk_unlock  ();
  143.