/[mailutils]/mailutils/mail/var.c
ViewVC logotype

Diff of /mailutils/mail/var.c

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

revision 1.12 by gray, Sun Oct 13 20:36:35 2002 UTC revision 1.13 by gray, Tue Nov 5 13:38:01 2002 UTC
# Line 452  var_quote (int argc, char **argv, compos Line 452  var_quote (int argc, char **argv, compos
452        size_t n = 0;        size_t n = 0;
453        char *prefix = "\t";        char *prefix = "\t";
454    
455        if (util_get_message (mbox, cursor, &mesg, 1))        if (util_get_message (mbox, cursor, &mesg, MSG_NODELETED))
456          return 1;          return 1;
457    
458        fprintf (stdout, "Interpolating: %d\n", cursor);        fprintf (stdout, "Interpolating: %d\n", cursor);
# Line 472  var_quote (int argc, char **argv, compos Line 472  var_quote (int argc, char **argv, compos
472                header_get_field_name (hdr, i, buf, sizeof buf, NULL);                header_get_field_name (hdr, i, buf, sizeof buf, NULL);
473                if (mail_header_is_visible (buf))                if (mail_header_is_visible (buf))
474                  {                  {
475                      char *value;
476    
477                    fprintf (ofile, "%s%s: ", prefix, buf);                    fprintf (ofile, "%s%s: ", prefix, buf);
478                    header_get_field_value (hdr, i, buf, sizeof buf, NULL);                    if (header_aget_value (hdr, buf, &value) == 0)
479                    fprintf (ofile, "%s\n", buf);                      {
480                          int i;
481                          char *p, *s;
482    
483                          for (i = 0, p = strtok_r (value, "\n", &s); p;
484                               p = strtok_r (NULL, "\n", &s), i++)
485                            {
486                              if (i)
487                                fprintf (ofile, "%s", prefix);
488                              fprintf (ofile, "%s\n", p);
489                            }
490                          free (value);
491                        }
492                  }                  }
493              }              }
494            fprintf (ofile, "\n");            fprintf (ofile, "%s\n", prefix);
495            message_get_body (mesg, &body);            message_get_body (mesg, &body);
496            body_get_stream (body, &stream);            body_get_stream (body, &stream);
497          }          }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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