NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
flags.c File Reference

Pattern definitions. More...

#include "config.h"
#include <stddef.h>
#include "private.h"
#include "mutt/lib.h"
#include "mutt.h"
#include "lib.h"
+ Include dependency graph for flags.c:

Go to the source code of this file.

Functions

const struct PatternFlagslookup_tag (char tag)
 Lookup a pattern modifier.
 
const struct PatternFlagslookup_op (int op)
 Lookup the Pattern Flags for an op.
 

Variables

const struct PatternFlags Flags []
 Lookup table for all patterns.
 

Detailed Description

Pattern definitions.

Authors
  • Pietro Cerutti
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file flags.c.

Function Documentation

◆ lookup_tag()

const struct PatternFlags * lookup_tag ( char  tag)

Lookup a pattern modifier.

Parameters
tagLetter, e.g. 'b' for pattern '~b'
Return values
ptrPattern data

Definition at line 198 of file flags.c.

199{
200 for (int i = 0; Flags[i].tag; i++)
201 if (Flags[i].tag == tag)
202 return &Flags[i];
203 return NULL;
204}
const struct PatternFlags Flags[]
Lookup table for all patterns.
Definition: flags.c:40
char tag
Character used to represent this operation, e.g. 'A' for '~A'.
Definition: private.h:65
+ Here is the caller graph for this function:

◆ lookup_op()

const struct PatternFlags * lookup_op ( int  op)

Lookup the Pattern Flags for an op.

Parameters
opOperation, e.g. MUTT_PAT_SENDER
Return values
ptrPatternFlags

Definition at line 211 of file flags.c.

212{
213 for (int i = 0; Flags[i].tag; i++)
214 if (Flags[i].op == op)
215 return (&Flags[i]);
216 return NULL;
217}
+ Here is the caller graph for this function:

Variable Documentation

◆ Flags

const struct PatternFlags Flags[]

Lookup table for all patterns.

Definition at line 40 of file flags.c.