imap/src/mailutil/mailutil.c
/* Initialize file string structure for file stringstruct
 * Accepts: string structure
 *	    pointer to message data structure
 *	    size of string
 */
Initialize file string structure for file stringstruct
Accepts: string structure
pointer to message data structure
size of string
Initialize file string structure for file stringstruct Accepts : string structure pointer to message data structure size of string
void ms_init (STRING *s,void *data,unsigned long size)
{
  APPENDPACKAGE *md = (APPENDPACKAGE *) data;
  s->data = data;		
  mail_fetch_header (md->stream,md->msgno,NIL,NIL,&s->data1,
		     FT_PREFETCHTEXT|FT_PEEK);
#if 0
  s->size = size;		
#else	
  mail_fetch_text (md->stream,md->msgno,NIL,&s->size,FT_PEEK);
  s->size += s->data1;		
#endif
  SETPOS (s,0);
}
void ms_init ( STRING * s , void * data , unsigned long size ) { APPENDPACKAGE * md = ( APPENDPACKAGE * ) data ; s -> data = data ; mail_fetch_header ( md -> stream , md -> msgno , NIL , NIL , & s -> data1 , FT_PREFETCHTEXT | FT_PEEK ) ; #if 0 s -> size = size ; #else mail_fetch_text ( md -> stream , md -> msgno , NIL , & s -> size , FT_PEEK ) ; s -> size += s -> data1 ; #endif SETPOS ( s , 0 ) ; }
Initialize file string structure for file stringstruct
 Accepts: string structure
          pointer to message data structure
          size of string
Initialize file string structure for file stringstruct Accepts : string structure pointer to message data structure size of string
/* note stream/msgno and header length */ /* message size */ /* This kludge is necessary because of broken IMAP servers (sigh!) */ /* header + body size */