/[mailutils]/mailutils/mh/inc.c
ViewVC logotype

Diff of /mailutils/mh/inc.c

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

revision 1.19 by gray, Sun Jan 26 13:55:01 2003 UTC revision 1.20 by gray, Fri Jan 31 15:00:35 2003 UTC
# Line 129  opt_handler (int key, char *arg, void *u Line 129  opt_handler (int key, char *arg, void *u
129  }  }
130    
131  void  void
132  list_message (mh_format_t *format, mailbox_t mbox, size_t msgno,  list_message (mh_format_t *format, mailbox_t mbox, size_t msgno, size_t width)
               char *buffer, size_t width)  
133  {  {
134    message_t msg;    message_t msg;
135      char *buf = NULL;
136    
   buffer[0] = 0;  
137    mailbox_get_message (mbox, msgno, &msg);    mailbox_get_message (mbox, msgno, &msg);
138    mh_format (format, msg, msgno, buffer, width);    mh_format (format, msg, msgno, width, &buf);
139    printf ("%s\n", buffer);    printf ("%s\n", buf);
140    if (audit_fp)    if (audit_fp)
141      fprintf (audit_fp, "%s\n", buffer);      fprintf (audit_fp, "%s\n", buf);
142      free (buf);
143  }  }
144    
145  int  int
# Line 151  main (int argc, char **argv) Line 151  main (int argc, char **argv)
151    size_t lastmsg;    size_t lastmsg;
152    int f_truncate = 0;    int f_truncate = 0;
153    int f_changecur = 0;    int f_changecur = 0;
   char *buffer;  
154    mh_format_t format;    mh_format_t format;
155    int rc;    int rc;
156    
# Line 210  main (int argc, char **argv) Line 209  main (int argc, char **argv)
209        exit (1);        exit (1);
210      }      }
211        
   buffer = xmalloc (width);  
     
212    /* Fixup options */    /* Fixup options */
213    if (truncate_source == -1)    if (truncate_source == -1)
214      truncate_source = f_truncate;      truncate_source = f_truncate;
# Line 249  main (int argc, char **argv) Line 246  main (int argc, char **argv)
246          }          }
247                        
248        if (!quiet)        if (!quiet)
249          list_message (&format, output, lastmsg + n, buffer, width);          list_message (&format, output, lastmsg + n, width);
250                
251        if (truncate_source)        if (truncate_source)
252          {          {

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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