[BACK]Return to collect.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Diff for /src/usr.bin/mail/collect.c between version 1.22 and 1.23

version 1.22, 2001/11/20 20:50:00 version 1.23, 2001/11/21 15:26:39
Line 36 
Line 36 
   
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)collect.c   8.2 (Berkeley) 4/19/94";  static const char sccsid[] = "@(#)collect.c     8.2 (Berkeley) 4/19/94";
 #else  #else
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 62 
Line 62 
  * receipt of an interrupt signal, the partial message can be salted   * receipt of an interrupt signal, the partial message can be salted
  * away on dead.letter.   * away on dead.letter.
  */   */
   
 static  FILE    *collf;                 /* File for saving away */  static  FILE    *collf;                 /* File for saving away */
 static  int     hadintr;                /* Have seen one SIGINT so far */  static  int     hadintr;                /* Have seen one SIGINT so far */
   
 FILE *  FILE *
 collect(hp, printheaders)  collect(struct header *hp, int printheaders)
         struct header *hp;  
         int printheaders;  
 {  {
         FILE *fbuf;          FILE *fbuf;
         int lc, cc, fd, c, t, lastlong, rc, sig;          int lc, cc, fd, c, t, lastlong, rc, sig;
Line 252 
Line 249 
                         hp->h_bcc = cat(hp->h_bcc, extract(&linebuf[2], GBCC));                          hp->h_bcc = cat(hp->h_bcc, extract(&linebuf[2], GBCC));
                         break;                          break;
                 case 'd':                  case 'd':
                         strncpy(linebuf + 2, getdeadletter(), sizeof(linebuf) - 3);                          linebuf[2] = '\0';
                         linebuf[sizeof(linebuf) - 1] = '\0';                          strlcat(linebuf, getdeadletter(), sizeof(linebuf));
                         /* fall into . . . */                          /* fall into . . . */
                 case 'r':                  case 'r':
                 case '<':                  case '<':
Line 399 
Line 396 
  * Write a file, ex-like if f set.   * Write a file, ex-like if f set.
  */   */
 int  int
 exwrite(name, fp, f)  exwrite(char *name, FILE *fp, int f)
         char name[];  
         FILE *fp;  
         int f;  
 {  {
         FILE *of;          FILE *of;
         int c;          int c;
Line 447 
Line 441 
  * On return, make the edit file the new temp file.   * On return, make the edit file the new temp file.
  */   */
 void  void
 mesedit(fp, c)  mesedit(FILE *fp, int c)
         FILE *fp;  
         int c;  
 {  {
         FILE *nf;          FILE *nf;
         struct sigaction oact;          struct sigaction oact;
Line 473 
Line 465 
  * Sh -c must return 0 to accept the new message.   * Sh -c must return 0 to accept the new message.
  */   */
 void  void
 mespipe(fp, cmd)  mespipe(FILE *fp, char *cmd)
         FILE *fp;  
         char cmd[];  
 {  {
         FILE *nf;          FILE *nf;
         int fd;          int fd;
Line 527 
Line 517 
  * should shift over and 'f' if not.   * should shift over and 'f' if not.
  */   */
 int  int
 forward(ms, fp, fn, f)  forward(char *ms, FILE *fp, char *fn, int f)
         char ms[];  
         FILE *fp;  
         char *fn;  
         int f;  
 {  {
         int *msgvec;          int *msgvec;
         struct ignoretab *ig;          struct ignoretab *ig;
Line 575 
Line 561 
  * Save the partial message in ~/dead.letter.   * Save the partial message in ~/dead.letter.
  */   */
 int  int
 collabort()  collabort(void)
 {  {
         /*          /*
          * the control flow is subtle, because we can be called from ~q.           * the control flow is subtle, because we can be called from ~q.
Line 601 
Line 587 
 }  }
   
 void  void
 savedeadletter(fp)  savedeadletter(FILE *fp)
         FILE *fp;  
 {  {
         FILE *dbuf;          FILE *dbuf;
         int c;          int c;
Line 623 
Line 608 
 }  }
   
 int  int
 gethfromtty(hp, gflags)  gethfromtty(struct header *hp, int gflags)
         struct header *hp;  
         int gflags;  
 {  {
   
         hadintr = 0;          hadintr = 0;

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23