~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to history.c

  • Committer: Bazaar Package Importer
  • Author(s): Antonio Radici
  • Date: 2009-06-14 20:53:18 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (2.1.3 squeeze)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20090614205318-wf0sqy1o3km636li
Tags: 1.5.20-1
* New upstream release, includes the following features:
  + Bounced messages contains From: headers (Closes: 93268)
  + Attachments displayed based on Content-Disposition (Closes: 199709)
  + fcc to a mailbox does not raise the 'new' flag (Closes: 209390)
  + '!' supported as suffix in gpg keys (Closes: 277945)
  + failed attachment saving shows an error message (Closes: 292350)
  + inline signed messages sent honouring $send_charset (Closes: 307819)
  + support for <clear-flag> and <set-flag> in the pager (Closes: 436007)
  + fcc_attach is a quad option (Closes: 478861)
  + Content-Description header not included in reply (Closes: 500766)
  + imap_sync_mailbox fix for a segfault (Closes: 516364)
  + better threading support with particular Message-ID's (Closes: 520735)
  + no crash on IMAP folder refresh (Closes: 528465)
  + undisclosed-recipients not passed in the envelope (Closes: 529090)
* debian/patches/series:
  + commented all references to upstream/*, they should be included in 1.5.20
  + removed debian-specific/529838-gnutls-autoconf.patch, ditto
  + removed misc/manpage-typos.patch, ditto 
  + modified misc/hyphen-as-minus.patch, a big part was integrated upstream
  + features/trash-folder: do not reupload messages to $trash if IMAP is used
    (Closes: #448241)
  + added misc/hg.pmdef.debugtime, see upstream #3263
* debian/control: added DM-Upload-Allowed: yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
static struct history History[HC_LAST];
36
36
static int OldSize = 0;
37
37
 
38
 
#define GET_HISTORY(CLASS)      ((CLASS < 0 || CLASS >= HC_LAST) ? NULL : &History[CLASS])
 
38
#define GET_HISTORY(CLASS)      ((CLASS >= HC_LAST) ? NULL : &History[CLASS])
39
39
 
40
40
static void init_history (struct history *h)
41
41
{
68
68
  if ((f = fopen (HistFile, "r")) == NULL)
69
69
    return;
70
70
 
71
 
  while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
 
71
  while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
72
72
  {
73
73
    read = 0;
74
74
    if (sscanf (linebuf, "%d:%n", &hclass, &read) < 1 || read == 0 ||
90
90
    }
91
91
  }
92
92
 
93
 
  fclose (f);
 
93
  safe_fclose (&f);
94
94
  FREE (&linebuf);
95
95
}
96
96
 
107
107
    return;
108
108
 
109
109
  line = 0;
110
 
  while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
 
110
  while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
111
111
  {
112
112
    if (sscanf (linebuf, "%d", &hclass) < 1 || hclass < 0)
113
113
    {
133
133
  {
134
134
    rewind (f);
135
135
    line = 0;
136
 
    while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
 
136
    while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
137
137
    {
138
138
      if (sscanf (linebuf, "%d", &hclass) < 1 || hclass < 0)
139
139
      {
149
149
  }
150
150
 
151
151
cleanup:
152
 
  fclose (f);
 
152
  safe_fclose (&f);
153
153
  FREE (&linebuf);
154
154
  if (tmp != NULL)
155
155
  {
158
158
    {
159
159
      rewind (tmp);
160
160
      mutt_copy_stream (tmp, f);
161
 
      fclose (f);
 
161
      safe_fclose (&f);
162
162
    }
163
 
    fclose (tmp);
 
163
    safe_fclose (&tmp);
164
164
    unlink (tmpfname);
165
165
  }
166
166
}
196
196
  }
197
197
  fputs ("|\n", f);
198
198
 
199
 
  fclose (f);
 
199
  safe_fclose (&f);
200
200
  FREE (&tmp);
201
201
 
202
202
  if (--n < 0)