/[emacs]/emacs/lib-src/fakemail.c
ViewVC logotype

Diff of /emacs/lib-src/fakemail.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28 by fx, Tue Dec 18 16:01:11 2001 UTC revision 1.29 by pj, Wed Dec 19 07:26:05 2001 UTC
# Line 20  Boston, MA 02111-1307, USA.  */ Line 20  Boston, MA 02111-1307, USA.  */
20    
21  #define NO_SHORTNAMES  #define NO_SHORTNAMES
22  #define _XOPEN_SOURCE 500       /* for cuserid */  #define _XOPEN_SOURCE 500       /* for cuserid */
23  #include <config.h>  
24    #ifdef HAVE_CONFIG_H
25    #include "config.h"
26    #endif
27    
28  #if defined (BSD_SYSTEM) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)  #if defined (BSD_SYSTEM) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
29  /* This program isnot used in BSD, so just avoid loader complaints.  */  /* This program isnot used in BSD, so just avoid loader complaints.  */
# Line 82  struct header_record Line 85  struct header_record
85    struct header_record *previous;    struct header_record *previous;
86  };  };
87  typedef struct header_record *header;  typedef struct header_record *header;
88                            
89  struct stream_record  struct stream_record
90  {  {
91    FILE *handle;    FILE *handle;
# Line 203  init_linebuffer (linebuffer) Line 206  init_linebuffer (linebuffer)
206  }  }
207    
208  /* Read a line of text from `stream' into `linebuffer'.  /* Read a line of text from `stream' into `linebuffer'.
209   * Return the length of the line.       Return the length of the line.  */
  */  
210    
211  long  long
212  readline (linebuffer, stream)  readline (linebuffer, stream)
# Line 619  parse_header (the_header, where) Line 621  parse_header (the_header, where)
621    *where = '\0';    *where = '\0';
622    return;    return;
623  }  }
624        
625  /* Read lines from the input until we get a blank line.  /* Read lines from the input until we get a blank line.
626     Create a list of `header' objects, one for each header field,     Create a list of `header' objects, one for each header field,
627     each of which points to a list of `line_list' objects,     each of which points to a list of `line_list' objects,
628     one for each line in that field.     one for each line in that field.
629     Continuation lines are grouped in the headers they continue.  */     Continuation lines are grouped in the headers they continue.  */
630      
631  header  header
632  read_header ()  read_header ()
633  {  {
# Line 725  main (argc, argv) Line 727  main (argc, argv)
727    command_line = alloc_string (name_length + args_size (the_header));    command_line = alloc_string (name_length + args_size (the_header));
728    strcpy (command_line, mail_program_name);    strcpy (command_line, mail_program_name);
729    parse_header (the_header, &command_line[name_length]);    parse_header (the_header, &command_line[name_length]);
730      
731    the_pipe = popen (command_line, "w");    the_pipe = popen (command_line, "w");
732    if (the_pipe == ((FILE *) NULL))    if (the_pipe == ((FILE *) NULL))
733      fatal ("cannot open pipe to real mailer");      fatal ("cannot open pipe to real mailer");

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26