imap/src/mailutil/mailutil.c
/* Set string pointer position for file stringstruct
 * Accepts: string structure
 *	    new position
 */
Set string pointer position for file stringstruct
Accepts: string structure
new position
Set string pointer position for file stringstruct Accepts : string structure new position
void ms_setpos (STRING *s,unsigned long i)
{
  APPENDPACKAGE *md = (APPENDPACKAGE *) s->data;
  if (i < s->data1) {		
    s->chunk = mail_fetch_header (md->stream,md->msgno,NIL,NIL,NIL,FT_PEEK);
    s->chunksize = s->data1;	
    s->offset = 0;		
  }
  else if (i < s->size) {	
    s->chunk = mail_fetch_text (md->stream,md->msgno,NIL,NIL,FT_PEEK);
    s->chunksize = s->size - s->data1;
    s->offset = s->data1;	
  }
  else {			
    s->chunk = NIL;		
    s->chunksize = 1;		
    s->offset = i;
  }
  s->curpos = s->chunk + (i -= s->offset);
  s->cursize = s->chunksize - i;
}
void ms_setpos ( STRING * s , unsigned long i ) { APPENDPACKAGE * md = ( APPENDPACKAGE * ) s -> data ; if ( i < s -> data1 ) { s -> chunk = mail_fetch_header ( md -> stream , md -> msgno , NIL , NIL , NIL , FT_PEEK ) ; s -> chunksize = s -> data1 ; s -> offset = 0 ; } else if ( i < s -> size ) { s -> chunk = mail_fetch_text ( md -> stream , md -> msgno , NIL , NIL , FT_PEEK ) ; s -> chunksize = s -> size - s -> data1 ; s -> offset = s -> data1 ; } else { s -> chunk = NIL ; s -> chunksize = 1 ; s -> offset = i ; } s -> curpos = s -> chunk + ( i -= s -> offset ) ; s -> cursize = s -> chunksize - i ; }
Set string pointer position for file stringstruct
 Accepts: string structure
          new position
Set string pointer position for file stringstruct Accepts : string structure new position
/* want header? */ /* header length */ /* offset is start of message */ /* want body */ /* offset is end of header */ /* off end of message */ /* make sure that we crack on this then */ /* make sure SNX cracks the right way... */ /* initial position and size */