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

« back to all changes in this revision

Viewing changes to pattern.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-06-07 17:30:03 UTC
  • mto: (16.2.1 experimental) (2.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090607173003-rg37ui3h2bbv7wl0
Tags: upstream-1.5.19
ImportĀ upstreamĀ versionĀ 1.5.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 1996-2000,2006 Michael R. Elkins <me@mutt.org>, and others
 
2
 * Copyright (C) 1996-2000,2006-7 Michael R. Elkins <me@mutt.org>, and others
3
3
 * 
4
4
 *     This program is free software; you can redistribute it and/or modify
5
5
 *     it under the terms of the GNU General Public License as published by
46
46
static int eat_range (pattern_t *pat, BUFFER *, BUFFER *);
47
47
static int patmatch (const pattern_t *pat, const char *buf);
48
48
 
49
 
struct pattern_flags
 
49
static struct pattern_flags
50
50
{
51
51
  int tag;      /* character used to represent this op */
52
52
  int op;       /* operation to perform */
118
118
#define M_PDR_ERRORDONE (M_PDR_ERROR | M_PDR_DONE)
119
119
 
120
120
 
121
 
int mutt_getvaluebychar (char ch, struct mapping_t *table)
122
 
{
123
 
  int i;
124
 
 
125
 
  for (i = 0; table[i].name; i++)
126
 
  {
127
 
    if (ch == table[i].name[0])
128
 
      return table[i].value;
129
 
  }
130
 
 
131
 
  return (-1);
132
 
}
133
 
 
134
121
/* if no uppercase letters are given, do a case-insensitive search */
135
122
int mutt_which_case (const char *s)
136
123
{
193
180
            && !crypt_valid_passphrase(h->security))
194
181
        {
195
182
          mx_close_message (&msg);
196
 
          if (fp)
 
183
          if (s.fpout)
197
184
          {
198
 
            fclose (fp);
 
185
            fclose (s.fpout);
199
186
            unlink (tempfile);
200
187
          }
201
188
          return (0);
263
250
  return match;
264
251
}
265
252
 
266
 
int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err)
 
253
static int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err)
267
254
{
268
255
  BUFFER buf;
269
256
  int r;